#include <InlineCArrayStreamer.h>
Public Member Functions | |
bool | buildDataElement (DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer *operationBuffer) |
InlineCArrayStreamerBase (const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema) | |
virtual void | processArrayElement (DataElement &arrayElementOffset, IRelationalData &relationalData, MappingElement &arrayElementMapping, RelationalBuffer *operationBuffer)=0 |
virtual | ~InlineCArrayStreamerBase () |
Protected Attributes | |
Reflex::Type | m_arrayType |
Reflex::Type | m_objectType |
RelationalStreamerFactory | m_streamerFactory |
Private Attributes | |
MappingElement & | m_mapping |
Definition at line 15 of file InlineCArrayStreamer.h.
ora::InlineCArrayStreamerBase::InlineCArrayStreamerBase | ( | const Reflex::Type & | objectType, |
MappingElement & | mapping, | ||
ContainerSchema & | contSchema | ||
) |
Definition at line 12 of file InlineCArrayStreamer.cc.
: m_objectType( objectType ), m_arrayType(), m_streamerFactory( contSchema ), m_mapping( mapping ){ }
ora::InlineCArrayStreamerBase::~InlineCArrayStreamerBase | ( | ) | [virtual] |
Definition at line 21 of file InlineCArrayStreamer.cc.
{ }
bool ora::InlineCArrayStreamerBase::buildDataElement | ( | DataElement & | dataElement, |
IRelationalData & | relationalData, | ||
RelationalBuffer * | operationBuffer | ||
) |
Definition at line 25 of file InlineCArrayStreamer.cc.
References ora::DataElement::addChild(), i, ora::ClassUtils::resolvedType(), ora::throwException(), and ora::MappingRules::variableNameForArrayIndex().
{ m_arrayType = ClassUtils::resolvedType( m_objectType.ToType() ); if ( ! m_arrayType ) { throwException( "Missing dictionary information for the element of array \"" + m_objectType.Name(Reflex::SCOPED) + "\"", "InlineCArrayStreamerBase::buildDataElement" ); } // Loop over the elements of the array. for ( unsigned int i=0;i<m_objectType.ArrayLength();i++){ // Form the element name std::string arrayElementLabel = MappingRules::variableNameForArrayIndex( m_mapping.variableName(),i); // Retrieve the relevant mapping element MappingElement::iterator iMe = m_mapping.find( arrayElementLabel ); if ( iMe == m_mapping.end() ) { throwException( "Mapping for Array Element \"" + arrayElementLabel + "\" not found in the mapping element", "InlineCArrayStreamerBase::buildDataElement" ); } MappingElement& arrayElementMapping = iMe->second; DataElement& arrayElement = dataElement.addChild( i*m_arrayType.SizeOf(), 0 ); processArrayElement( arrayElement, relationalData, arrayElementMapping, operationBuffer ); } return true; }
virtual void ora::InlineCArrayStreamerBase::processArrayElement | ( | DataElement & | arrayElementOffset, |
IRelationalData & | relationalData, | ||
MappingElement & | arrayElementMapping, | ||
RelationalBuffer * | operationBuffer | ||
) | [pure virtual] |
Implemented in ora::InlineCArrayWriter, ora::InlineCArrayUpdater, and ora::InlineCArrayReader.
Reflex::Type ora::InlineCArrayStreamerBase::m_arrayType [protected] |
Definition at line 30 of file InlineCArrayStreamer.h.
Definition at line 34 of file InlineCArrayStreamer.h.
Reflex::Type ora::InlineCArrayStreamerBase::m_objectType [protected] |
Definition at line 29 of file InlineCArrayStreamer.h.
Definition at line 31 of file InlineCArrayStreamer.h.