FAUST compiler  0.9.9.6b8
Public Member Functions | Public Attributes | List of all members
Trans Struct Reference
Collaboration diagram for Trans:
Collaboration graph
[legend]

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.

157  :
158  x(_x), n(0), arity(0), state(new State)
159 {
160 }
State * state
Trans::Trans ( const Node _n,
int  _arity 
)

Definition at line 162 of file patternmatcher.cpp.

162  :
163  x(NULL), n(_n), arity(_arity), state(new State)
164 {
165 }
State * state
Trans::Trans ( const Trans trans)

Definition at line 167 of file patternmatcher.cpp.

References state.

167  :
168  x(trans.x), n(trans.n), arity(trans.arity)
169 {
170  state = new State(*trans.state);
171 }
State * state
Trans::~Trans ( )

Definition at line 173 of file patternmatcher.cpp.

References state.

174 {
175  delete state;
176 }
State * state

Member Function Documentation

bool Trans::is_cst_trans ( Tree _x) const
inline

Definition at line 115 of file patternmatcher.cpp.

115 { _x = x; return arity == 0 && x != NULL; }
bool Trans::is_op_trans ( Node _n) const
inline

Definition at line 116 of file patternmatcher.cpp.

116 { _n = n; return arity > 0; }
bool Trans::is_var_trans ( ) const
inline

Definition at line 114 of file patternmatcher.cpp.

114 { 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.

121  { return (arity < trans.arity) ? 1 :
122  (arity > trans.arity) ? 0 :
123  (arity == 0) ? (x < trans.x) :
124  (n.getSym() < trans.n.getSym()); }
Sym getSym() const
Definition: node.hh:106

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.

179 {
180  x = trans.x; n = trans.n; arity = trans.arity;
181  state = new State(*trans.state);
182  return *this;
183 }
State * state
bool Trans::operator== ( const Trans trans) const
inline

Definition at line 118 of file patternmatcher.cpp.

References arity, n, and x.

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

Member Data Documentation

int Trans::arity

Definition at line 104 of file patternmatcher.cpp.

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

Node Trans::n

Definition at line 103 of file patternmatcher.cpp.

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

State* Trans::state

Definition at line 105 of file patternmatcher.cpp.

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

Tree Trans::x

Definition at line 102 of file patternmatcher.cpp.

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


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