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

template<class T>
static T EndianUtil< T >::read ( istream &  is  )  [inline, static]

Read procedure, C++ I/O version.

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

Definition at line 73 of file EndianUtil.H.

    T retval;
    is.read((char *) &retval, sizeof(T));
    char *s = reinterpret_cast<char *>(&retval);

    for(int i = sizeof(T)-1; i != -1; i--)
      is.read(&(s[i]), sizeof(char));
    return retval;    

Generated by  Doxygen 1.6.0   Back to index