CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::ObjectReader Class Reference

#include <ObjectStreamer.h>

Inheritance diagram for ora::ObjectReader:
ora::ObjectStreamerBase ora::IRelationalReader

List of all members.

Public Member Functions

bool build (DataElement &offset, IRelationalData &relationalData)
void clear ()
 ObjectReader (const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
void processDataMember (DataElement &dataElement, IRelationalData &relationalData, Reflex::Type &dataMemberType, MappingElement &dataMemberMapping, RelationalBuffer *operationBuffer)
void read (void *destination)
 Reads a data element.
void select (int oid)
void setRecordId (const std::vector< int > &identity)
virtual ~ObjectReader ()

Private Attributes

std::vector< IRelationalReader * > m_readers

Detailed Description

Definition at line 78 of file ObjectStreamer.h.


Constructor & Destructor Documentation

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

Definition at line 233 of file ObjectStreamer.cc.

                                                              :
  ObjectStreamerBase( objectType, mapping, contSchema ),
  m_readers(){
}
ora::ObjectReader::~ObjectReader ( ) [virtual]

Definition at line 240 of file ObjectStreamer.cc.

                              {
  for( std::vector< IRelationalReader* >::iterator iStr = m_readers.begin();
       iStr != m_readers.end(); ++iStr ){
    delete *iStr;
  }
  m_readers.clear();
}

Member Function Documentation

bool ora::ObjectReader::build ( DataElement offset,
IRelationalData relationalData 
) [virtual]

Implements ora::IRelationalReader.

Definition at line 248 of file ObjectStreamer.cc.

                                                               {
  return buildDataMembers( dataElement, relationalData, 0 );
}
void ora::ObjectReader::clear ( void  ) [virtual]

Implements ora::IRelationalReader.

Definition at line 275 of file ObjectStreamer.cc.

                           {
  for( std::vector< IRelationalReader* >::iterator iDepReader = m_readers.begin();
       iDepReader !=  m_readers.end(); ++iDepReader ){
    (*iDepReader)->clear();
  }
}
void ora::ObjectReader::processDataMember ( DataElement dataElement,
IRelationalData relationalData,
Reflex::Type &  dataMemberType,
MappingElement dataMemberMapping,
RelationalBuffer operationBuffer 
) [virtual]

Implements ora::ObjectStreamerBase.

Definition at line 282 of file ObjectStreamer.cc.

References ora::IRelationalReader::build().

                                                             {
  IRelationalReader* dataMemberReader = m_streamerFactory.newReader( dataMemberType, dataMemberMapping );
  m_readers.push_back( dataMemberReader );
  dataMemberReader->build( dataMemberElement, relationalData );
}
void ora::ObjectReader::read ( void *  destination) [virtual]

Reads a data element.

Read a data element.

Implements ora::IRelationalReader.

Definition at line 268 of file ObjectStreamer.cc.

                                      {
  for( std::vector< IRelationalReader* >::iterator iDepReader = m_readers.begin();
       iDepReader !=  m_readers.end(); ++iDepReader ){
    (*iDepReader)->read( data );
  }
}
void ora::ObjectReader::select ( int  oid) [virtual]

Implements ora::IRelationalReader.

Definition at line 253 of file ObjectStreamer.cc.

                                     {
  for( std::vector< IRelationalReader* >::iterator iDepReader = m_readers.begin();
       iDepReader !=  m_readers.end(); ++iDepReader ){
    (*iDepReader)->select( oid );
  }
}
void ora::ObjectReader::setRecordId ( const std::vector< int > &  identity) [virtual]

Implements ora::IRelationalReader.

Definition at line 260 of file ObjectStreamer.cc.

                                                                 {
  for( std::vector< IRelationalReader* >::iterator iDepReader = m_readers.begin();
       iDepReader !=  m_readers.end(); ++iDepReader ){
    (*iDepReader)->setRecordId( identity );
  }  
}

Member Data Documentation

Definition at line 103 of file ObjectStreamer.h.