CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::QueryableVectorUpdater Class Reference

#include <QueryableVectorStreamer.h>

Inheritance diagram for ora::QueryableVectorUpdater:
ora::IRelationalUpdater

List of all members.

Public Member Functions

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

Private Attributes

DataElement m_localElement
Reflex::Type m_objectType
DataElementm_offset
PVectorUpdater m_updater

Detailed Description

Definition at line 39 of file QueryableVectorStreamer.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 390 of file QueryableVectorStreamer.cc.

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

Definition at line 399 of file QueryableVectorStreamer.cc.

                                                  {
}

Member Function Documentation

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

Implements ora::IRelationalUpdater.

Definition at line 402 of file QueryableVectorStreamer.cc.

References evf::evtn::offset().

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

Implements ora::IRelationalUpdater.

Definition at line 410 of file QueryableVectorStreamer.cc.

                                                                           {
  m_updater.setRecordId( identity );
}
void ora::QueryableVectorUpdater::update ( int  oid,
const void *  data 
) [virtual]

Updates a data element.

Implements ora::IRelationalUpdater.

Definition at line 414 of file QueryableVectorStreamer.cc.

References ora::throwException().

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

Member Data Documentation

Definition at line 54 of file QueryableVectorStreamer.h.

Definition at line 52 of file QueryableVectorStreamer.h.

Definition at line 53 of file QueryableVectorStreamer.h.

Definition at line 56 of file QueryableVectorStreamer.h.