Main Page | Class Hierarchy | Class List | File List | Class Members

ExprList Class Reference

Represents a list of expressions, like {1, 2, 3}. More...

#include <exprList.h>

Inheritance diagram for ExprList:

Inheritance graph
[legend]
Collaboration diagram for ExprList:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< ExprTree
* >::iterator 
iterator
typedef std::vector< ExprTree
* >::const_iterator 
const_iterator

Public Member Functions

 ExprList (const std::vector< ExprTree * > &exprs)
 ExprList (const ExprList &other_list)
 Copy Constructor.

 ~ExprList ()
 Destructor.

ExprListoperator= (const ExprList &other_list)
void GetComponents (std::vector< ExprTree * > &list) const
 Deconstructor to obtain the components of an expression list.

virtual ExprTreeCopy () const
 Makes a deep copy of the expression tree.

bool CopyFrom (const ExprList &other_list)
virtual bool SameAs (const ExprTree *tree) const
 Is this ExprTree the same as the tree?

int size ()
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
void insert (iterator it, ExprTree *t)
void push_back (ExprTree *t)
void erase (iterator it)
void erase (iterator f, iterator l)

Static Public Member Functions

ExprListMakeExprList (const std::vector< ExprTree * > &list)
 Factory to make an expression list expression.


Friends

class ExprListIterator
bool operator== (ExprList &list1, ExprList &list2)

Detailed Description

Represents a list of expressions, like {1, 2, 3}.


Member Function Documentation

virtual ExprTree* ExprList::Copy  )  const [virtual]
 

Makes a deep copy of the expression tree.

Returns:
A deep copy of the expression, or NULL on failure.

Implements ExprTree.

void ExprList::GetComponents std::vector< ExprTree * > &  list  )  const
 

Deconstructor to obtain the components of an expression list.

Parameters:
list The list of expressions

ExprList* ExprList::MakeExprList const std::vector< ExprTree * > &  list  )  [static]
 

Factory to make an expression list expression.

Parameters:
list A vector of the expressions to be contained in the list
Returns:
The constructed expression list

virtual bool ExprList::SameAs const ExprTree tree  )  const [virtual]
 

Is this ExprTree the same as the tree?

Returns:
true if it is the same, false otherwise

Implements ExprTree.


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