Public Types | Public Member Functions | Static Public Attributes | List of all members

Base class for all kind of statements to be exported by the code generation tool. More...

#include <export_statement.hpp>

Inheritance diagram for ExportStatement:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< MemoryAllocatorMemoryAllocatorPtr
 
typedef std::shared_ptr< ExportStatementStatementPtr
 
typedef std::vector< StatementPtrStatementPtrArray
 

Public Member Functions

virtual ExportStatementacquire (ExportIndex &)
 
virtual ExportStatementallocate (MemoryAllocatorPtr)
 
virtual ExportStatementclone () 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)
 
ExportStatementoperator= (const ExportStatement &arg)
 
virtual ExportStatementrelease (const ExportIndex &)
 
virtual ~ExportStatement ()
 

Static Public Attributes

static std::string fcnPrefix = "acado"
 
static std::string varPrefix = "ACADO"
 

Detailed Description

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.

Authors
Hans Joachim Ferreau, Boris Houska, Milan Vukov

Definition at line 59 of file export_statement.hpp.

Member Typedef Documentation

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.

A vector of shared pointer statements.

Definition at line 70 of file export_statement.hpp.

Constructor & Destructor Documentation

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.

ExportStatement::~ExportStatement ( )
virtual

Destructor.

Definition at line 57 of file export_statement.cpp.

Member Function Documentation

virtual ExportStatement& ExportStatement::acquire ( ExportIndex )
inlinevirtual

Acquire an index.

Reimplemented in ExportFunction.

Definition at line 135 of file export_statement.hpp.

virtual ExportStatement& ExportStatement::allocate ( MemoryAllocatorPtr  )
inlinevirtual

Set a memory allocator.

Reimplemented in ExportForLoop, and ExportArithmeticStatement.

Definition at line 147 of file export_statement.hpp.

virtual ExportStatement* ExportStatement::clone ( ) const
pure virtual
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.

@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.

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.

@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.

virtual ExportStatement& ExportStatement::release ( const ExportIndex )
inlinevirtual

Release an index.

Reimplemented in ExportFunction.

Definition at line 141 of file export_statement.hpp.

Member Data Documentation

BEGIN_NAMESPACE_ACADO std::string ExportStatement::fcnPrefix = "acado"
static

Definition at line 154 of file export_statement.hpp.

std::string ExportStatement::varPrefix = "ACADO"
static

Definition at line 155 of file export_statement.hpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:24