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

int & Collection::operator[] ( const set< int > &  t  ) 

If the element received as a parameter does not appear in the collection, it is added at the end.

Parameters:
t an element
Returns:
the position in which t appears in the collection.

Definition at line 42 of file Collection.C.

References has_not().

{
  if(has_not(t))
  {
    index[t] = index.size()-1;
    element.push_back(&(index.find(t)->first));
  }
  return index[t];
}


Generated by  Doxygen 1.6.0   Back to index