Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Allows to export code of a function call. More...

#include <export_function_call.hpp>

Inheritance diagram for ExportFunctionCall:
Inheritance graph
[legend]

Public Member Functions

virtual ExportStatementclone () const
 
virtual returnValue exportCode (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
 
 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)
 
 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)
 
 ExportFunctionCall (const ExportFunctionCall &arg)
 
returnValue 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)
 
returnValue 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)
 
ExportFunctionCalloperator= (const ExportFunctionCall &arg)
 
virtual ~ExportFunctionCall ()
 
- Public Member Functions inherited from ExportStatement
virtual ExportStatementacquire (ExportIndex &)
 
virtual ExportStatementallocate (MemoryAllocatorPtr)
 
virtual returnValue exportDataDeclaration (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
 
 ExportStatement ()
 
 ExportStatement (const ExportStatement &arg)
 
ExportStatementoperator= (const ExportStatement &arg)
 
virtual ExportStatementrelease (const ExportIndex &)
 
virtual ~ExportStatement ()
 

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< MemoryAllocatorMemoryAllocatorPtr
 
typedef std::shared_ptr< ExportStatementStatementPtr
 
typedef std::vector< StatementPtrStatementPtrArray
 
- Static Public Attributes inherited from ExportStatement
static std::string fcnPrefix = "acado"
 
static std::string varPrefix = "ACADO"
 

Detailed Description

Allows to export code of a function call.

The class ExportFunctionCall allows to export code of a function call.

Author
Hans Joachim Ferreau, Boris Houska

Definition at line 57 of file export_function_call.hpp.

Constructor & Destructor Documentation

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.

Parameters
[in]_nameName of the function to be called.
[in]_argument1Calling argument no. 1.
[in]_argument2Calling argument no. 2.
[in]_argument3Calling argument no. 3.
[in]_argument4Calling argument no. 4.
[in]_argument5Calling argument no. 5.
[in]_argument6Calling argument no. 6.
[in]_argument7Calling argument no. 7.
[in]_argument8Calling argument no. 8.
[in]_argument9Calling 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.

Parameters
[in]_fFunction to be called.
[in]_argument1Calling argument no. 1.
[in]_argument2Calling argument no. 2.
[in]_argument3Calling argument no. 3.
[in]_argument4Calling argument no. 4.
[in]_argument5Calling argument no. 5.
[in]_argument6Calling argument no. 6.
[in]_argument7Calling argument no. 7.
[in]_argument8Calling argument no. 8.
[in]_argument9Calling 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.

ExportFunctionCall::~ExportFunctionCall ( )
virtual

Destructor.

Definition at line 90 of file export_function_call.cpp.

Member Function Documentation

returnValue ExportFunctionCall::clear ( )
protected

Frees internal dynamic memory to yield an empty function call.

\return SUCCESSFUL_RETURN

Definition at line 211 of file export_function_call.cpp.

ExportStatement * ExportFunctionCall::clone ( ) const
virtual

Clone constructor (deep copy).

\return Pointer to cloned object.

Implements ExportStatement.

Definition at line 110 of file export_function_call.cpp.

returnValue ExportFunctionCall::exportCode ( std::ostream &  stream,
const std::string &  _realString = "real_t",
const std::string &  _intString = "int",
int  _precision = 16 
) const
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.

returnValue ExportFunctionCall::setName ( const std::string &  _name)
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.

Member Data Documentation

ExportArgumentList ExportFunctionCall::functionArguments
protected

List of calling arguments.

Definition at line 240 of file export_function_call.hpp.

std::string ExportFunctionCall::name
protected

Name of function to be called.

Definition at line 239 of file export_function_call.hpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:23