128 _argument1,_argument2,_argument3,
129 _argument4,_argument5,_argument6,
130 _argument7,_argument8,_argument9 );
149 _argument1,_argument2,_argument3,
150 _argument4,_argument5,_argument6,
151 _argument7,_argument8,_argument9 );
163 if ( _data.
getDim() == 0 )
218 std::stringstream ss;
221 for (
uint i = 1; i < num; ++i)
231 std::stringstream ss; ss <<
"/* " << _comment <<
" */\n";
237 const std::string& _comment
240 std::stringstream ss;
241 for(
unsigned i = 0; i < _nBlanks; ++i)
243 ss <<
"/* " << _comment <<
" */\n";
258 const std::string& _realString,
259 const std::string& _intString,
263 StatementPtrArray::const_iterator it =
statements.begin();
265 if ((*it)->exportDataDeclaration(stream, _realString, _intString, _precision) !=
SUCCESSFUL_RETURN)
274 const std::string& _realString,
275 const std::string& _intString,
279 StatementPtrArray::const_iterator it =
statements.begin();
281 if ((*it)->exportCode(stream, _realString, _intString, _precision) !=
SUCCESSFUL_RETURN)
Allows to export code containing variable declarations.
Allows to export code of an ACADO function.
Allows to pass back messages to the calling function.
Allows to export code containing function (forward) declarations.
returnValue addComment(const std::string &_comment)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
ExportStatement & operator=(const ExportStatement &arg)
#define CLOSE_NAMESPACE_ACADO
virtual returnValue exportCode(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
Defines a scalar-valued index variable to be used for exporting code.
Defines a matrix-valued variable that can be passed as argument to exported functions.
virtual ~ExportStatementBlock()
virtual ExportStatement * clone() const =0
virtual ExportStatement * clone() const
Allows to export code writing a string.
Allows to export code of a function call.
ExportStruct getDataStruct() const
Base class for all kind of statements to be exported by the code generation tool. ...
Allows to export code of an arbitrary function.
virtual uint getDim() const
returnValue addStatement(const ExportStatement &_statement)
StatementPtrArray statements
returnValue addLinebreak(uint num=1)
returnValue addDeclaration(const ExportVariable &_data, ExportStruct _dataStruct=ACADO_ANY)
friend ExportStatementBlock & operator<<(ExportStatementBlock &_block, const ExportStatement &_statement)
uint getNumStatements() const
#define BEGIN_NAMESPACE_ACADO
std::shared_ptr< ExportStatement > StatementPtr
returnValue addFunction(const ExportFunction &_function)
virtual returnValue exportDataDeclaration(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
ExportStatementBlock & operator=(const ExportStatementBlock &rhs)
Allows to export code for a block of statements.
#define ACADOERROR(retval)
Defines a matrix-valued variable to be used for exporting code.
returnValue addFunctionCall(const std::string &_fName, 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)