CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::ObjectWriter Class Reference

#include <ObjectStreamer.h>

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

List of all members.

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.
virtual ~ObjectWriter ()

Private Attributes

std::vector< IRelationalWriter * > m_writers

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 109 of file ObjectStreamer.cc.

                                                              :
  ObjectStreamerBase( objectType, mapping, contSchema ),
  m_writers(){
}
ora::ObjectWriter::~ObjectWriter ( ) [virtual]

Definition at line 116 of file ObjectStreamer.cc.

                              {
  for( std::vector< IRelationalWriter* >::iterator iW = m_writers.begin();
       iW != m_writers.end(); ++iW ){
    delete *iW;
  }
  m_writers.clear();
}

Member Function Documentation

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

Implements ora::IRelationalWriter.

Definition at line 124 of file ObjectStreamer.cc.

                                                                {
  return buildDataMembers( dataElement, relationalData, &operationBuffer );
}
void ora::ObjectWriter::processDataMember ( DataElement dataElement,
IRelationalData relationalData,
Reflex::Type &  dataMemberType,
MappingElement dataMemberMapping,
RelationalBuffer operationBuffer 
) [virtual]

Implements ora::ObjectStreamerBase.

Definition at line 146 of file ObjectStreamer.cc.

References ora::IRelationalWriter::build().

                                                                              {
  IRelationalWriter* dataMemberWriter = m_streamerFactory.newWriter( dataMemberType, dataMemberMapping );
  m_writers.push_back( dataMemberWriter );
  dataMemberWriter->build( dataMemberElement, relationalData, *operationBuffer );
}
void ora::ObjectWriter::setRecordId ( const std::vector< int > &  identity) [virtual]

Implements ora::IRelationalWriter.

Definition at line 130 of file ObjectStreamer.cc.

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

Writes a data element.

Implements ora::IRelationalWriter.

Definition at line 138 of file ObjectStreamer.cc.

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

Member Data Documentation

Definition at line 50 of file ObjectStreamer.h.