CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::PrimitiveMapping Class Reference

#include <RelationalMapping.h>

Inheritance diagram for ora::PrimitiveMapping:
ora::IRelationalMapping

List of all members.

Public Member Functions

 PrimitiveMapping (const Reflex::Type &attributeType, TableRegister &tableRegister)
void process (MappingElement &parentElement, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema)
 ~PrimitiveMapping ()

Private Attributes

TableRegisterm_tableRegister
Reflex::Type m_type

Detailed Description

Definition at line 47 of file RelationalMapping.h.


Constructor & Destructor Documentation

ora::PrimitiveMapping::PrimitiveMapping ( const Reflex::Type &  attributeType,
TableRegister tableRegister 
)

Definition at line 173 of file RelationalMapping.cc.

                                                                                                    :
  m_type(attributeType),m_tableRegister( tableRegister ){
}
ora::PrimitiveMapping::~PrimitiveMapping ( )

Definition at line 177 of file RelationalMapping.cc.

                                      {
}

Member Function Documentation

void ora::PrimitiveMapping::process ( MappingElement parentElement,
const std::string &  attributeName,
const std::string &  attributeNameForSchema,
const std::string &  scopeNameForSchema 
) [virtual]

Implements ora::IRelationalMapping.

Definition at line 180 of file RelationalMapping.cc.

References ora::ClassUtils::isTypeString(), ora::MappingElement::primitiveMappingElementType(), ora::processLeafElement(), ora::ClassUtils::resolvedType(), and lumiQTWidget::t.

                                                                          {
  Reflex::Type t = ClassUtils::resolvedType( m_type );
  const std::type_info* attrType = &t.TypeInfo();
  if(t.IsEnum()) attrType = &typeid(int);
  //std::string tn = ClassUtils::demangledName(*attrType);
  if(ClassUtils::isTypeString( t )) attrType = &typeid(std::string);
  std::string typeName = coral::AttributeSpecification::typeNameForId(*attrType);
  
  processLeafElement(parentElement,
                     ora::MappingElement::primitiveMappingElementType(),
                     typeName,
                     attributeName,
                     attributeNameForSchema,
                     scopeNameForSchema,
                     m_tableRegister);  
}

Member Data Documentation

Definition at line 56 of file RelationalMapping.h.

Reflex::Type ora::PrimitiveMapping::m_type [private]

Definition at line 55 of file RelationalMapping.h.