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

template<class T>
static T EndianUtil< T >::read ( FILE *  input  )  [inline, static]

Read procedure.

input the stream to read from.
the first element readed from the current position of the stream

Definition at line 52 of file EndianUtil.H.

    T retval;
    fread(&retval, sizeof(T), 1, input);
    char *s = reinterpret_cast<char *>(&retval);

    for(int i = sizeof(T)-1; i != -1; i--)
      fread(&(s[i]), 1, 1, input);
    return retval;

Generated by  Doxygen 1.6.0   Back to index