Input binary archive. More...
Public Member Functions | |
IBinaryArchive (const std::string &name, const std::string &extension, int block=-1) | |
IBinaryArchive (const std::string &name, int block=-1) | |
bool | checkVersion (int version) |
std::istream & | getStream () |
void | open (const std::string &name, const std::string &extension, int block=-1) |
void | open (const std::string &name, int block=-1) |
Public Member Functions inherited from bitpit::BinaryArchive | |
BinaryArchive () | |
~BinaryArchive () | |
std::string | getHeader () const |
std::string | getPath () const |
int | getVersion () const |
Additional Inherited Members | |
Static Public Member Functions inherited from bitpit::BinaryArchive | |
static std::string | generatePath (const std::string &name, const std::string &extension, int block=-1) |
static std::string | generatePath (const std::string &name, int block=-1) |
Static Public Attributes inherited from bitpit::BinaryArchive | |
static BITPIT_PUBLIC_API const std::string | EXTENSION_DEFAULT = "dat" |
static BITPIT_PUBLIC_API const int | HEADER_SIZE = 1024 |
static BITPIT_PUBLIC_API const int | VERSION_UNDEFINED = - std::numeric_limits<int>::max() |
Protected Member Functions inherited from bitpit::BinaryArchive | |
void | open (const std::string &name, const std::string &extension, ios_base::openmode mode, int block=-1) |
Protected Attributes inherited from bitpit::BinaryArchive | |
std::string | m_header |
std::string | m_path |
int | m_version |
Input binary archive.
The IBinaryArchive class can read a binary archive, the binary archive has a fixed ASCII header.
Definition at line 67 of file binary_archive.hpp.
bitpit::IBinaryArchive::IBinaryArchive | ( | const std::string & | name, |
int | block = -1 ) |
Creates a new input archive.
name | is the name of the file |
block | is the parallel block thefile belongs to, a negative value mean that the file is serial |
Definition at line 162 of file binary_archive.cpp.
bitpit::IBinaryArchive::IBinaryArchive | ( | const std::string & | name, |
const std::string & | extension, | ||
int | block = -1 ) |
Creates a new input archive.
name | is the name of the file |
extension | is the extension of the file |
block | is the parallel block thefile belongs to, a negative value mean that the file is serial |
Definition at line 175 of file binary_archive.cpp.
bool bitpit::IBinaryArchive::checkVersion | ( | int | version | ) |
Checks if the version of the archive matches the specified version.
version | is the requested version |
Definition at line 236 of file binary_archive.cpp.
std::istream & bitpit::IBinaryArchive::getStream | ( | ) |
Get a reference to the input stream associated to the archive.
Definition at line 224 of file binary_archive.cpp.
void bitpit::IBinaryArchive::open | ( | const std::string & | name, |
const std::string & | extension, | ||
int | block = -1 ) |
Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.
name | is the name of the file |
extension | is the extension of the file |
block | is the parallel block thefile belongs to, a negative value mean that the file is serial |
Definition at line 202 of file binary_archive.cpp.
void bitpit::IBinaryArchive::open | ( | const std::string & | name, |
int | block = -1 ) |
Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.
name | is the name of the file |
block | is the parallel block thefile belongs to, a negative value mean that the file is serial |
Definition at line 188 of file binary_archive.cpp.