commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
commore::CommBuffer::Page Class Reference

#include <CommBuffer.h>

Public Types

enum  { HEADER_SIZE = 21, NB_FLAGS = 4, VERSION = 1 }
 
enum  Flags { NO_FLAG = 'x', COMPRESSED = 'c', CRYPTED = 'i', ASCII = 'a' }
 
enum  { DECLARED_DATA_SIZE = 4 }
 

Public Member Functions

 Page ()
 
void update_header ()
 
bool update_from_header ()
 
void set_is_last_page (bool value)
 
bool is_last_page () const
 
bool push_flag (Byte flag)
 
void clear_flag (Byte flag)
 
bool has_flag (Byte flag)
 
void clear_flags ()
 
size_t get_size () const
 
Byteget () const
 

Static Public Member Functions

static bool decodeHeader (Byte *header, int *version, Byte flag[], size_t *size, int *chunkTag)
 

Public Attributes

bool is_last_page_
 
int version_
 
Byte flags_ [NB_FLAGS]
 
PCommBuffer cont_
 
size_t size_
 
size_t page_size_
 
PPage next_
 
Byte s_ [DECLARED_DATA_SIZE]
 

Member Enumeration Documentation

anonymous enum
Enumerator
HEADER_SIZE 
NB_FLAGS 
VERSION 
anonymous enum
Enumerator
DECLARED_DATA_SIZE 
Enumerator
NO_FLAG 
COMPRESSED 
CRYPTED 
ASCII 

Constructor & Destructor Documentation

commore::CommBuffer::Page::Page ( )
inline

Member Function Documentation

void CommBuffer::Page::clear_flag ( Byte  flag)
void CommBuffer::Page::clear_flags ( )
bool CommBuffer::Page::decodeHeader ( Byte header,
int *  version,
Byte  flag[],
size_t *  size,
int *  chunkTag 
)
static

Update header content with current buffer size

Byte* commore::CommBuffer::Page::get ( ) const
inline
size_t commore::CommBuffer::Page::get_size ( ) const
inline
bool CommBuffer::Page::has_flag ( Byte  flag)
bool commore::CommBuffer::Page::is_last_page ( ) const
inline
bool CommBuffer::Page::push_flag ( Byte  flag)
void commore::CommBuffer::Page::set_is_last_page ( bool  value)
inline
bool CommBuffer::Page::update_from_header ( )
void CommBuffer::Page::update_header ( )

Member Data Documentation

PCommBuffer commore::CommBuffer::Page::cont_
Byte commore::CommBuffer::Page::flags_[NB_FLAGS]
bool commore::CommBuffer::Page::is_last_page_
PPage commore::CommBuffer::Page::next_
size_t commore::CommBuffer::Page::page_size_
Byte commore::CommBuffer::Page::s_[DECLARED_DATA_SIZE]
size_t commore::CommBuffer::Page::size_
int commore::CommBuffer::Page::version_

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