63 init( _name,_argument1,_argument2,_argument3,
64 _argument4,_argument5,_argument6,
65 _argument7,_argument8,_argument9 );
94 _argument4,_argument5,_argument6,
95 _argument7,_argument8,_argument9 );
114 _argument1,_argument2,_argument3,
115 _argument4,_argument5,_argument6,
116 _argument7,_argument8,_argument9 );
135 _argument4,_argument5,_argument6,
136 _argument7,_argument8,_argument9 );
142 bool _returnAsPointer
155 if ( _name.empty() == true )
172 const std::string& _realString,
173 const std::string& _intString,
182 const std::string& _realString,
183 const std::string& _intString,
204 for (
unsigned i = 0; i < args.size(); ++i)
206 if (args[ i ].isGiven() ==
true || args[ i ].getDoc().empty() ==
true)
209 stream <<
" * \\param " << args[ i ].getName() <<
" " << args[ i ].getDoc() << endl;
220 if (tmp.empty() ==
false)
221 stream <<
" *\n * \\return " << tmp << endl;
238 stream <<
" " <<
name <<
"( ";
247 const std::string& _realString,
248 const std::string& _intString,
272 stream <<
" " <<
name <<
"( ";
282 StatementPtrArray::const_iterator it =
statements.begin();
295 const std::vector< ExportIndex > indices =
memAllocator->getPool();
296 for (
unsigned i = 0; i < indices.size(); ++i)
virtual returnValue exportCode(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
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)
ExportFunction(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)
unsigned getNumArguments() const
ExportFunction & setName(const std::string &_name)
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)
virtual returnValue exportForwardDeclaration(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
Allows to pass back messages to the calling function.
virtual ~ExportFunction()
#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
virtual bool isPrivate() 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.
std::string getTypeString(const std::string &_realString="real_t", const std::string &_intString="int") const
ExportFunction & setup(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)
virtual std::string getDoc() const
virtual ExportFunction & doc(const std::string &_doc)
virtual bool isDefined() const
virtual returnValue exportDataDeclaration(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
static std::string fcnPrefix
virtual ExportStatement * clone() const
const std::vector< ExportArgument > & get() const
virtual returnValue exportCode(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
ExportStruct getDataStruct() const
virtual ExportFunction & setPrivate(bool _set=true)
virtual returnValue exportDataDeclaration(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) 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
StatementPtrArray statements
std::string getFullName() const
uint getNumArguments() const
ExportFunction & setReturnValue(const ExportVariable &_functionReturnValue, bool _returnAsPointer=false)
virtual ExportFunction & acquire(ExportIndex &obj)
ExportFunction & addVariable(const ExportVariable &_var)
std::string getName() const
virtual ExportFunction & release(const ExportIndex &obj)
A deepcopy(const A &a)
Make a deep copy of an object (Note: default is a shallow copy!)
uint getNumStatements() const
#define BEGIN_NAMESPACE_ACADO
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)
std::vector< ExportVariable > localVariables
std::shared_ptr< MemoryAllocator > MemoryAllocatorPtr
Allows to export code for a block of statements.
ExportFunction & addIndex(const ExportIndex &_index)
ExportArgumentList functionArguments
#define ACADOERROR(retval)
Defines a matrix-valued variable to be used for exporting code.
MemoryAllocatorPtr memAllocator