CFEL - ASG Software Suite
2.5.0
CASS
|
A file output serializer. More...
#include <serializer.hpp>
Public Member Functions | |
SerializerWriteFile (const char *filename) | |
constructor. More... | |
~SerializerWriteFile () | |
destructor. More... | |
void | close () |
close file More... | |
![]() | |
SerializerBackend () | |
constructor More... | |
void | flush () |
flush the stream More... | |
std::ostream & | writeToStream (const char *data, std::streamsize n) |
write data to the stream More... | |
std::istream & | readFromStream (char *data, std::streamsize n) |
read data from the stream More... | |
template<typename Type > | |
void | add (const Type &value) |
add arbitrary value to the stream More... | |
template<typename Type > | |
Type | retrieve () |
read arbitrary value from stream More... | |
void | startChecksumGroupForRead () |
control checksum calculation for the next values added More... | |
bool | endChecksumGroupForRead () |
void | startChecksumGroupForWrite () |
control checksum for writing to stream More... | |
void | endChecksumGroupForWrite () |
Protected Attributes | |
bool | _opened |
flag to see if the file is opened More... | |
![]() | |
std::iostream * | _stream |
the string to serialize the objects to (buffer) More... | |
uint16_t | r_sum1 |
sum 1 for reading More... | |
uint16_t | r_sum2 |
sum 2 for reading More... | |
uint16_t | w_sum1 |
sum 1 for writing More... | |
uint16_t | w_sum2 |
sum 2 for writing More... | |
bool | _checkSumGroupStartedForRead |
flag to enable getting parts to a checksum More... | |
bool | _checkSumGroupStartedForWrite |
flag to enable adding parts to a checksum More... | |
Additional Inherited Members | |
![]() | |
void | addToOutChecksum (const char *data, std::streamsize len) |
fletcher16 algorithm for 8 bit input More... | |
void | addToInChecksum (const char *data, std::streamsize len) |
fletcher16 algorithm for 8 bit input More... | |
A file output serializer.
class that will serialize Serializable classes to a file
Definition at line 481 of file serializer.hpp.
|
inline |
constructor.
will open the stream in binary reading/writing mode
Definition at line 488 of file serializer.hpp.
References _opened, and cass::SerializerBackend::_stream.
|
inline |
destructor.
closes the file and deletes stream object.
Definition at line 498 of file serializer.hpp.
References cass::SerializerBackend::_stream, and close().
|
inline |
close file
Definition at line 505 of file serializer.hpp.
References _opened, cass::SerializerBackend::_stream, and close().
Referenced by close(), jocassview::FileHandler::saveDataToHist(), and ~SerializerWriteFile().
|
protected |
flag to see if the file is opened
Definition at line 514 of file serializer.hpp.
Referenced by close(), and SerializerWriteFile().