CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::QueryableVectorWriter Class Reference

#include <QueryableVectorStreamer.h>

Inheritance diagram for ora::QueryableVectorWriter:
ora::IRelationalWriter

List of all members.

Public Member Functions

bool build (DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
 QueryableVectorWriter (const Reflex::Type &objectType, MappingElement &mapping, ContainerSchema &contSchema)
 Constructor.
void setRecordId (const std::vector< int > &identity)
void write (int oid, const void *data)
 Writes a data element.
virtual ~QueryableVectorWriter ()

Private Attributes

DataElement m_localElement
Reflex::Type m_objectType
DataElementm_offset
PVectorWriter m_writer

Detailed Description

Definition at line 21 of file QueryableVectorStreamer.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 352 of file QueryableVectorStreamer.cc.

                                                                                :
  m_objectType( objectType ),
  m_offset( 0 ),
  m_localElement(),
  m_writer(ClassUtils::containerSubType(objectType,"store_base_type"), mapping, contSchema ){
}
ora::QueryableVectorWriter::~QueryableVectorWriter ( ) [virtual]

Definition at line 361 of file QueryableVectorStreamer.cc.

                                                {
}

Member Function Documentation

bool ora::QueryableVectorWriter::build ( DataElement offset,
IRelationalData relationalData,
RelationalBuffer operationBuffer 
) [virtual]

Implements ora::IRelationalWriter.

Definition at line 364 of file QueryableVectorStreamer.cc.

References evf::evtn::offset().

                                                                           {
  m_offset = &offset;
  m_localElement.clear();
  return m_writer.build( m_localElement, data, operationBuffer );
}
void ora::QueryableVectorWriter::setRecordId ( const std::vector< int > &  identity) [virtual]

Implements ora::IRelationalWriter.

Definition at line 372 of file QueryableVectorStreamer.cc.

                                                                          {
  m_writer.setRecordId( identity );
}
void ora::QueryableVectorWriter::write ( int  oid,
const void *  data 
) [virtual]

Writes a data element.

Implements ora::IRelationalWriter.

Definition at line 376 of file QueryableVectorStreamer.cc.

References ora::throwException().

                                                               {
  if(!m_offset){
    throwException("The streamer has not been built.",
                   "QueryableVectorWriter::write");
  }
  void* vectorAddress = m_offset->address( inputData );
  Reflex::Object vectorObj( m_objectType,const_cast<void*>(vectorAddress));
  vectorObj.Invoke("load",0);
  void* storageAddress = 0;
  vectorObj.Invoke("storageAddress",storageAddress);
  m_writer.write( oid, storageAddress );
}

Member Data Documentation

Definition at line 34 of file QueryableVectorStreamer.h.

Definition at line 32 of file QueryableVectorStreamer.h.

Definition at line 33 of file QueryableVectorStreamer.h.

Definition at line 36 of file QueryableVectorStreamer.h.