Loading...
Searching...
No Matches
Functions
Binary streams
Collaboration diagram for Binary streams:

Functions

template<typename T , std::size_t dim, typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::read (std::istream &stream, std::array< T, dim > &value)
 
void bitpit::utils::binary::read (std::istream &stream, std::string &string)
 
void bitpit::utils::binary::read (std::istream &stream, std::vector< bool > &container)
 
void bitpit::utils::binary::read (std::istream &stream, std::vector< bool >::reference value)
 
template<typename T , typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::read (std::istream &stream, std::vector< T > &value)
 
template<typename T , typename std::enable_if< utils::is_iterable< T >::value >::type * = nullptr>
void bitpit::utils::binary::read (std::istream &stream, T &value)
 
template<typename T >
void bitpit::utils::binary::read (std::istream &stream, T &value, size_t size)
 
template<typename T >
void bitpit::utils::binary::read (std::istream &stream, T *value, size_t size)
 
template<typename T , std::size_t dim, typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::write (std::ostream &stream, const std::array< T, dim > &value)
 
void bitpit::utils::binary::write (std::ostream &stream, const std::string &string)
 
void bitpit::utils::binary::write (std::ostream &stream, const std::vector< bool > &container)
 
template<typename T , typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::write (std::ostream &stream, const std::vector< T > &value)
 
template<typename T , typename std::enable_if< utils::is_iterable< T >::value >::type * = nullptr>
void bitpit::utils::binary::write (std::ostream &stream, const T &value)
 
template<typename T >
void bitpit::utils::binary::write (std::ostream &stream, const T &value, size_t size)
 
template<typename T >
void bitpit::utils::binary::write (std::ostream &stream, const T *value, size_t size)
 
template<typename T >
void bitpit::utils::binary::write (std::ostream &stream, T *value, size_t size)
 

Detailed Description

Function Documentation

◆ read() [1/8]

template<typename T , std::size_t dim, typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::read ( std::istream & stream,
std::array< T, dim > & container )

Read the given container to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]containeron output it will contain the read values

Definition at line 185 of file binaryUtils.tpp.

◆ read() [2/8]

void bitpit::utils::binary::read ( std::istream & stream,
std::string & string )

Read the given string to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]stringon output it will contain the read string

Definition at line 108 of file binaryUtils.cpp.

◆ read() [3/8]

void bitpit::utils::binary::read ( std::istream & stream,
std::vector< bool > & container )

Read the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
containeris the container to write

Definition at line 72 of file binaryUtils.cpp.

◆ read() [4/8]

void bitpit::utils::binary::read ( std::istream & stream,
std::vector< bool >::reference value )

Read the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the value to write

Definition at line 93 of file binaryUtils.cpp.

◆ read() [5/8]

template<typename T , typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::read ( std::istream & stream,
std::vector< T > & container )

Read the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
[out]containeron output it will contain the read values

Definition at line 167 of file binaryUtils.tpp.

◆ read() [6/8]

template<typename T , typename std::enable_if< utils::is_iterable< T >::value >::type * = nullptr>
void bitpit::utils::binary::read ( std::istream & stream,
T & value )

Read the given container to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]valueon output it will contain the read value

Read the given data to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]valueon output it will contain the read value

Definition at line 215 of file binaryUtils.tpp.

◆ read() [7/8]

template<typename T >
void bitpit::utils::binary::read ( std::istream & stream,
T & value,
size_t size )

Read the given data to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]valueon output it will contain the read value
sizeis the size, expressed in bytes, of the data to read

Definition at line 250 of file binaryUtils.tpp.

◆ read() [8/8]

template<typename T >
void bitpit::utils::binary::read ( std::istream & stream,
T * value,
size_t size )

Read the given data to the specified stream in binary format.

Parameters
streamis the stream to read from
[out]valueon output it will contain the read value
sizeis the size, expressed in bytes, of the data to read

Definition at line 265 of file binaryUtils.tpp.

◆ write() [1/8]

template<typename T , std::size_t dim, typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::write ( std::ostream & stream,
const std::array< T, dim > & container )

Write the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
containeris the container to write

Definition at line 60 of file binaryUtils.tpp.

◆ write() [2/8]

void bitpit::utils::binary::write ( std::ostream & stream,
const std::string & string )

Write the given string to the specified stream in binary format.

Parameters
streamis the stream to write to
stringis the string to write

Definition at line 57 of file binaryUtils.cpp.

◆ write() [3/8]

void bitpit::utils::binary::write ( std::ostream & stream,
const std::vector< bool > & container )

Write the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
containeris the container to write

Definition at line 41 of file binaryUtils.cpp.

◆ write() [4/8]

template<typename T , typename std::enable_if< std::is_pod< T >::value >::type * = nullptr>
void bitpit::utils::binary::write ( std::ostream & stream,
const std::vector< T > & container )

Write the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
containeris the container to write

Definition at line 43 of file binaryUtils.tpp.

◆ write() [5/8]

template<typename T , typename std::enable_if< utils::is_iterable< T >::value >::type * = nullptr>
void bitpit::utils::binary::write ( std::ostream & stream,
const T & value )

Write the given container to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the data to write

Write the given data to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the data to write

Definition at line 90 of file binaryUtils.tpp.

◆ write() [6/8]

template<typename T >
void bitpit::utils::binary::write ( std::ostream & stream,
const T & value,
size_t size )

Write the given data to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the data to write
sizeis the size, expressed in bytes, of the data to write

Definition at line 123 of file binaryUtils.tpp.

◆ write() [7/8]

template<typename T >
void bitpit::utils::binary::write ( std::ostream & stream,
const T * value,
size_t size )

Write the given data to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the data to write
sizeis the size, expressed in bytes, of the data to write

Definition at line 138 of file binaryUtils.tpp.

◆ write() [8/8]

template<typename T >
void bitpit::utils::binary::write ( std::ostream & stream,
T * value,
size_t size )

Write the given data to the specified stream in binary format.

Parameters
streamis the stream to write to
valueis the data to write
sizeis the size, expressed in bytes, of the data to write

Definition at line 153 of file binaryUtils.tpp.

--- layout: doxygen_footer ---