CFEL - ASG Software Suite
2.5.0
CASS
|
A file input deserializer. More...
#include <serializer.hpp>
Public Member Functions | |
SerializerReadFile (const char *filename) | |
constructor. More... | |
~SerializerReadFile () | |
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 tell whether 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 input deserializer.
class that will deserialize Serializable classes from a file
Definition at line 527 of file serializer.hpp.
|
inline |
constructor.
will open the stream in binary reading/writing mode
Definition at line 534 of file serializer.hpp.
References _opened, and cass::SerializerBackend::_stream.
|
inline |
destructor.
closes the file and deletes stream object.
Definition at line 544 of file serializer.hpp.
References cass::SerializerBackend::_stream, and close().
|
inline |
close file
Definition at line 551 of file serializer.hpp.
References _opened, cass::SerializerBackend::_stream, and close().
Referenced by close(), and ~SerializerReadFile().
|
protected |
flag to tell whether the file is opened
Definition at line 560 of file serializer.hpp.
Referenced by close(), and SerializerReadFile().