35 #ifndef ACADO_TOOLKIT_EXPORT_FUNCTION_HPP 36 #define ACADO_TOOLKIT_EXPORT_FUNCTION_HPP 186 bool _returnAsPointer =
false 207 const std::string& _realString =
"real_t",
208 const std::string& _intString =
"int",
223 const std::string& _realString =
"real_t",
224 const std::string& _intString =
"int",
239 const std::string& _realString =
"real_t",
240 const std::string& _intString =
"int",
303 #endif // ACADO_TOOLKIT_EXPORT_FUNCTION_HPP 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 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.
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 ExportFunction & doc(const std::string &_doc)
virtual bool isDefined() const
Allows to store a list of calling arguments of an ExportFunction.
virtual ExportStatement * clone() 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.
static const ExportArgument emptyConstExportArgument
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)
#define BEGIN_NAMESPACE_ACADO
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
Defines a matrix-valued variable to be used for exporting code.
MemoryAllocatorPtr memAllocator