Base class for all kind of statements to be exported by the code generation tool. More...
#include <export_statement.hpp>
Public Types | |
typedef std::shared_ptr< MemoryAllocator > | MemoryAllocatorPtr |
typedef std::shared_ptr< ExportStatement > | StatementPtr |
typedef std::vector< StatementPtr > | StatementPtrArray |
Public Member Functions | |
virtual ExportStatement & | acquire (ExportIndex &) |
virtual ExportStatement & | allocate (MemoryAllocatorPtr) |
virtual ExportStatement * | clone () const =0 |
virtual returnValue | exportCode (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const =0 |
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) | |
ExportStatement & | operator= (const ExportStatement &arg) |
virtual ExportStatement & | release (const ExportIndex &) |
virtual | ~ExportStatement () |
Static Public Attributes | |
static std::string | fcnPrefix = "acado" |
static std::string | varPrefix = "ACADO" |
Base class for all kind of statements to be exported by the code generation tool.
The class ExportStatement serves as a base class for all kind of statements to be exported by the code generation tool.
Definition at line 59 of file export_statement.hpp.
typedef std::shared_ptr< MemoryAllocator > ExportStatement::MemoryAllocatorPtr |
Shared pointer to a memory allocator
Definition at line 73 of file export_statement.hpp.
typedef std::shared_ptr< ExportStatement > ExportStatement::StatementPtr |
Shared pointer to a statement.
Definition at line 67 of file export_statement.hpp.
typedef std::vector< StatementPtr > ExportStatement::StatementPtrArray |
A vector of shared pointer statements.
Definition at line 70 of file export_statement.hpp.
ExportStatement::ExportStatement | ( | ) |
Default constructor.
Definition at line 46 of file export_statement.cpp.
ExportStatement::ExportStatement | ( | const ExportStatement & | arg | ) |
Copy constructor (deep copy).
@param[in] arg Right-hand side object.
Definition at line 51 of file export_statement.cpp.
|
virtual |
Destructor.
Definition at line 57 of file export_statement.cpp.
|
inlinevirtual |
Acquire an index.
Reimplemented in ExportFunction.
Definition at line 135 of file export_statement.hpp.
|
inlinevirtual |
Set a memory allocator.
Reimplemented in ExportForLoop, and ExportArithmeticStatement.
Definition at line 147 of file export_statement.hpp.
|
pure virtual |
Clone constructor (deep copy).
\return Pointer to cloned object.
Implemented in ExportFunctionCall, ExportDataDeclaration, ExportForLoop, ExportArithmeticStatement, ExportStatementBlock, ExportFunction, ExportAcadoFunction, ExportFunctionDeclaration, and ExportStatementString.
|
pure virtual |
Exports source code of the statement into given file. Its appearance can can be adjusted by various options.
@param[in] stream Name of file to be used to export statement. @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
Implemented in ExportStatementBlock, ExportFunction, ExportFunctionCall, ExportAcadoFunction, ExportForLoop, ExportArithmeticStatement, ExportDataDeclaration, ExportFunctionDeclaration, and ExportStatementString.
|
virtual |
Exports data declaration of the statement into given file. Its appearance can can be adjusted by various options.
@param[in] stream Name of file to be used to export statement. @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
Reimplemented in ExportStatementBlock, ExportFunction, ExportForLoop, ExportAcadoFunction, and ExportArithmeticStatement.
Definition at line 75 of file export_statement.cpp.
ExportStatement & ExportStatement::operator= | ( | const ExportStatement & | arg | ) |
Assignment operator (deep copy).
@param[in] arg Right-hand side object.
Definition at line 62 of file export_statement.cpp.
|
inlinevirtual |
Release an index.
Reimplemented in ExportFunction.
Definition at line 141 of file export_statement.hpp.
|
static |
Definition at line 154 of file export_statement.hpp.
|
static |
Definition at line 155 of file export_statement.hpp.