libmoost
moost::container::mmd_section_writer_base Class Reference

#include <section_writer_base.hpp>

Inheritance diagram for moost::container::mmd_section_writer_base:
Collaboration diagram for moost::container::mmd_section_writer_base:

List of all members.

Public Member Functions

 mmd_section_writer_base (memory_mapped_dataset::writer &wr, const std::string &name, const std::string &type, size_t alignment)
virtual ~mmd_section_writer_base ()
void commit ()

Protected Member Functions

void rollback ()
template<typename T >
void setattr (const std::string &attr, const T &value)
template<typename T >
void write (const std::vector< T > &vec)
template<typename T >
void write (const T &value)
void write (const std::string &value)
void write (const char *value, size_t size)
virtual void pre_commit ()

Private Attributes

const std::string m_name
memory_mapped_dataset::writerm_wr
bool m_committed

Detailed Description

Base class for section writing accessors

Definition at line 45 of file section_writer_base.hpp.


Constructor & Destructor Documentation

moost::container::mmd_section_writer_base::mmd_section_writer_base ( memory_mapped_dataset::writer wr,
const std::string &  name,
const std::string &  type,
size_t  alignment 
) [inline]

Constructor for section writer

Parameters:
wrreference to a dataset writer
namesection name
typesection type
alignmentsection alignment (section will always start at an offset that is a multiple of this value); must be a power of 2

Definition at line 58 of file section_writer_base.hpp.

Here is the call graph for this function:

Definition at line 66 of file section_writer_base.hpp.

Here is the call graph for this function:


Member Function Documentation

Commit the section

All data has been written to the section and the accessor can now finish writing the section to the dataset and updating the index.

This method should always be called explicitly in order to avoid hidden exceptions when it is called by the destructor.

Definition at line 87 of file section_writer_base.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file section_writer_base.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void moost::container::mmd_section_writer_base::setattr ( const std::string &  attr,
const T &  value 
) [inline, protected]

Definition at line 104 of file section_writer_base.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void moost::container::mmd_section_writer_base::write ( const std::vector< T > &  vec) [inline, protected]

Definition at line 110 of file section_writer_base.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void moost::container::mmd_section_writer_base::write ( const T &  value) [inline, protected]

Definition at line 117 of file section_writer_base.hpp.

Here is the call graph for this function:

void moost::container::mmd_section_writer_base::write ( const std::string &  value) [inline, protected]

Definition at line 123 of file section_writer_base.hpp.

Here is the call graph for this function:

void moost::container::mmd_section_writer_base::write ( const char *  value,
size_t  size 
) [inline, protected]

Definition at line 128 of file section_writer_base.hpp.

Here is the call graph for this function:


Member Data Documentation

Definition at line 142 of file section_writer_base.hpp.


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