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

void EndianDoubleUtil::write ( ostream &  os,
double const &  val 
) [static]

Write procedure, C++ I/O version.

outputthe stream to write to
valthe value of the generic object to write to the stream

Definition at line 78 of file endian_double_util.cc.

  double val2 = val;
  os.write(reinterpret_cast<char *>(&val2), sizeof(double));
  char *s = reinterpret_cast<char *>(&val2);
  for(int i = sizeof(double)-1; i != -1; i--)
    os.write(&(s[i]), sizeof(char));

Generated by  Doxygen 1.6.0   Back to index