Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::OBinaryArchive Class Reference

Output binary archive. More...

Inheritance diagram for bitpit::OBinaryArchive:
Inheritance graph
[legend]
Collaboration diagram for bitpit::OBinaryArchive:
Collaboration graph
[legend]

Public Member Functions

 OBinaryArchive (const std::string &name, const std::string &extension, int version, const std::string &header, int block=-1)
 
 OBinaryArchive (const std::string &name, const std::string &extension, int version, int block=-1)
 
 OBinaryArchive (const std::string &name, int version, const std::string &header, int block=-1)
 
 OBinaryArchive (const std::string &name, int version, int block=-1)
 
std::ostream & getStream ()
 
void open (const std::string &name, const int version, int block=-1)
 
void open (const std::string &name, const std::string &extension, int version, const std::string &header, int block=-1)
 
void open (const std::string &name, const std::string &extension, int version, int block=-1)
 
void open (const std::string &name, int version, const std::string &header, 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
 

Detailed Description

Output binary archive.

The IBinaryArchive class can write a binary archive, the binary archive has a fixed ASCII header.

Definition at line 87 of file binary_archive.hpp.

Constructor & Destructor Documentation

◆ OBinaryArchive() [1/4]

bitpit::OBinaryArchive::OBinaryArchive ( const std::string & name,
int version,
int block = -1 )

Creates a new output archive.

Parameters
nameis the name of the file
versionis the version of the archive
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 258 of file binary_archive.cpp.

◆ OBinaryArchive() [2/4]

bitpit::OBinaryArchive::OBinaryArchive ( const std::string & name,
int version,
const std::string & header,
int block = -1 )

Creates a new output archive.

Parameters
nameis the name of the file
versionis the version of the archive
headeris the header of the archive, the length of the header is limited to HEADER_SIZE characters.
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 273 of file binary_archive.cpp.

◆ OBinaryArchive() [3/4]

bitpit::OBinaryArchive::OBinaryArchive ( const std::string & name,
const std::string & extension,
int version,
int block = -1 )

Creates a new output archive.

Parameters
nameis the name of the file
extensionis the extension of the file
versionis the version of the archive
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 288 of file binary_archive.cpp.

◆ OBinaryArchive() [4/4]

bitpit::OBinaryArchive::OBinaryArchive ( const std::string & name,
const std::string & extension,
int version,
const std::string & header,
int block = -1 )

Creates a new output archive.

Parameters
nameis the name of the file
extensionis the extension of the file
versionis the version of the archive
headeris the header of the archive, the length of the header is limited to HEADER_SIZE characters.
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 306 of file binary_archive.cpp.

Member Function Documentation

◆ getStream()

std::ostream & bitpit::OBinaryArchive::getStream ( )

Get a reference to the input stream associated to the archive.

Returns
A reference to the input stream associated to the archive.

Definition at line 395 of file binary_archive.cpp.

◆ open() [1/4]

void bitpit::OBinaryArchive::open ( const std::string & name,
const int version,
int block = -1 )

Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.

Parameters
nameis the name of the file
versionis the version of the archive
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 321 of file binary_archive.cpp.

◆ open() [2/4]

void bitpit::OBinaryArchive::open ( const std::string & name,
const std::string & extension,
int version,
const std::string & header,
int block = -1 )

Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.

Parameters
nameis the name of the file
extensionis the extension of the file
versionis the version of the archive
headeris the header of the archive, the length of the header is limited to HEADER_SIZE characters.
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 371 of file binary_archive.cpp.

◆ open() [3/4]

void bitpit::OBinaryArchive::open ( const std::string & name,
const std::string & extension,
int version,
int block = -1 )

Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.

Parameters
nameis the name of the file
extensionis the extension of the file
versionis the version of the archive
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 353 of file binary_archive.cpp.

◆ open() [4/4]

void bitpit::OBinaryArchive::open ( const std::string & name,
int version,
const std::string & header,
int block = -1 )

Opens the specified file, associating it with the stream object, so that input/output operations are performed on its content.

Parameters
nameis the name of the file
versionis the version of the archive
headeris the header of the archive, the length of the header is limited to HEADER_SIZE characters.
blockis the parallel block thefile belongs to, a negative value mean that the file is serial

Definition at line 337 of file binary_archive.cpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---