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

#include <RelationalMapping.h>

Public Member Functions

IRelationalMappingnewProcessor (const edm::TypeWithDict &attributeType, bool blobStreaming=false)
 
 RelationalMappingFactory (TableRegister &tableRegister)
 
virtual ~RelationalMappingFactory ()
 

Private Attributes

TableRegisterm_tableRegister
 

Detailed Description

Definition at line 35 of file RelationalMapping.h.

Constructor & Destructor Documentation

ora::RelationalMappingFactory::RelationalMappingFactory ( TableRegister tableRegister)
explicit

Definition at line 98 of file RelationalMapping.cc.

98  :
99  m_tableRegister( tableRegister ){
100 }
ora::RelationalMappingFactory::~RelationalMappingFactory ( )
virtual

Definition at line 102 of file RelationalMapping.cc.

102  {
103 }

Member Function Documentation

ora::IRelationalMapping * ora::RelationalMappingFactory::newProcessor ( const edm::TypeWithDict attributeType,
bool  blobStreaming = false 
)

Definition at line 105 of file RelationalMapping.cc.

References edm::TypeWithDict::hasBase(), edm::TypeWithDict::isArray(), edm::TypeWithDict::isPointer(), edm::TypeWithDict::isReference(), ora::ClassUtils::isTypeContainer(), ora::ClassUtils::isTypeOraPointer(), ora::ClassUtils::isTypePrimitive(), ora::ClassUtils::isTypeUniqueReference(), and ora::ClassUtils::resolvedType().

Referenced by ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::OraPtrMapping::process(), ora::ArrayMapping::process(), ora::CArrayMapping::process(), ora::ObjectMapping::process(), and ora::processBaseClasses().

106  {
107  if( blobStreaming ){
108  return new BlobMapping( attributeType, m_tableRegister );
109  }
110  edm::TypeWithDict resType = ClassUtils::resolvedType( attributeType );
111  if ( ora::ClassUtils::isTypePrimitive(resType) ) {
112  return new PrimitiveMapping( attributeType, m_tableRegister );
113  }
114  else if ( resType.isArray() ){
115  return new CArrayMapping( attributeType, m_tableRegister );
116  }
117  else if ( ora::ClassUtils::isTypeContainer( resType ) ) {
118  return new ArrayMapping( attributeType, m_tableRegister );
119  }
120  else if ( resType.isPointer() || resType.isReference() ){
121  return new EmptyMapping();
122  }
123  else if ( ora::ClassUtils::isTypeOraPointer( resType )){
124  return new OraPtrMapping( attributeType, m_tableRegister );
125  }
126  else if ( ora::ClassUtils::isTypeUniqueReference( resType )){
127  return new UniqueReferenceMapping( attributeType, m_tableRegister );
128  }
129  else if ( resType == typeid(ora::Reference) ||
130  resType.hasBase( edm::TypeWithDict( typeid(ora::Reference) ) ) ){
131  return new OraReferenceMapping( attributeType, m_tableRegister );
132  }
133  else if ( resType == typeid(ora::NamedReference) ||
134  resType.hasBase( edm::TypeWithDict( typeid(ora::NamedReference) ) ) ){
135  return new NamedRefMapping( attributeType, m_tableRegister );
136  }
137  else { // embeddedobject
138  return new ObjectMapping( attributeType, m_tableRegister );
139  }
140  return 0; // make the compiler happy -- we should never come here !!
141 }
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:486
bool hasBase(std::string const &) const
bool isTypePrimitive(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:221
bool isTypeOraPointer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:323
bool isArray() const
bool isTypeUniqueReference(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:343
bool isReference() const
bool isPointer() const
bool isTypeContainer(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:225

Member Data Documentation

TableRegister& ora::RelationalMappingFactory::m_tableRegister
private

Definition at line 44 of file RelationalMapping.h.