From OpenSCADAWiki
Jump to: navigation, search

Public methods:

  • TFunction( const string &id, const char *grp = "root", const string &istor = "" ); — Initializing constructor of the function with the identifier id, users group grp and storage stor.
  • TFunction( const TFunction &src ); — Copying constructor.
  • TFunction &operator=( const TFunction &func ); — Copying of functions.
  • string id( ) const; — Function ID.
  • virtual string name( ); — Localized name of the function.
  • virtual string descr( ); — Description of the function.
  • virtual string prog( ); — Program's text of the function, for no static ones.
  • virtual string stor( ); — Storage DB, for table "Trs" mostly.
  • bool startStat( ) const; — Status - "Running".
  • int use( ); — Counter of the function's using.
  • ResRW &fRes( ); — Link to the resource of the function.
  • void setId( const string &vl ); — Set the function identifier.
  • virtual void setProg( const string &prg ); — Set program's text of the function, for no static ones.
  • void setStor( const string &istor ); — Set storage DB to stor.
  • virtual void setStart( bool val ); — Start/stop val of the function.
  • void ioList( vector<string> &list ); — The list of the function's parameters list.
  • int ioId( const string &id ) const; — Getting the index of the function's parameter id.
  • int ioSize( ) const; — The quantity of the function's parameters.
  • IO *io( int id ) const; — Getting the function's parameter by the index id.
  • int ioAdd( IO *io ); — Addition of the function's parameter io. Returns the actual position of the new IO.
  • int ioIns( IO *io, int pos ); — Insert of the function's parameter io into the position pos. Returns the actual position of the new IO.
  • void ioDel( int pos ); — Deleting the function's parameter in the position pos.
  • void ioMove( int pos, int to ); — Moving the function's parameter from the position pos to the position to.
  • virtual void calc( TValFunc *val ); — The calculation of the function's algorithm of the specified values val.
  • virtual void valAtt( TValFunc *vfnc ); — Is called by the object of the values' frame vfnc in the case of attaching with the function.
  • virtual void valDet( TValFunc *vfnc ); — Is called by the object of the values' frame vfnc in the case of detaching from the function.
  • virtual void preIOCfgChange( ); — Is called before the changing of the configuration of the function.
  • virtual void postIOCfgChange( ); — Is called after the changing of the configuration of the function.