Main Page Class Hierarchy Compound List File List Compound Members File Members

# cmt_node_set Class Reference

Inheritance diagram for cmt_node_set

[legend]
Collaboration diagram for cmt_node_set:

[legend]
List of all members.

## Public Methods
| cmt_node_set ()
| cmt_node_set (cmt_node_set* father)
| ~cmt_node_set ()
cmt_node_set* | father ()
void | clear ()
void | push (cmt_node* n)
cmt_node* | pop ()
cmt_node* | top () const
int | nodes () const
const cmt_node* | nodeAt (int index) const
bool | parentheses () const
void | set_parentheses (bool value)
virtual void | reduce ()
## Protected Attributes
cmt_node_set* | _father
cmt_vector<cmt_node*> | _nodes
bool | _parentheses

## Constructor & Destructor Documentation

cmt_node_set::cmt_node_set ( | )

| Definition at line 697 of file cmt_regexp.cxx.
    00697                             : _father (0)
    00698 {
    00699   _parentheses = false;
    00700 }

cmt_node_set::cmt_node_set ( | cmt_node_set * father )

| Definition at line 702 of file cmt_regexp.cxx.
    00702                                                 : _father (father)
    00703 {
    00704   if (father != 0) father->push (this);
    00705   _parentheses = false;
    00706 }

cmt_node_set::~cmt_node_set ( | )

| Definition at line 708 of file cmt_regexp.cxx.
    00709 {
    00710   clear ();
    00711 }

## Member Function Documentation

void cmt_node_set::clear ( | )

| Definition at line 718 of file cmt_regexp.cxx. Referenced by ~cmt_node_set().
    00719 {
    00720   int i;
    00721
    00722   for (i = 0; i < _nodes.size (); i++)
    00723     {
    00724       cmt_node* n = _nodes[i];
    00725       delete n;
    00726     }
    00727   _nodes.clear ();
    00728 }

cmt_node_set * cmt_node_set::father ( | )

| Definition at line 713 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00714 {
    00715   return (_father);
    00716 }

const cmt_node * cmt_node_set::nodeAt ( | int index ) const

| Definition at line 763 of file cmt_regexp.cxx.
    00764 {
    00765   return (_nodes[index]);
    00766 }

int cmt_node_set::nodes ( | ) const

| Definition at line 758 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp(), and cmt_and_node::fill().
    00759 {
    00760   return (_nodes.size ());
    00761 }

bool cmt_node_set::parentheses ( | ) const

| Definition at line 768 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00769 {
    00770   return (_parentheses);
    00771 }

cmt_node * cmt_node_set::pop ( | )

| Definition at line 735 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00736 {
    00737   if (_nodes.size () == 0) return (&cmt_node::null ());
    00738
    00739   int index = _nodes.size () - 1;
    00740
    00741   cmt_node* n = _nodes[index];
    00742   _nodes.erase (index);
    00743
    00744   return (n);
    00745 }

void cmt_node_set::push ( | cmt_node * n )

| Definition at line 730 of file cmt_regexp.cxx. Referenced by cmt_node_set(), cmt_regexp::cmt_regexp(), and cmt_and_node::fill().
    00731 {
    00732   _nodes.push_back (n);
    00733 }

void cmt_node_set::reduce ( | )`[virtual]`

| Reimplemented in cmt_and_node. Definition at line 778 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00779 {
    00780 }

void cmt_node_set::set_parentheses ( | bool value )

| Definition at line 773 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00774 {
    00775   _parentheses = value;
    00776 }

cmt_node * cmt_node_set::top ( | ) const

| Definition at line 747 of file cmt_regexp.cxx. Referenced by cmt_regexp::cmt_regexp().
    00748 {
    00749   if (_nodes.size () == 0) return (&cmt_node::null ());
    00750
    00751   int index = _nodes.size () - 1;
    00752
    00753   cmt_node* n = _nodes[index];
    00754
    00755   return (n);
    00756 }

## Member Data Documentation

cmt_node_set * cmt_node_set::_father`[protected]`

| Definition at line 143 of file cmt_regexp.cxx.

cmt_vector< cmt_node *> cmt_node_set::_nodes`[protected]`

| Definition at line 144 of file cmt_regexp.cxx.

bool cmt_node_set::_parentheses`[protected]`

| Definition at line 145 of file cmt_regexp.cxx.

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

- cmt_regexp.cxx