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

template<class T>
static void EndianUtil< T >::write ( FILE *  output,
T const &  val 
) [inline, static]

Write procedure.

output the stream to write to
val the value of the generic object to write to the stream

Definition at line 94 of file EndianUtil.H.

    T val2 = val;
    fwrite(&val2, sizeof(T), 1, output);
    char *s = reinterpret_cast<char *>(&val2);
    for(int i = sizeof(T)-1; i != -1; i--)
      fwrite(&(s[i]), 1, 1, output);

Generated by  Doxygen 1.6.0   Back to index