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

void Alphabet::read ( FILE *  input  ) 

Read method.

Parameters:
input input stream.

Definition at line 174 of file Alphabet.C.

References includeSymbol(), and Compression::multibyte_read().

{
  Alphabet a_new;

  int tam = Compression::multibyte_read(input);

  map<int, string> tmp;
  while(tam > 0)
  {
    tam--;
    int longitud = Compression::multibyte_read(input);
    char mystr[longitud+1];
    fread(mystr, sizeof(char), longitud, input);
    mystr[longitud] = 0;
    int val = Compression::multibyte_read(input);
    tmp[val] = mystr;
  }

  for(map<int, string>::iterator it = tmp.begin(), limit = tmp.end(); 
      it != limit; it++)
  {
    a_new.includeSymbol("<" + it->second +">");
  }

  *this = a_new;
}


Generated by  Doxygen 1.6.0   Back to index