CppCMS
Public Types | Public Member Functions
cppcms::archive Class Reference

Class that represents a binary archive that can be stored in persistent storage or transfered. More...

#include <cppcms/serialization_classes.h>

List of all members.

Public Types

enum  mode_type { save_to_archive, load_from_archive }

Public Member Functions

void reserve (size_t size)
void write_chunk (void const *begin, size_t len)
void read_chunk (void *begin, size_t len)
size_t next_chunk_size ()
bool eof ()
std::string read_chunk_as_string ()
void mode (mode_type m)
mode_type mode ()
void reset ()
std::string str ()
void str (std::string const &str)
 archive ()
 ~archive ()
 archive (archive const &)
archive const & operator= (archive const &)

Detailed Description

Class that represents a binary archive that can be stored in persistent storage or transfered.


Member Enumeration Documentation

Operations mode on archive


Constructor & Destructor Documentation

Create new archive, by default in save_to_archive mode

Destructor

Copy archive (avoid it)


Member Function Documentation

Get if we got to the end of archive while reading

Set IO mode, resets pointer

Referenced by cppcms::operator&().

Get IO mode

Get the size of the next chunk that can be read

archive const& cppcms::archive::operator= ( archive const &  )

Assign archive (avoid it)

void cppcms::archive::read_chunk ( void *  begin,
size_t  len 
)

Read a chunk of size len from archive

Read next chunk as std::string

void cppcms::archive::reserve ( size_t  size)

Reserve some memory before we write actual data

Reset IO pointer

std::string cppcms::archive::str ( )

Get serialized object memory

void cppcms::archive::str ( std::string const &  str)

Set serialized object memory, sets mode to load_from_archive

void cppcms::archive::write_chunk ( void const *  begin,
size_t  len 
)

Write a chunk of size len to archive


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