test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::DataElement Class Reference

#include <DataElement.h>

Public Member Functions

DataElementaddChild (size_t declaringScopeOffset, size_toffset)
 
void * address (const void *topLevelAddress) const
 
void clear ()
 
 DataElement ()
 
 DataElement (size_t declaringScopeOffset, size_toffset)
 
size_t declaringScopeOffset () const
 
size_t offset (const void *topLevelAddress) const
 
virtual ~DataElement ()
 

Private Attributes

std::vector< DataElement * > m_children
 
size_t m_declaringScopeOffset
 
size_t m_offset
 
const DataElementm_parent
 

Detailed Description

Definition at line 10 of file DataElement.h.

Constructor & Destructor Documentation

ora::DataElement::DataElement ( )

Definition at line 4 of file DataElement.cc.

4  :
5  m_parent(0),
6  m_children(),
8  /*m_offsetFunction(0)*/ m_offset(0){
9 }
std::vector< DataElement * > m_children
Definition: DataElement.h:27
size_t m_declaringScopeOffset
Definition: DataElement.h:28
const DataElement * m_parent
Definition: DataElement.h:26
ora::DataElement::DataElement ( size_t  declaringScopeOffset,
size_t  offset 
)

Definition at line 11 of file DataElement.cc.

12  :
13  m_parent(0),
14  m_children(),
16  /*m_offsetFunction(offsetFunc)*/ m_offset(offset){
17 }
size_t declaringScopeOffset() const
Definition: DataElement.cc:54
size_t offset(const void *topLevelAddress) const
Definition: DataElement.cc:35
std::vector< DataElement * > m_children
Definition: DataElement.h:27
size_t m_declaringScopeOffset
Definition: DataElement.h:28
const DataElement * m_parent
Definition: DataElement.h:26
ora::DataElement::~DataElement ( )
virtual

Definition at line 19 of file DataElement.cc.

19  {
20  for(std::vector<DataElement*>::const_iterator iEl = m_children.begin();
21  iEl != m_children.end(); ++iEl ){
22  delete *iEl;
23  }
24 }
std::vector< DataElement * > m_children
Definition: DataElement.h:27

Member Function Documentation

ora::DataElement & ora::DataElement::addChild ( size_t  declaringScopeOffset,
size_t  offset 
)
void * ora::DataElement::address ( const void *  topLevelAddress) const

Definition at line 49 of file DataElement.cc.

References hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by ora::QueryableVectorReader::read(), ora::UniqueRefReader::read(), and ora::OraPtrReader::read().

49  {
50  void* elementAddress = static_cast< char* >( const_cast<void*>(topLevelAddress)) + offset( topLevelAddress );
51  return elementAddress;
52 }
size_t offset(const void *topLevelAddress) const
Definition: DataElement.cc:35
void ora::DataElement::clear ( void  )
size_t ora::DataElement::declaringScopeOffset ( ) const

Definition at line 54 of file DataElement.cc.

55 {
57 }
size_t m_declaringScopeOffset
Definition: DataElement.h:28
size_t ora::DataElement::offset ( const void *  topLevelAddress) const

Definition at line 35 of file DataElement.cc.

References hltrates_dqm_sourceclient-live_cfg::offset.

35  {
36  //const void* address = topLevelAddress;
38  if(m_parent){
39  size_t parentOffset = m_parent->offset( topLevelAddress );
40  offset += parentOffset;
41  //address = static_cast<char*>(const_cast<void*>(topLevelAddress))+parentOffset;
42  }
43  if(/*m_offsetFunction*/ m_offset){
44  offset += /*m_offsetFunction( const_cast<void*>(address))*/ m_offset;
45  }
46  return offset;
47 }
size_t offset(const void *topLevelAddress) const
Definition: DataElement.cc:35
size_t m_declaringScopeOffset
Definition: DataElement.h:28
const DataElement * m_parent
Definition: DataElement.h:26

Member Data Documentation

std::vector<DataElement*> ora::DataElement::m_children
private

Definition at line 27 of file DataElement.h.

size_t ora::DataElement::m_declaringScopeOffset
private

Definition at line 28 of file DataElement.h.

size_t ora::DataElement::m_offset
private

Definition at line 29 of file DataElement.h.

const DataElement* ora::DataElement::m_parent
private

Definition at line 26 of file DataElement.h.

Referenced by addChild().