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

A file output serializer. More...

#include <serializer.hpp>

+ Inheritance diagram for cass::SerializerWriteFile:
+ Collaboration diagram for cass::SerializerWriteFile:

Public Member Functions

 SerializerWriteFile (const char *filename)
 constructor. More...
 
 ~SerializerWriteFile ()
 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 see if 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 output serializer.

class that will serialize Serializable classes to a file

Author
Stephan Kassemeyer

Definition at line 481 of file serializer.hpp.

Constructor & Destructor Documentation

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

cass::SerializerWriteFile::~SerializerWriteFile ( )
inline

destructor.

closes the file and deletes stream object.

Definition at line 498 of file serializer.hpp.

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

Member Function Documentation

void cass::SerializerWriteFile::close ( )
inline

Member Data Documentation

bool cass::SerializerWriteFile::_opened
protected

flag to see if the file is opened

Definition at line 514 of file serializer.hpp.

Referenced by close(), and SerializerWriteFile().


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