ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Protected Member Functions | Protected Attributes

Allows to store a list of calling arguments of an ExportFunction. More...

#include <export_argument_list.hpp>

List of all members.

Public Member Functions

 ExportArgumentList ()
 < Default Constructor.
 ExportArgumentList (const ExportArgument &_argument1, 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 takes up to nine calling arguments.
 ExportArgumentList (const ExportArgumentList &arg)
 Copy constructor (deep copy).
virtual ~ExportArgumentList ()
 Destructor.
ExportArgumentListoperator= (const ExportArgumentList &rhs)
 Assignment operator (deep copy).
returnValue addArgument (const ExportArgument &_argument1, 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)
 Adds up to nine calling arguments to the list.
uint getNumArguments () const
 Return number of calling arguments in list.
virtual returnValue exportCode (FILE *file, const String &_realString="real_t", const String &_intString="int", int _precision=16) const
 Exports a code snippet containing all calling arguments of the list.
returnValue clear ()
 Removes all calling arguments to yield an empty argument list.
returnValue doIncludeType ()
 Specifies to include variable types into calling arguments.
returnValue doNotIncludeType ()
 Specifies not to include variable types into calling arguments.
const std::vector
< ExportArgument > & 
get () const
 Get the list of arguments.

Protected Member Functions

returnValue addSingleArgument (const ExportArgument &_argument)
 Adds a single calling arguments to the list.

Protected Attributes

std::vector< ExportArgumentarguments
 Array containing all calling arguments.
BooleanType includeType
 Flag indicating whether variable types are to be included in calling arguments.

Detailed Description

The class ExportArgumentList allows to store a list of calling arguments of an ExportFunction.

Author:
Hans Joachim Ferreau, Boris Houska

Constructor & Destructor Documentation

References doIncludeType().

ExportArgumentList::ExportArgumentList ( const ExportArgument _argument1,
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 
)
Parameters:
[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.

References addArgument().

Parameters:
[in]argRight-hand side object.

References arguments, and includeType.

References clear().


Member Function Documentation

Parameters:
[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.
Returns:
SUCCESSFUL_RETURN

References addSingleArgument(), and SUCCESSFUL_RETURN.

Referenced by ExportFunction::addArgument(), ExportArgumentList(), and ExportFunctionCall::init().

Parameters:
[in]_argumentCalling argument.
Returns:
SUCCESSFUL_RETURN

References arguments, ExportArgument::getDim(), and SUCCESSFUL_RETURN.

Referenced by addArgument().

Returns:
SUCCESSFUL_RETURN

References doIncludeType(), and SUCCESSFUL_RETURN.

Referenced by ExportFunctionCall::clear(), operator=(), and ~ExportArgumentList().

Returns:
SUCCESSFUL_RETURN

References BT_TRUE, includeType, and SUCCESSFUL_RETURN.

Referenced by clear(), and ExportArgumentList().

Returns:
SUCCESSFUL_RETURN

References BT_FALSE, includeType, and SUCCESSFUL_RETURN.

Referenced by ExportFunctionCall::clear().

returnValue ExportArgumentList::exportCode ( FILE *  file,
const String _realString = "real_t",
const String _intString = "int",
int  _precision = 16 
) const [virtual]

Its appearance can can be adjusted by various options.

Parameters:
[in]fileName of file to be used to export function.
[in]_realStringString to be used to declare real variables.
[in]_intStringString to be used to declare integer variables.
[in]_precisionNumber of digits to be used for exporting real values.
Returns:
SUCCESSFUL_RETURN

References acadoFPrintf(), arguments, BT_FALSE, BT_TRUE, includeType, INT, STATIC_CONST_INT, STATIC_CONST_REAL, and SUCCESSFUL_RETURN.

Referenced by ExportFunctionCall::exportCode(), ExportFunction::exportCode(), and ExportFunction::exportForwardDeclaration().

const std::vector< ExportArgument > & ExportArgumentList::get ( ) const
Returns:
Argument list

References arguments.

Referenced by ExportFunction::exportForwardDeclaration().

Returns:
Number of calling arguments

References arguments.

Referenced by ExportFunction::exportForwardDeclaration(), ExportFunction::getNumArguments(), and ExportFunctionCall::init().

ExportArgumentList & ExportArgumentList::operator= ( const ExportArgumentList rhs)
Parameters:
[in]argRight-hand side object.

References arguments, clear(), and includeType.


Member Data Documentation

std::vector< ExportArgument > ExportArgumentList::arguments [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines