Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

void Node::addTransition ( unsigned short const   i,
unsigned short const   o,
Node *const   d 
)

Making a link between this node and another

Parameters:
i input symbol
o output symbol
d destination

Definition at line 58 of file Node.C.

References transitions.

Referenced by TransExe::read().

{
  Dest &aux = transitions[i];
  aux.size++;
  ushort *out_tag = new ushort[aux.size];
  Node **dest = new Node*[aux.size];
 
  for(int i = 0; i<aux.size-1; i++)
  {
    out_tag[i] = aux.out_tag[i];
    dest[i] = aux.dest[i];
  }
  
  if(aux.size > 1)
  {
    delete aux.out_tag;
    delete aux.dest;
  }

  out_tag[aux.size-1] = o;
  dest[aux.size-1] = d;
  aux.out_tag = out_tag;
  aux.dest = dest;
}


Generated by  Doxygen 1.6.0   Back to index