Trans Struct Reference

Collaboration diagram for Trans:
[legend]

List of all members.

Public Member Functions

 Trans (Tree _x)
 Trans (const Node &_n, int _arity)
 Trans (const Trans &trans)
 ~Trans ()
Transoperator= (const Trans &trans)
bool is_var_trans () const
bool is_cst_trans (Tree &_x) const
bool is_op_trans (Node &_n) const
bool operator== (const Trans &trans) const
bool operator< (const Trans &trans) const

Public Attributes

Tree x
Node n
int arity
Statestate

Detailed Description

Definition at line 101 of file patternmatcher.cpp.


Constructor & Destructor Documentation

Trans::Trans ( Tree  _x  ) 

Definition at line 157 of file patternmatcher.cpp.

00158                     :
00159   x(_x), n(0), arity(0), state(new State)
00160 {
}

Trans::Trans ( const Node _n,
int  _arity 
)

Definition at line 162 of file patternmatcher.cpp.

00163                                        :
00164   x(NULL), n(_n), arity(_arity), state(new State)
00165 {
}

Trans::Trans ( const Trans trans  ) 

Definition at line 167 of file patternmatcher.cpp.

References state.

00168                                :
00169   x(trans.x), n(trans.n), arity(trans.arity)
00170 {
00171   state = new State(*trans.state);
}

Trans::~Trans (  ) 

Definition at line 173 of file patternmatcher.cpp.

References state.

00174 {
00175   delete state;
00176 }


Member Function Documentation

bool Trans::is_cst_trans ( Tree _x  )  const [inline]

Definition at line 115 of file patternmatcher.cpp.

References arity, and x.

00115 { _x = x; return arity == 0 && x != NULL; }

bool Trans::is_op_trans ( Node _n  )  const [inline]

Definition at line 116 of file patternmatcher.cpp.

References arity, and n.

00116 { _n = n; return arity > 0; }

bool Trans::is_var_trans (  )  const [inline]

Definition at line 114 of file patternmatcher.cpp.

References arity, and x.

00114 { return arity == 0 && x == NULL; }

bool Trans::operator< ( const Trans trans  )  const [inline]

Definition at line 120 of file patternmatcher.cpp.

References arity, Node::getSym(), n, and x.

00121   { return (arity < trans.arity) ? 1 :
00122       (arity > trans.arity) ? 0 :
00123       (arity == 0) ? (x < trans.x) :
00124       (n.getSym() < trans.n.getSym()); }

Here is the call graph for this function:

Trans & Trans::operator= ( const Trans trans  ) 

Definition at line 178 of file patternmatcher.cpp.

References arity, n, state, and x.

00179 {
00180   x = trans.x; n = trans.n; arity = trans.arity;
00181   state = new State(*trans.state);
00182   return *this;
00183 }

bool Trans::operator== ( const Trans trans  )  const [inline]

Definition at line 118 of file patternmatcher.cpp.

References arity, n, and x.

00119   { return arity == trans.arity && x == trans.x && n == trans.n; }


Member Data Documentation

Definition at line 103 of file patternmatcher.cpp.

Referenced by is_op_trans(), operator<(), operator=(), and operator==().

Definition at line 105 of file patternmatcher.cpp.

Referenced by operator=(), Trans(), and ~Trans().

Definition at line 102 of file patternmatcher.cpp.

Referenced by is_cst_trans(), is_var_trans(), operator<(), operator=(), and operator==().


The documentation for this struct was generated from the following file:
Generated on Thu Jul 15 15:47:37 2010 for FAUST compiler by  doxygen 1.6.3