Base class for all kind of statements to be exported by the code generation tool. More...
#include <export_statement.hpp>
Public Types | |
typedef std::tr1::shared_ptr < MemoryAllocator > | MemoryAllocatorPtr |
typedef std::tr1::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 () |
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 63 of file export_statement.hpp.
typedef std::tr1::shared_ptr< MemoryAllocator > ExportStatement::MemoryAllocatorPtr |
Shared pointer to a memory allocator
Definition at line 77 of file export_statement.hpp.
typedef std::tr1::shared_ptr< ExportStatement > ExportStatement::StatementPtr |
Shared pointer to a statement.
Definition at line 71 of file export_statement.hpp.
typedef std::vector< StatementPtr > ExportStatement::StatementPtrArray |
A vector of shared pointer statements.
Definition at line 74 of file export_statement.hpp.
Default constructor.
Definition at line 43 of file export_statement.cpp.
ExportStatement::ExportStatement | ( | const ExportStatement & | arg | ) |
Copy constructor (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 48 of file export_statement.cpp.
ExportStatement::~ExportStatement | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file export_statement.cpp.
virtual ExportStatement& ExportStatement::acquire | ( | ExportIndex & | ) | [inline, virtual] |
Acquire an index.
Reimplemented in ExportFunction.
Definition at line 139 of file export_statement.hpp.
virtual ExportStatement& ExportStatement::allocate | ( | MemoryAllocatorPtr | ) | [inline, virtual] |
Set a memory allocator.
Reimplemented in ExportForLoop, and ExportArithmeticStatement.
Definition at line 151 of file export_statement.hpp.
virtual ExportStatement* ExportStatement::clone | ( | ) | const [pure virtual] |
Clone constructor (deep copy).
Implemented in ExportFunctionCall, ExportDataDeclaration, ExportForLoop, ExportFunction, ExportArithmeticStatement, ExportStatementBlock, ExportAcadoFunction, ExportFunctionDeclaration, and ExportStatementString.
virtual returnValue ExportStatement::exportCode | ( | std::ostream & | stream, |
const std::string & | _realString = "real_t" , |
||
const std::string & | _intString = "int" , |
||
int | _precision = 16 |
||
) | const [pure virtual] |
Exports source code of the statement into given file. Its appearance can can be adjusted by various options.
[in] | stream | Name of file to be used to export statement. |
[in] | _realString | std::string to be used to declare real variables. |
[in] | _intString | std::string to be used to declare integer variables. |
[in] | _precision | Number of digits to be used for exporting real values. |
Implemented in ExportStatementBlock, ExportFunction, ExportFunctionCall, ExportAcadoFunction, ExportForLoop, ExportArithmeticStatement, ExportDataDeclaration, ExportFunctionDeclaration, and ExportStatementString.
returnValue ExportStatement::exportDataDeclaration | ( | std::ostream & | stream, |
const std::string & | _realString = "real_t" , |
||
const std::string & | _intString = "int" , |
||
int | _precision = 16 |
||
) | const [virtual] |
Exports data declaration of the statement into given file. Its appearance can can be adjusted by various options.
[in] | stream | Name of file to be used to export statement. |
[in] | _realString | std::string to be used to declare real variables. |
[in] | _intString | std::string to be used to declare integer variables. |
[in] | _precision | Number of digits to be used for exporting real values. |
Reimplemented in ExportStatementBlock, ExportFunction, ExportForLoop, ExportAcadoFunction, and ExportArithmeticStatement.
Definition at line 72 of file export_statement.cpp.
ExportStatement & ExportStatement::operator= | ( | const ExportStatement & | arg | ) |
Assignment operator (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 59 of file export_statement.cpp.
virtual ExportStatement& ExportStatement::release | ( | const ExportIndex & | ) | [inline, virtual] |
Release an index.
Reimplemented in ExportFunction.
Definition at line 145 of file export_statement.hpp.