|
Aseba
1.5.5
|
Node for assembling values into an array children[x] is the x-th Node to be assembled. More...
#include <tree.h>
Public Member Functions | |
| TupleVectorNode (const SourcePos &sourcePos) | |
| Constructor. | |
| TupleVectorNode (const SourcePos &sourcePos, int value) | |
| virtual TupleVectorNode * | shallowCopy () |
| Return a shallow copy of the object (children point to the same objects) | |
| virtual Node * | expandAbstractNodes (std::wostream *dump) |
| Dummy function, the node will be expanded during the vectorial pass. | |
| virtual Node * | expandVectorialNodes (std::wostream *dump, Compiler *compiler=0, unsigned int index=0) |
| Expand to vector[index]. | |
| virtual std::wstring | toWString () const |
| Return a string representation of this node. | |
| virtual std::wstring | toNodeName () const |
| Return a string representation of the name of this node. | |
| virtual void | dump (std::wostream &dest, unsigned &indent) const |
| Dump this node and the rest of the tree. | |
| virtual unsigned | getVectorSize () const |
| return the children's size, check for equal size, or E_NOVAL if no child | |
| virtual bool | isImmediateVector () const |
| virtual int | getImmediateValue (unsigned index) const |
| return the n-th vector's element | |
| virtual void | addImmediateValue (int value) |
Public Member Functions inherited from Aseba::AbstractTreeNode | |
| AbstractTreeNode (const SourcePos &sourcePos) | |
| Constructor. | |
| virtual ReturnType | typeCheck (Compiler *compiler) |
| Typecheck this node, throw an exception if there is any type violation. | |
| virtual Node * | optimize (std::wostream *dump) |
| Optimize this node, return the optimized node. | |
| virtual unsigned | getStackDepth () const |
| Return the stack depth requirement for this node and its children. | |
| virtual void | emit (PreLinkBytecode &bytecodes) const |
| Generate bytecode. | |
Public Member Functions inherited from Aseba::Node | |
| Node (const SourcePos &sourcePos) | |
| Constructor. | |
| virtual | ~Node () |
| Destructor, delete all children. | |
| virtual Node * | deepCopy () |
| Return a deep copy of the object (children are also copied) | |
| virtual void | checkVectorSize () const |
| Check the consistency in vectors' size. | |
| std::wstring | typeName (const Node::ReturnType &type) const |
| Return the name of a type. | |
| void | expectType (const Node::ReturnType &expected, const Node::ReturnType &type) const |
| Check for a specific type, throw an exception otherwise. | |
| virtual unsigned | getVectorAddr () const |
| return the address of the left-most operand, or E_NOVAL if none | |
Additional Inherited Members | |
Public Types inherited from Aseba::Node | |
| enum | ReturnType { TYPE_UNIT = 0, TYPE_BOOL, TYPE_INT } |
| A type a node can return. | |
| enum | MemoryErrorCode { E_NOVAL = UINT_MAX } |
| typedef std::vector< Node * > | NodesVector |
| Vector for children of a node. | |
Public Attributes inherited from Aseba::Node | |
| NodesVector | children |
| children of this node | |
| SourcePos | sourcePos |
| position is source | |
1.8.11