6 m_declaringScopeOffset(0),
11 Reflex::OffsetFunction offsetFunc ):
14 m_declaringScopeOffset(declaringScopeOffset),
15 m_offsetFunction(offsetFunc){
19 for(std::vector<DataElement*>::const_iterator iEl = m_children.begin();
20 iEl != m_children.end(); ++iEl ){
27 Reflex::OffsetFunction offsetFunction ){
30 m_children.push_back(child);
35 const void*
address = topLevelAddress;
36 size_t offset = m_declaringScopeOffset;
38 size_t parentOffset = m_parent->offset( topLevelAddress );
39 offset += parentOffset;
40 address =
static_cast<char*
>(
const_cast<void*
>(topLevelAddress))+parentOffset;
43 offset += m_offsetFunction( const_cast<void*>(address));
49 void* elementAddress =
static_cast< char*
>(
const_cast<void*
>(topLevelAddress)) +
offset( topLevelAddress );
50 return elementAddress;
55 return m_declaringScopeOffset;
59 for(std::vector<DataElement*>::const_iterator iEl = m_children.begin();
60 iEl != m_children.end(); ++iEl ){
void * address(const void *topLevelAddress) const
DataElement & addChild(size_t declaringScopeOffset, Reflex::OffsetFunction offsetFunction)
size_t declaringScopeOffset() const
size_t offset(const void *topLevelAddress) const
unsigned int offset(bool)
const DataElement * m_parent