class CFunction


Inheritance:


Public Methods

[more] CFunction( const CFunction* , Object to copy from* / const CDSLibComponent* = NULL Container for this new object* / )
Copy-constructor.
[more]virtual ~CFunction()
Destructor
[more]bool AddBlockVariable( const std::string &, Identifier of the block variable* / const std::string & = "float", Type of the block variable* / unsigned int = 0, bool = false, bool = false )
Adds a block variable to this block
[more]bool AddBlockVariables( unsigned int, const std::string & = "float", Type of the block variables* / unsigned int = 0, bool = false, bool = false )
Adds block variables to this block
[more]bool AddInput( const std::string &, Identifier of the input* / const std::string & = "float", Type of the input* / unsigned int = 0, bool = false, bool = false )
Adds an input to this block
[more]bool AddInputs( unsigned int, const std::string & = "float", Type of the inputs* / unsigned int = 0, bool = false, bool = false )
Adds inputs to this block
[more]bool AddOutput( const std::string &, Identifier of the output* / const std::string & = "float", Type of the output* / unsigned int = 0, bool = false, bool = false )
Adds an output to this block
[more]const std::string& AfterRunCode() const
Returns the cleaning-up code to be executed after finishing the realtime execution of the system
[more]const std::string& BeforeRunCode() const
Returns the initializing code to be executed before starting the realtime execution of the system
[more]virtual std::string Class() const
Returns "CFuncion"
[more]virtual CFunction* Clone( const CDSLibComponent* = NULL Container for the new object* / ) const
Returns a new CFunction object copied from this one using the copy-constructor above
[more]virtual bool DescendantOf( const std::string & Class name* / ) const
Returns if the argument is "CFunction" or the name of one of its base classes.
[more]const std::string& RunCode() const
Returns the code to be executed in every realtime iteration of the system
[more]bool SetAfterRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the cleaning-up code to be executed after finishing the realtime execution of the system
[more]bool SetBeforeRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the initializing code to be executed before starting the realtime execution of the system
[more]bool SetRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the code to be executed in every realtime iteration of the system

Public Members

[more] Block whose operation can be freely written by the user in C

Protected Methods

[more]virtual void GenerateCode( const std::string &, Path to the template files to be parsed* / CCodeSection* Code section to be generated. It must already point to a CCodeSection object, which may be modified by adding new sections and lines to it* / ) const
Makes this object and its contained objects generate code for the section in the arguments
[more]virtual std::string Value( const std::string & Value of the "name" parameter of the template command* / ) const
Returns a string to be inserted in the generated code instead of a <value > template command 


Inherited from CBlock:

Public Methods

ovirtual bool AcceptsContainer(const CDSLibComponent* pContainer)
ovirtual bool AddComponent(CDSLibComponent* pComponent)
oCBlockVariable* BlockVariable(const std::string & strIdentifier) const
oCBlockVariable* BlockVariable(unsigned int uIndex) const
ovirtual const std::string GlobalIdentifier() const
oCInput* Input(const std::string & strName) const
oCInput* Input(unsigned int uIndex) const
ovirtual unsigned int NumberOfBlockVariables() const
ovirtual unsigned int NumberOfInputs() const
ovirtual unsigned int NumberOfOutputs() const
oCOutput* Output(const std::string & strName) const
oCOutput* Output(unsigned int uIndex) const
obool SchedulerContainsReader() const
obool SchedulerContainsWriter() const


Inherited from CDSLibComponent:

Public Methods

obool AllArrange()
ovoid AllGenerateCode(const std::string &strTemplatesPath, CCodeSection* pCodeSection) const
ovirtual bool AllRepeatedValue(const CDSLibComponent* pCaller, const std::string & strValueName, const std::string & strValue) const
ovoid AllReportMessages(CMessages* pMessagesReport)
oconst CDSLibComponent* Component(const std::string & strIdentifier, const std::string & strClass) const
oconst CDSLibComponentPointers& Components() const
oconst CDSLibComponent* Container( const std::string & strClass = "", unsigned int uSkip = 0) const
ovoid DeleteObjects()
oconst std::string& Identifier() const
oint ComponentIndex() const
oconst CMessages& Messages() const
ovirtual bool RepeatedValue(const std::string &, const std::string &) const
obool SetIdentifier(const std::string & strIdentifier)

Protected Methods

ovirtual void AddMessage(unsigned int uNumber)
ovirtual void Arrange()
oCDSLibComponentPointers& Components()
ovirtual void ComponentsGenerateCode(const std::string &strTemplatesPath, CCodeSection* pCodeSection) const
ostd::string LongLongToString(long long llNumber) const
oCMessages& Messages()
obool ParseTemplate(const std::string & strTemplatesPath, const std::string & strTemplate, CCodeSection* pOutputSection) const
ovoid SetContainer(const CDSLibComponent* pContainer)
olong long StringToLongLong(const std::string &strNumber) const
ostd::string DoubleToString(double dNumber) const


Documentation

o Block whose operation can be freely written by the user in C
Block whose operation can be freely written by the user in C

o CFunction( const CFunction* , Object to copy from* / const CDSLibComponent* = NULL Container for this new object* / )
Copy-constructor. Copies all the attributes of CFunction and calls the copy-constructor of CBlock

ovirtual ~CFunction()
Destructor

obool AddBlockVariable( const std::string &, Identifier of the block variable* / const std::string & = "float", Type of the block variable* / unsigned int = 0, bool = false, bool = false )
Adds a block variable to this block
Parameters:
int - If it is 0 or 1, then the variable is of simple type. If it's 2 or more, then it will be an array of the type, and this argument sets the length of the array
bool - Sets if the variable can be read from outside the dynamic system with a CReader
bool - Sets if the variable can be written from outside the dynamic system with a CWriter

obool AddBlockVariables( unsigned int, const std::string & = "float", Type of the block variables* / unsigned int = 0, bool = false, bool = false )
Adds block variables to this block
Parameters:
int - Number of variables to be added. The variables will be added one by one with the identifier "blockvar<number>", being <number> the already existing number of block variables each time
int - If it is 0 or 1, then the variables are of simple type. If it's 2 or more, then every variable will be an array of the type, and this argument sets the length of the arrays
bool - Sets if the variables can be read from outside the dynamic system with a CReader
bool - Sets if the variables can be written from outside the dynamic system with a CWriter

obool AddInput( const std::string &, Identifier of the input* / const std::string & = "float", Type of the input* / unsigned int = 0, bool = false, bool = false )
Adds an input to this block
Parameters:
int - If it is 0 or 1, then the input is of simple type. If it's 2 or more, then it will be an array of the type, and this argument sets the length of the array
bool - Sets if the input can be read from outside the dynamic system with a CReader
bool - Sets if the input can be written from outside the dynamic system with a CWriter

obool AddInputs( unsigned int, const std::string & = "float", Type of the inputs* / unsigned int = 0, bool = false, bool = false )
Adds inputs to this block
Parameters:
int - Number of inputs to be added. The inputs will be added one by one with the identifier "input<number>", being <number> the already existing number of inputs each time
int - If it is 0 or 1, then the inputs are of simple type. If it's 2 or more, then every input will be an array of the type, and this argument sets the length of the arrays
bool - Sets if the inputs can be read from outside the dynamic system with a CReader
bool - Sets if the outputs can be written from outside the dynamic system with a CWriter

obool AddOutput( const std::string &, Identifier of the output* / const std::string & = "float", Type of the output* / unsigned int = 0, bool = false, bool = false )
Adds an output to this block
Parameters:
int - If it is 0 or 1, then the output is of simple type. If it's 2 or more, then it will be an array of the type, and this argument sets the length of the array
bool - Sets if the output can be read from outside the dynamic system with a CReader
bool - Sets if the output can be written from outside the dynamic system with a CWriter

oconst std::string& AfterRunCode() const
Returns the cleaning-up code to be executed after finishing the realtime execution of the system

oconst std::string& BeforeRunCode() const
Returns the initializing code to be executed before starting the realtime execution of the system

ovirtual std::string Class() const
Returns "CFuncion"

ovirtual CFunction* Clone( const CDSLibComponent* = NULL Container for the new object* / ) const
Returns a new CFunction object copied from this one using the copy-constructor above

ovirtual bool DescendantOf( const std::string & Class name* / ) const
Returns if the argument is "CFunction" or the name of one of its base classes.

oconst std::string& RunCode() const
Returns the code to be executed in every realtime iteration of the system

obool SetAfterRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the cleaning-up code to be executed after finishing the realtime execution of the system

obool SetBeforeRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the initializing code to be executed before starting the realtime execution of the system

obool SetRunCode( const std::string & Code to be executed. Lines should finish with "\n"* / )
Sets the code to be executed in every realtime iteration of the system

ovirtual void GenerateCode( const std::string &, Path to the template files to be parsed* / CCodeSection* Code section to be generated. It must already point to a CCodeSection object, which may be modified by adding new sections and lines to it* / ) const
Makes this object and its contained objects generate code for the section in the arguments

ovirtual std::string Value( const std::string & Value of the "name" parameter of the template command* / ) const
Returns a string to be inserted in the generated code instead of a <value > template command 


This class has no child classes.
Author:
Ivan Martinez

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.