Logo Search packages:      
Sourcecode: lttoolbox version File versions

void Alphabet::write ( FILE *  output  ) 

Write method.

Parameters:
output output stream.

Definition at line 151 of file Alphabet.C.

References Compression::multibyte_write(), size(), slexic, and slexicinv.

Referenced by Compiler::write().

{
  set<string> lista;

  for(unsigned int i = 0, limit = slexicinv.size(); i < limit; i++)
  {
    if(slexicinv[i].size() >= 3)
    {
      lista.insert(slexicinv[i].substr(1, slexicinv[i].size()-2));
    }
  }

  Compression::multibyte_write(lista.size(), output);
  for(set<string>::iterator it = lista.begin(), limit = lista.end(); 
      it != limit; it++)
  {
    Compression::multibyte_write(it->size(), output);
    fwrite(it->data(), sizeof(char), it->size(), output);
    Compression::multibyte_write(slexic["<" + *it + ">"], output);
  }
}


Generated by  Doxygen 1.6.0   Back to index