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 edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
 
void processDataMember (DataElement &dataElement, IRelationalData &relationalData, edm::TypeWithDict &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 edm::TypeWithDict &objType, RelationalBuffer *operationBuffer)
 
bool buildDataMembers (DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer *operationBuffer)
 
 ObjectStreamerBase (const edm::TypeWithDict &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 edm::TypeWithDict objectType,
MappingElement mapping,
ContainerSchema contSchema 
)

Definition at line 141 of file ObjectStreamer.cc.

143  :
144  ObjectStreamerBase( objectType, mapping, contSchema ),
145  m_writers(){
146 }
ObjectStreamerBase(const edm::TypeWithDict &objectType, MappingElement &mapping, ContainerSchema &contSchema)
std::vector< IRelationalWriter * > m_writers
ora::ObjectWriter::~ObjectWriter ( )
virtual

Definition at line 148 of file ObjectStreamer.cc.

148  {
149  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
150  iW != m_writers.end(); ++iW ){
151  delete *iW;
152  }
153  m_writers.clear();
154 }
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 156 of file ObjectStreamer.cc.

Referenced by psClasses.BuildThread::run().

158  {
159  return buildDataMembers( dataElement, relationalData, &operationBuffer );
160 }
bool buildDataMembers(DataElement &dataElement, IRelationalData &relationalData, RelationalBuffer *operationBuffer)
void ora::ObjectWriter::processDataMember ( DataElement dataElement,
IRelationalData relationalData,
edm::TypeWithDict dataMemberType,
MappingElement dataMemberMapping,
RelationalBuffer operationBuffer 
)
virtual

Implements ora::ObjectStreamerBase.

Definition at line 178 of file ObjectStreamer.cc.

References ora::IRelationalWriter::build().

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

Implements ora::IRelationalWriter.

Definition at line 162 of file ObjectStreamer.cc.

162  {
163  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
164  iW != m_writers.end(); ++iW ){
165  (*iW)->setRecordId( identity );
166  }
167 }
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 170 of file ObjectStreamer.cc.

Referenced by pkg.AbstractPkg::generate(), and querying.connection::write_and_commit().

171  {
172  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
173  iW != m_writers.end(); ++iW ){
174  (*iW)->write( oid, data );
175  }
176 }
std::vector< IRelationalWriter * > m_writers

Member Data Documentation

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

Definition at line 50 of file ObjectStreamer.h.