Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

IO_tools Namespace Reference


Functions

template<typename T> void write_4_bytes (const T &v, std::ostream &out)
 Write a 4-byte variable into a stream.

template<typename T> void write_2_bytes (const T &v, std::ostream &out)
 Write a 2-byte variable into a stream.

template<typename T> void read_4_bytes (T *result, std::istream &in)
 Read a 4-byte variable from a stream.

template<typename T> void read_2_bytes (T *result, std::istream &in)
 Read a 2-byte variable from a stream.

template<typename T> void convert_bit_order (const T &var, T *result)
 If REVERSE_BIT_ORDER is defined, inverse the bit order.

void go_to_next (const char c, std::istream &in)
 Read from the stream until the next corresponding character.

void go_to_next_token (const std::string token, std::istream &in)
 Read from the stream until the end of the given token.

char go_to_next_of_list (const std::string token_list, std::istream &in)
 Read from the stream until the next character contained within a string.


Function Documentation

template<typename T>
void IO_tools::convert_bit_order const T &    var,
T *    result
[inline]
 

If REVERSE_BIT_ORDER is defined, inverse the bit order.

void IO_tools::go_to_next const char    c,
std::istream &    in
[inline]
 

Read from the stream until the next corresponding character.

char IO_tools::go_to_next_of_list const std::string    token_list,
std::istream &    in
[inline]
 

Read from the stream until the next character contained within a string.

void IO_tools::go_to_next_token const std::string    token,
std::istream &    in
[inline]
 

Read from the stream until the end of the given token.

Be careful, it is a basic version that does not recognize BAR in BBAR i.e. there is no finite automata. It is just enough to parse simplistic files.

template<typename T>
void IO_tools::read_2_bytes T *    result,
std::istream &    in
[inline]
 

Read a 2-byte variable from a stream.

template<typename T>
void IO_tools::read_4_bytes T *    result,
std::istream &    in
[inline]
 

Read a 4-byte variable from a stream.

template<typename T>
void IO_tools::write_2_bytes const T &    v,
std::ostream &    out
[inline]
 

Write a 2-byte variable into a stream.

template<typename T>
void IO_tools::write_4_bytes const T &    v,
std::ostream &    out
[inline]
 

Write a 4-byte variable into a stream.


Generated on Fri Aug 20 15:03:53 2004 by doxygen1.2.18