Allows to export code of a function call. More...
#include <export_function_call.hpp>
Protected Member Functions | |
returnValue | clear () |
returnValue | setName (const std::string &_name) |
Protected Attributes | |
ExportArgumentList | functionArguments |
std::string | name |
Additional Inherited Members | |
Public Types inherited from ExportStatement | |
typedef std::shared_ptr< MemoryAllocator > | MemoryAllocatorPtr |
typedef std::shared_ptr< ExportStatement > | StatementPtr |
typedef std::vector< StatementPtr > | StatementPtrArray |
Static Public Attributes inherited from ExportStatement | |
static std::string | fcnPrefix = "acado" |
static std::string | varPrefix = "ACADO" |
Allows to export code of a function call.
The class ExportFunctionCall allows to export code of a function call.
Definition at line 57 of file export_function_call.hpp.
BEGIN_NAMESPACE_ACADO ExportFunctionCall::ExportFunctionCall | ( | const std::string & | _name = "acadoFcn" , |
const ExportArgument & | _argument1 = emptyConstExportArgument , |
||
const ExportArgument & | _argument2 = emptyConstExportArgument , |
||
const ExportArgument & | _argument3 = emptyConstExportArgument , |
||
const ExportArgument & | _argument4 = emptyConstExportArgument , |
||
const ExportArgument & | _argument5 = emptyConstExportArgument , |
||
const ExportArgument & | _argument6 = emptyConstExportArgument , |
||
const ExportArgument & | _argument7 = emptyConstExportArgument , |
||
const ExportArgument & | _argument8 = emptyConstExportArgument , |
||
const ExportArgument & | _argument9 = emptyConstExportArgument |
||
) |
Default constructor which optionally takes the name of the function to be called as well as possible calling arguments.
[in] | _name | Name of the function to be called. |
[in] | _argument1 | Calling argument no. 1. |
[in] | _argument2 | Calling argument no. 2. |
[in] | _argument3 | Calling argument no. 3. |
[in] | _argument4 | Calling argument no. 4. |
[in] | _argument5 | Calling argument no. 5. |
[in] | _argument6 | Calling argument no. 6. |
[in] | _argument7 | Calling argument no. 7. |
[in] | _argument8 | Calling argument no. 8. |
[in] | _argument9 | Calling argument no. 9. |
Definition at line 44 of file export_function_call.cpp.
ExportFunctionCall::ExportFunctionCall | ( | const ExportFunction & | _f, |
const ExportArgument & | _argument1 = emptyConstExportArgument , |
||
const ExportArgument & | _argument2 = emptyConstExportArgument , |
||
const ExportArgument & | _argument3 = emptyConstExportArgument , |
||
const ExportArgument & | _argument4 = emptyConstExportArgument , |
||
const ExportArgument & | _argument5 = emptyConstExportArgument , |
||
const ExportArgument & | _argument6 = emptyConstExportArgument , |
||
const ExportArgument & | _argument7 = emptyConstExportArgument , |
||
const ExportArgument & | _argument8 = emptyConstExportArgument , |
||
const ExportArgument & | _argument9 = emptyConstExportArgument |
||
) |
Constructor which optionally takes the function to be called as well as possible calling arguments.
[in] | _f | Function to be called. |
[in] | _argument1 | Calling argument no. 1. |
[in] | _argument2 | Calling argument no. 2. |
[in] | _argument3 | Calling argument no. 3. |
[in] | _argument4 | Calling argument no. 4. |
[in] | _argument5 | Calling argument no. 5. |
[in] | _argument6 | Calling argument no. 6. |
[in] | _argument7 | Calling argument no. 7. |
[in] | _argument8 | Calling argument no. 8. |
[in] | _argument9 | Calling argument no. 9. |
Definition at line 63 of file export_function_call.cpp.
ExportFunctionCall::ExportFunctionCall | ( | const ExportFunctionCall & | arg | ) |
Copy constructor (deep copy).
@param[in] arg Right-hand side object.
Definition at line 82 of file export_function_call.cpp.
|
virtual |
Destructor.
Definition at line 90 of file export_function_call.cpp.
|
protected |
Frees internal dynamic memory to yield an empty function call.
\return SUCCESSFUL_RETURN
Definition at line 211 of file export_function_call.cpp.
|
virtual |
Clone constructor (deep copy).
\return Pointer to cloned object.
Implements ExportStatement.
Definition at line 110 of file export_function_call.cpp.
|
virtual |
Exports source code of the function call into given file. Its appearance can can be adjusted by various options.
@param[in] stream Name of file to be used to export function call. @param[in] _realString std::string to be used to declare real variables. @param[in] _intString std::string to be used to declare integer variables. @param[in] _precision Number of digits to be used for exporting real values. \return SUCCESSFUL_RETURN, \n RET_MEMBER_NOT_INITIALISED
Implements ExportStatement.
Definition at line 189 of file export_function_call.cpp.
returnValue ExportFunctionCall::init | ( | const std::string & | _name = "defaultFunctionName" , |
const ExportArgument & | _argument1 = emptyConstExportArgument , |
||
const ExportArgument & | _argument2 = emptyConstExportArgument , |
||
const ExportArgument & | _argument3 = emptyConstExportArgument , |
||
const ExportArgument & | _argument4 = emptyConstExportArgument , |
||
const ExportArgument & | _argument5 = emptyConstExportArgument , |
||
const ExportArgument & | _argument6 = emptyConstExportArgument , |
||
const ExportArgument & | _argument7 = emptyConstExportArgument , |
||
const ExportArgument & | _argument8 = emptyConstExportArgument , |
||
const ExportArgument & | _argument9 = emptyConstExportArgument |
||
) |
Initializes function call with given name of the function and possible calling arguments.
@param[in] _name Name of the function to be called. @param[in] _argument1 Calling argument no. 1. @param[in] _argument2 Calling argument no. 2. @param[in] _argument3 Calling argument no. 3. @param[in] _argument4 Calling argument no. 4. @param[in] _argument5 Calling argument no. 5. @param[in] _argument6 Calling argument no. 6. @param[in] _argument7 Calling argument no. 7. @param[in] _argument8 Calling argument no. 8. @param[in] _argument9 Calling argument no. 9. \return SUCCESSFUL_RETURN
Definition at line 117 of file export_function_call.cpp.
returnValue ExportFunctionCall::init | ( | const ExportFunction & | _f, |
const ExportArgument & | _argument1 = emptyConstExportArgument , |
||
const ExportArgument & | _argument2 = emptyConstExportArgument , |
||
const ExportArgument & | _argument3 = emptyConstExportArgument , |
||
const ExportArgument & | _argument4 = emptyConstExportArgument , |
||
const ExportArgument & | _argument5 = emptyConstExportArgument , |
||
const ExportArgument & | _argument6 = emptyConstExportArgument , |
||
const ExportArgument & | _argument7 = emptyConstExportArgument , |
||
const ExportArgument & | _argument8 = emptyConstExportArgument , |
||
const ExportArgument & | _argument9 = emptyConstExportArgument |
||
) |
Initializes function call with function to be called and possible calling arguments.
@param[in] _f Function to be called. @param[in] _argument1 Calling argument no. 1. @param[in] _argument2 Calling argument no. 2. @param[in] _argument3 Calling argument no. 3. @param[in] _argument4 Calling argument no. 4. @param[in] _argument5 Calling argument no. 5. @param[in] _argument6 Calling argument no. 6. @param[in] _argument7 Calling argument no. 7. @param[in] _argument8 Calling argument no. 8. @param[in] _argument9 Calling argument no. 9. \return SUCCESSFUL_RETURN, \n RET_INVALID_CALL_TO_EXPORTED_FUNCTION
Definition at line 150 of file export_function_call.cpp.
ExportFunctionCall & ExportFunctionCall::operator= | ( | const ExportFunctionCall & | arg | ) |
Assignment operator (deep copy).
@param[in] arg Right-hand side object.
Definition at line 96 of file export_function_call.cpp.
|
protected |
Sets the name of the function to be called.
@param[in] _name New name of the function to be called. \return SUCCESSFUL_RETURN
Definition at line 221 of file export_function_call.cpp.
|
protected |
List of calling arguments.
Definition at line 240 of file export_function_call.hpp.
|
protected |
Name of function to be called.
Definition at line 239 of file export_function_call.hpp.