CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Protected Attributes | List of all members
cass::SerializerReadFile Class Reference

A file input deserializer. More...

#include <serializer.hpp>

+ Inheritance diagram for cass::SerializerReadFile:
+ Collaboration diagram for cass::SerializerReadFile:

Public Member Functions

 SerializerReadFile (const char *filename)
 constructor. More...
 
 ~SerializerReadFile ()
 destructor. More...
 
void close ()
 close file More...
 
- Public Member Functions inherited from cass::SerializerBackend
 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...
 
- Protected Attributes inherited from cass::SerializerBackend
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

- Protected Member Functions inherited from cass::SerializerBackend
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...
 

Detailed Description

A file input deserializer.

class that will deserialize Serializable classes from a file

Author
Stephan Kassemeyer

Definition at line 527 of file serializer.hpp.

Constructor & Destructor Documentation

cass::SerializerReadFile::SerializerReadFile ( const char *  filename)
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.

cass::SerializerReadFile::~SerializerReadFile ( )
inline

destructor.

closes the file and deletes stream object.

Definition at line 544 of file serializer.hpp.

References cass::SerializerBackend::_stream, and close().

Member Function Documentation

void cass::SerializerReadFile::close ( )
inline

close file

Definition at line 551 of file serializer.hpp.

References _opened, cass::SerializerBackend::_stream, and close().

Referenced by close(), and ~SerializerReadFile().

Member Data Documentation

bool cass::SerializerReadFile::_opened
protected

flag to tell whether the file is opened

Definition at line 560 of file serializer.hpp.

Referenced by close(), and SerializerReadFile().


The documentation for this class was generated from the following file: