File mttroot/mtt/bin/trans/sympar2rtxi_txt2h artifact 7eba5b84fa part of check-in ec9a4785ac


#! /bin/sh

sys=$1
sympar=${sys}_sympar.txt
RTXI_H="${sys}_rtxi.h"
program=$(basename $0)
date=$(date)

cat <<EOF > ${RTXI_H}
// -*-c++-*- Put Emacs into c++-mode

// Generated from $sympar by MTT
// using $program
// at $date

#include <rt.h>
#include <default_gui_model.h>

class $sys : public DefaultGUIModel
{

public:
  
  $sys(void);
  virtual ~$sys(void);
  
  virtual void execute(void);

protected:

  virtual void update(DefaultGUIModel::update_flags_t);

private:

EOF

gawk '
	{ printf("  double %s;\n", $1); }
' $sympar >> ${RTXI_H}

cat <<EOF >> ${RTXI_H}
};
EOF

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]