DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
dabc::RecordFieldsMap Class Reference

#include <dabc/Record.h>

Public Member Functions

void ApplyDiff (const RecordFieldsMap &diff)
 Apply diff map One should use fields, generated with MakeAsDiffTo call. More...
 
void ClearChangeFlags ()
 Clear all change flags. More...
 
RecordFieldsMapClone ()
 Create complete copy of fields map. More...
 
void CopyFrom (const RecordFieldsMap &src, bool overwrite=true)
 Copy fields from source map. More...
 
RecordFieldField (const std::string &name)
 Direct access to the fields. More...
 
std::string FieldName (unsigned n) const
 
bool HasField (const std::string &name) const
 
void MakeAsDiffTo (const RecordFieldsMap &src)
 In the map only modified fields are remained Also dabc:delete field can appear which marks all removed fields. More...
 
void MoveFrom (RecordFieldsMap &src)
 Move fields from source map, delete no longer existing (except protected) More...
 
unsigned NumFields () const
 
 RecordFieldsMap ()
 
bool RemoveField (const std::string &name)
 
bool SaveTo (HStore &res)
 Save all field in json format. More...
 
uint64_t StoreSize (const std::string &nameprefix="")
 
bool Stream (iostream &s, const std::string &nameprefix="")
 
bool WasChanged () const
 Return true if any field was changed or map was modified (removed filed) More...
 
bool WasChangedWith (const std::string &prefix)
 Returns true when fields with specified prefix were changed. More...
 
virtual ~RecordFieldsMap ()
 

Protected Types

typedef std::map< std::string, dabc::RecordFieldFieldsMap
 

Protected Member Functions

void clear ()
 

Static Protected Member Functions

static bool match_prefix (const std::string &name, const std::string &prefix)
 

Protected Attributes

bool fChanged
 true when field was removed More...
 
FieldsMap fMap
 

Detailed Description

Definition at line 374 of file Record.h.

Member Typedef Documentation

◆ FieldsMap

typedef std::map<std::string, dabc::RecordField> dabc::RecordFieldsMap::FieldsMap
protected

Definition at line 376 of file Record.h.

Constructor & Destructor Documentation

◆ RecordFieldsMap()

dabc::RecordFieldsMap::RecordFieldsMap ( )

Definition at line 1372 of file Record.cxx.

◆ ~RecordFieldsMap()

dabc::RecordFieldsMap::~RecordFieldsMap ( )
virtual

Definition at line 1378 of file Record.cxx.

Member Function Documentation

◆ clear()

void dabc::RecordFieldsMap::clear ( )
inlineprotected

Definition at line 382 of file Record.h.

◆ match_prefix()

bool dabc::RecordFieldsMap::match_prefix ( const std::string &  name,
const std::string &  prefix 
)
staticprotected

Definition at line 1457 of file Record.cxx.

◆ StoreSize()

uint64_t dabc::RecordFieldsMap::StoreSize ( const std::string &  nameprefix = "")

Definition at line 1450 of file Record.cxx.

◆ Stream()

bool dabc::RecordFieldsMap::Stream ( iostream s,
const std::string &  nameprefix = "" 
)

Definition at line 1467 of file Record.cxx.

◆ HasField()

bool dabc::RecordFieldsMap::HasField ( const std::string &  name) const

Definition at line 1382 of file Record.cxx.

◆ RemoveField()

bool dabc::RecordFieldsMap::RemoveField ( const std::string &  name)

Definition at line 1387 of file Record.cxx.

◆ NumFields()

unsigned dabc::RecordFieldsMap::NumFields ( ) const
inline

Definition at line 397 of file Record.h.

◆ FieldName()

std::string dabc::RecordFieldsMap::FieldName ( unsigned  n) const

Definition at line 1397 of file Record.cxx.

◆ Field()

RecordField& dabc::RecordFieldsMap::Field ( const std::string &  name)
inline

Direct access to the fields.

Definition at line 401 of file Record.h.

◆ SaveTo()

bool dabc::RecordFieldsMap::SaveTo ( HStore res)

Save all field in json format.

Definition at line 1529 of file Record.cxx.

◆ CopyFrom()

void dabc::RecordFieldsMap::CopyFrom ( const RecordFieldsMap src,
bool  overwrite = true 
)

Copy fields from source map.

Definition at line 1543 of file Record.cxx.

◆ MoveFrom()

void dabc::RecordFieldsMap::MoveFrom ( RecordFieldsMap src)

Move fields from source map, delete no longer existing (except protected)

Definition at line 1550 of file Record.cxx.

◆ MakeAsDiffTo()

void dabc::RecordFieldsMap::MakeAsDiffTo ( const RecordFieldsMap src)

In the map only modified fields are remained Also dabc:delete field can appear which marks all removed fields.

Definition at line 1570 of file Record.cxx.

◆ ApplyDiff()

void dabc::RecordFieldsMap::ApplyDiff ( const RecordFieldsMap diff)

Apply diff map One should use fields, generated with MakeAsDiffTo call.

Definition at line 1586 of file Record.cxx.

◆ Clone()

dabc::RecordFieldsMap * dabc::RecordFieldsMap::Clone ( )

Create complete copy of fields map.

Definition at line 1440 of file Record.cxx.

◆ WasChanged()

bool dabc::RecordFieldsMap::WasChanged ( ) const

Return true if any field was changed or map was modified (removed filed)

Definition at line 1409 of file Record.cxx.

◆ WasChangedWith()

bool dabc::RecordFieldsMap::WasChangedWith ( const std::string &  prefix)

Returns true when fields with specified prefix were changed.

Definition at line 1420 of file Record.cxx.

◆ ClearChangeFlags()

void dabc::RecordFieldsMap::ClearChangeFlags ( )

Clear all change flags.

Definition at line 1433 of file Record.cxx.

Field Documentation

◆ fMap

FieldsMap dabc::RecordFieldsMap::fMap
protected

Definition at line 378 of file Record.h.

◆ fChanged

bool dabc::RecordFieldsMap::fChanged
protected

true when field was removed

Definition at line 380 of file Record.h.


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