Public Member Functions | Public Attributes
Aseba::MemoryVectorNode Struct Reference

#include <tree.h>

Inheritance diagram for Aseba::MemoryVectorNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual NodeexpandToAsebaTree (std::wostream *dump, unsigned int index=0)
 Second pass to expand "abstract" nodes into more concrete ones.
virtual unsigned getVectorAddr () const
virtual unsigned getVectorSize () const
 return the vector's length
bool isAddressStatic () const
 return whether this node accesses a static address
 MemoryVectorNode (const SourcePos &sourcePos, unsigned arrayAddr, unsigned arraySize, const std::wstring &arrayName)
 Constructor.
virtual void setWrite (bool write)
virtual MemoryVectorNodeshallowCopy ()
 Return a shallow copy of the object (children point to the same objects)
virtual std::wstring toNodeName () const
 Return a string representation of the name of this node.
virtual std::wstring toWString () const
 Return a string representation of this node.

Public Attributes

unsigned arrayAddr
 address of the first element of the array
std::wstring arrayName
 name of the array (for debug)
unsigned arraySize
 size of the array, might be used to assert compile-time access checks
bool write
 expand to a node for storing or loading data?

Detailed Description

Node for accessing a memory as a vector, in read or write operations If write == true, will expand to StoreNode or ArrayWriteNode If write == false, will expand to LoadNode or ArrayReadNode children[0] is an optional index If children[0] is a StaticVector of one elements (int), it will be foo[x] If children[0] is a StaticVector of two elements (int), it will be foo[x:y] If children[0] is another type of node, it will be foo[whatever] If children[0] doesn't exist, access to the full array is considered

Definition at line 524 of file tree.h.


Member Function Documentation

Node * Aseba::MemoryVectorNode::expandToAsebaTree ( std::wostream *  dump,
unsigned int  index = 0 
) [virtual]

Second pass to expand "abstract" nodes into more concrete ones.

Reimplemented from Aseba::Node.

Definition at line 104 of file tree-expand.cpp.

unsigned Aseba::MemoryVectorNode::getVectorAddr ( ) const [virtual]

return the compile-time base address of the memory range, taking into account an immediate index foo[n] or foo[n:m] return E_NOVAL if foo[expr]

Reimplemented from Aseba::Node.

Definition at line 322 of file tree-expand.cpp.

unsigned Aseba::MemoryVectorNode::getVectorSize ( ) const [virtual]

return the vector's length

Reimplemented from Aseba::Node.

Definition at line 348 of file tree-expand.cpp.

return whether this node accesses a static address

Definition at line 387 of file tree-expand.cpp.

virtual void Aseba::MemoryVectorNode::setWrite ( bool  write) [inline, virtual]

Definition at line 542 of file tree.h.

Return a shallow copy of the object (children point to the same objects)

Implements Aseba::Node.

Definition at line 532 of file tree.h.

virtual std::wstring Aseba::MemoryVectorNode::toNodeName ( ) const [inline, virtual]

Return a string representation of the name of this node.

Implements Aseba::Node.

Definition at line 536 of file tree.h.


Member Data Documentation

address of the first element of the array

Definition at line 526 of file tree.h.

name of the array (for debug)

Definition at line 528 of file tree.h.

size of the array, might be used to assert compile-time access checks

Definition at line 527 of file tree.h.

expand to a node for storing or loading data?

Definition at line 529 of file tree.h.


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


aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17