Allows to export code of a for-loop. More...
#include <export_for_loop.hpp>

Public Member Functions | |
| ExportForLoop & | allocate (MemoryAllocatorPtr allocator) |
| virtual ExportStatement * | clone () const |
| virtual returnValue | exportCode (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const |
| virtual returnValue | exportDataDeclaration (std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const |
| ExportForLoop (const ExportIndex &_loopVariable=emptyConstExportIndex, const ExportIndex &_startValue=emptyConstExportIndex, const ExportIndex &_finalValue=emptyConstExportIndex, const ExportIndex &_increment=constExportIndexValueOne, bool _doLoopUnrolling=false) | |
| ExportForLoop (const ExportForLoop &arg) | |
| returnValue | init (const ExportIndex &_loopVariable, const ExportIndex &_startValue, const ExportIndex &_finalValue, const ExportIndex &_increment, bool _doLoopUnrolling) |
| ExportForLoop & | keepLoop () |
| ExportForLoop & | operator= (const ExportForLoop &arg) |
| ExportForLoop & | unrollLoop () |
| virtual | ~ExportForLoop () |
Protected Member Functions | |
| returnValue | clear () |
Protected Attributes | |
| bool | doLoopUnrolling |
| ExportIndex | finalValue |
| ExportIndex | increment |
| ExportIndex | loopVariable |
| ExportIndex | startValue |
Private Member Functions | |
| returnValue | sanityCheck (void) const |
Allows to export code of a for-loop.
The class ExportForLoop allows to export code of a for-loop.
Definition at line 56 of file export_for_loop.hpp.
| ExportForLoop::ExportForLoop | ( | const ExportIndex & | _loopVariable = emptyConstExportIndex, |
| const ExportIndex & | _startValue = emptyConstExportIndex, |
||
| const ExportIndex & | _finalValue = emptyConstExportIndex, |
||
| const ExportIndex & | _increment = constExportIndexValueOne, |
||
| bool | _doLoopUnrolling = false |
||
| ) |
Default constructor which optionally takes the name of the loop variable as well as other loop settings.
| [in] | _loopVariable | Name of the loop variable. |
| [in] | _startValue | Start value of the loop counter. |
| [in] | _finalValue | Final value of the loop counter. |
| [in] | _increment | Increment of the loop counter. |
| [in] | _doLoopUnrolling | Flag indicating whether loop shall be unrolled. |
Definition at line 46 of file export_for_loop.cpp.
| ExportForLoop::ExportForLoop | ( | const ExportForLoop & | arg | ) |
Copy constructor (deep copy).
| [in] | arg | Right-hand side object. |
Definition at line 62 of file export_for_loop.cpp.
| ExportForLoop::~ExportForLoop | ( | ) | [virtual] |
Destructor.
Definition at line 72 of file export_for_loop.cpp.
| ExportForLoop & ExportForLoop::allocate | ( | MemoryAllocatorPtr | ) | [virtual] |
Set a memory allocator.
Reimplemented from ExportStatement.
Definition at line 197 of file export_for_loop.cpp.
| returnValue ExportForLoop::clear | ( | ) | [protected] |
Frees internal dynamic memory to yield an empty for-loop.
Reimplemented from ExportStatementBlock.
Definition at line 215 of file export_for_loop.cpp.
| ExportStatement * ExportForLoop::clone | ( | ) | const [virtual] |
Clone constructor (deep copy).
Reimplemented from ExportStatementBlock.
Definition at line 90 of file export_for_loop.cpp.
| returnValue ExportForLoop::exportCode | ( | std::ostream & | stream, |
| const std::string & | _realString = "real_t", |
||
| const std::string & | _intString = "int", |
||
| int | _precision = 16 |
||
| ) | const [virtual] |
Exports source code of the statement into given file. Its appearance can can be adjusted by various options.
| [in] | file | 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 from ExportStatementBlock.
Definition at line 127 of file export_for_loop.cpp.
| returnValue ExportForLoop::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 from ExportStatementBlock.
Definition at line 117 of file export_for_loop.cpp.
| returnValue ExportForLoop::init | ( | const ExportIndex & | _loopVariable, |
| const ExportIndex & | _startValue, | ||
| const ExportIndex & | _finalValue, | ||
| const ExportIndex & | _increment, | ||
| bool | _doLoopUnrolling | ||
| ) |
Initializes for-loop with given loop settings.
| [in] | _loopVariable | Name of the loop variable. |
| [in] | _startValue | Start value of the loop counter. |
| [in] | _finalValue | Final value of the loop counter. |
| [in] | _increment | Increment of the loop counter. |
| [in] | _doLoopUnrolling | Flag indicating whether loop shall be unrolled. |
Definition at line 96 of file export_for_loop.cpp.
Specifies not to unroll for-loop.
Definition at line 191 of file export_for_loop.cpp.
| ExportForLoop & ExportForLoop::operator= | ( | const ExportForLoop & | arg | ) |
Assignment operator (deep copy).
| [in] | arg | Right-hand side object. |
Definition at line 78 of file export_for_loop.cpp.
| returnValue ExportForLoop::sanityCheck | ( | void | ) | const [private] |
Definition at line 223 of file export_for_loop.cpp.
Specifies to unroll for-loop.
Definition at line 184 of file export_for_loop.cpp.
bool ExportForLoop::doLoopUnrolling [protected] |
Flag indicating whether loop shall be unrolled when exporting the code.
Definition at line 192 of file export_for_loop.hpp.
ExportIndex ExportForLoop::finalValue [protected] |
Final value of the loop counter.
Definition at line 189 of file export_for_loop.hpp.
ExportIndex ExportForLoop::increment [protected] |
Increment of the loop counter.
Definition at line 190 of file export_for_loop.hpp.
ExportIndex ExportForLoop::loopVariable [protected] |
Loop variable.
Definition at line 187 of file export_for_loop.hpp.
ExportIndex ExportForLoop::startValue [protected] |
Start value of the loop counter.
Definition at line 188 of file export_for_loop.hpp.