Program Class Reference

Node of the abstract syntaxing tree of an HMDL file. More...

#include <program.h>

List of all members.

Classes

class  _const_iterator
class  Memory

Public Types

typedef _const_iterator
< Object::iterator
const_iterator
typedef _const_iterator
< Object::reverse_iterator
const_reverse_iterator

Public Member Functions

 Program ()
bool isValid () const
 Check if the program has been successfully loaded.
uint32_t tag () const
 Get the type representing the type of the node.
const Variantpayload () const
 Get the value of the leaf node.
int size () const
 Get the number of children node.
Program node (int index) const
 Get a child node by its index.
Program operator[] (int index) const
 Get a child node by its index.
const_iterator begin () const
 Get an iterator to the beginning of the children nodes.
const_iterator end () const
 Get an iterator to the ending of the children nodes.
const_reverse_iterator rbegin () const
 Get a reverse iterator to the beginning of the children nodes.
const_reverse_iterator rend () const
 Get a reverse iterator to the ending of the children nodes.

Friends

class ProgramLoader

Detailed Description

Node of the abstract syntaxing tree of an HMDL file.

The root of a program can be loaded by the program loader. The children nodes can then be generated by iterating over the node or accessing them by their index. Leaf nodes and memory of the whole tree is shared by all the nodes generated.


Member Typedef Documentation

typedef _const_iterator< Object::iterator > Program::const_iterator

Constructor & Destructor Documentation


Member Function Documentation

Get an iterator to the beginning of the children nodes.

Get an iterator to the ending of the children nodes.

bool Program::isValid ( ) const

Check if the program has been successfully loaded.

Program Program::node ( int  index) const

Get a child node by its index.

Returns an invalid program if out of bound

Program Program::operator[] ( int  index) const

Get a child node by its index.

Returns an invalid program if out of bound

const Variant& Program::payload ( ) const

Get the value of the leaf node.

The behaviour is undefined if the node is not a leaf

Get a reverse iterator to the beginning of the children nodes.

Get a reverse iterator to the ending of the children nodes.

int Program::size ( ) const

Get the number of children node.

uint32_t Program::tag ( ) const

Get the type representing the type of the node.

The macros for the tags are defined in model.h


Friends And Related Function Documentation

friend class ProgramLoader [friend]

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