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::ObjectWriter Class Reference

#include <ObjectStreamer.h>

Inheritance diagram for ora::ObjectWriter:
ora::ObjectStreamerBase ora::IRelationalWriter

Public Member Functions

bool build (DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
 
 ObjectWriter (const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
 
void processDataMember (DataElement &dataElement, IRelationalData &relationalData, Reflex::Type &dataMemberType, MappingElement &dataMemberMapping, RelationalBuffer *operationBuffer)
 
void setRecordId (const std::vector< int > &identity)
 
void write (int oid, const void *data)
 Writes a data element. More...
 
virtual ~ObjectWriter ()
 
- Public Member Functions inherited from ora::ObjectStreamerBase
void buildBaseDataMembers (DataElement &dataElement, IRelationalData &relationalData, const Reflex::Type &objType, RelationalBuffer *operationBuffer)
 
bool buildDataMembers (DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer *operationBuffer)
 
 ObjectStreamerBase (const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
 
virtual ~ObjectStreamerBase ()
 
- Public Member Functions inherited from ora::IRelationalWriter
virtual ~IRelationalWriter ()
 Destructor. More...
 

Private Attributes

std::vector< IRelationalWriter * > m_writers
 

Additional Inherited Members

- Protected Attributes inherited from ora::ObjectStreamerBase
RelationalStreamerFactory m_streamerFactory
 

Detailed Description

Definition at line 29 of file ObjectStreamer.h.

Constructor & Destructor Documentation

ora::ObjectWriter::ObjectWriter ( const Reflex::Type &  objectType,
MappingElement mapping,
ContainerSchema contSchema 
)

Definition at line 138 of file ObjectStreamer.cc.

140  :
141  ObjectStreamerBase( objectType, mapping, contSchema ),
142  m_writers(){
143 }
std::vector< IRelationalWriter * > m_writers
ObjectStreamerBase(const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
ora::ObjectWriter::~ObjectWriter ( )
virtual

Definition at line 145 of file ObjectStreamer.cc.

145  {
146  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
147  iW != m_writers.end(); ++iW ){
148  delete *iW;
149  }
150  m_writers.clear();
151 }
std::vector< IRelationalWriter * > m_writers

Member Function Documentation

bool ora::ObjectWriter::build ( DataElement dataElement,
IRelationalData relationalData,
RelationalBuffer operationBuffer 
)
virtual

Implements ora::IRelationalWriter.

Definition at line 153 of file ObjectStreamer.cc.

Referenced by psClasses.BuildThread::run().

155  {
156  return buildDataMembers( dataElement, relationalData, &operationBuffer );
157 }
bool buildDataMembers(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer *operationBuffer)
void ora::ObjectWriter::processDataMember ( DataElement dataElement,
IRelationalData relationalData,
Reflex::Type &  dataMemberType,
MappingElement dataMemberMapping,
RelationalBuffer operationBuffer 
)
virtual

Implements ora::ObjectStreamerBase.

Definition at line 175 of file ObjectStreamer.cc.

References ora::IRelationalWriter::build().

179  {
180  IRelationalWriter* dataMemberWriter = m_streamerFactory.newWriter( dataMemberType, dataMemberMapping );
181  m_writers.push_back( dataMemberWriter );
182  dataMemberWriter->build( dataMemberElement, relationalData, *operationBuffer );
183 }
std::vector< IRelationalWriter * > m_writers
IRelationalWriter * newWriter(const Reflex::Type &dataType, MappingElement &dataMapping)
RelationalStreamerFactory m_streamerFactory
void ora::ObjectWriter::setRecordId ( const std::vector< int > &  identity)
virtual

Implements ora::IRelationalWriter.

Definition at line 159 of file ObjectStreamer.cc.

159  {
160  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
161  iW != m_writers.end(); ++iW ){
162  (*iW)->setRecordId( identity );
163  }
164 }
std::vector< IRelationalWriter * > m_writers
void ora::ObjectWriter::write ( int  oid,
const void *  data 
)
virtual

Writes a data element.

Implements ora::IRelationalWriter.

Definition at line 167 of file ObjectStreamer.cc.

Referenced by pkg.AbstractPkg::generate().

168  {
169  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
170  iW != m_writers.end(); ++iW ){
171  (*iW)->write( oid, data );
172  }
173 }
std::vector< IRelationalWriter * > m_writers
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82

Member Data Documentation

std::vector< IRelationalWriter* > ora::ObjectWriter::m_writers
private

Definition at line 50 of file ObjectStreamer.h.