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::QueryableVectorWriter Class Reference

#include <QueryableVectorStreamer.h>

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

Public Member Functions

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

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.

354  :
355  m_objectType( objectType ),
356  m_offset( 0 ),
357  m_localElement(),
358  m_writer(ClassUtils::containerSubType(objectType,"store_base_type"), mapping, contSchema ){
359 }
Reflex::Type containerSubType(const Reflex::Type &typ, const std::string &subTypeName)
Definition: ClassUtils.cc:389
ora::QueryableVectorWriter::~QueryableVectorWriter ( )
virtual

Definition at line 361 of file QueryableVectorStreamer.cc.

361  {
362 }

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().

Referenced by psClasses.BuildThread::run().

366  {
367  m_offset = &offset;
369  return m_writer.build( m_localElement, data, operationBuffer );
370 }
unsigned int offset(bool)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool build(DataElement &offset, IRelationalData &relationalData, RelationalBuffer &operationBuffer)
void ora::QueryableVectorWriter::setRecordId ( const std::vector< int > &  identity)
virtual

Implements ora::IRelationalWriter.

Definition at line 372 of file QueryableVectorStreamer.cc.

372  {
373  m_writer.setRecordId( identity );
374 }
void setRecordId(const std::vector< int > &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().

Referenced by pkg.AbstractPkg::generate().

377  {
378  if(!m_offset){
379  throwException("The streamer has not been built.",
380  "QueryableVectorWriter::write");
381  }
382  void* vectorAddress = m_offset->address( inputData );
383  Reflex::Object vectorObj( m_objectType,const_cast<void*>(vectorAddress));
384  vectorObj.Invoke("load",0);
385  void* storageAddress = 0;
386  vectorObj.Invoke("storageAddress",storageAddress);
387  m_writer.write( oid, storageAddress );
388 }
void write(int oid, const void *data)
Writes a data element.
void * address(const void *topLevelAddress) const
Definition: DataElement.cc:48
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
tuple inputData
Definition: idDealer.py:72

Member Data Documentation

DataElement ora::QueryableVectorWriter::m_localElement
private

Definition at line 34 of file QueryableVectorStreamer.h.

Reflex::Type ora::QueryableVectorWriter::m_objectType
private

Definition at line 32 of file QueryableVectorStreamer.h.

DataElement* ora::QueryableVectorWriter::m_offset
private

Definition at line 33 of file QueryableVectorStreamer.h.

PVectorWriter ora::QueryableVectorWriter::m_writer
private

Definition at line 36 of file QueryableVectorStreamer.h.