Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbBdbSchemaUtils Class Reference

This class provides Objectivity/DB schema services. More...

#include <CdbBdbSchemaUtils.hh>

List of all members.

Public Types

typedef unsigned int LocalTypeID
 The internal type identifier.


Public Member Functions

bool isA (const ooTypeNumber theDerivedTypeNumber, const ooTypeNumber theBaseTypeNumber) const
 Check if one class (specified by its type number) derives from another one.

bool typeNumberToClassName (const ooTypeNumber theTypeNumber, std::string &theClassName) const
 Translate a type number into its class name.

bool classNameToTypeNumber (const char *theClassName, ooTypeNumber &theTypeNumber) const
 Translate a class name into its type number.

bool loadDependencyTree (Tree &theTree) const
 Get dependency tree for all known type numbers.

bool update ()
 Update class information from the federation's schema.


Static Public Member Functions

CdbBdbSchemaUtils & instance ()
 Accessor for the singleton.


Static Public Attributes

bool debugMode = false


Detailed Description

This class provides Objectivity/DB schema services.

These services are either missing or inproperly implemented in the standard Objectivity/DB C++ API. The current implementation of this class uses the Active Schema API.

This class is implemented as the singleton with lazy instantiation.to extract schema information from the federation.

The class does _NOT_ do its own transction management. Therefore its client must supply proper transaction environment (READ) when using this class's methods.

Definition at line 27 of file CdbBdbSchemaUtils.hh.


Member Typedef Documentation

typedef unsigned int CdbBdbSchemaUtils::LocalTypeID
 

The internal type identifier.

This type is used in the implementation of the current class as a replacement for the non-contigous ooTypeNumber.

Definition at line 36 of file CdbBdbSchemaUtils.hh.

Referenced by isA(), and update().


Member Function Documentation

bool CdbBdbSchemaUtils::classNameToTypeNumber const char *    theClassName,
ooTypeNumber &    theTypeNumber
const
 

Translate a class name into its type number.

The method will return "false" if specified class name is unknown.

Parameters:
theClassName  the class name in question
theTypeNumber  its type number

Definition at line 337 of file CdbBdbSchemaUtils.cc.

CdbBdbSchemaUtils & CdbBdbSchemaUtils::instance   [static]
 

Accessor for the singleton.

The very first call to the accessor would instantiate the singleton.

Definition at line 281 of file CdbBdbSchemaUtils.cc.

Referenced by CdbBdb2RooNTupleConverter< P, R, P_ELEMENT_CONVERSION_RULES, R_ELEMENT_CONVERSION_RULES >::CdbBdb2RooNTupleConverter(), and CdbBdbNTupleConversionImpl_Helper< PERSISTENT, T, NCOL, ELEMENT_CONVERSION_RULES >::to_transient().

bool CdbBdbSchemaUtils::isA const ooTypeNumber    theDerivedTypeNumber,
const ooTypeNumber    theBaseTypeNumber
const
 

Check if one class (specified by its type number) derives from another one.

If either of the passed type number is unknown to the current federation's schema then negative result will always be returned.

If both types parameters have the same value than positive results always gets returned unless the type number is unknown.

Returns:
a result of the comparision
Parameters:
theDerivedTypeNumber  the derived type identifier
theBaseTypeNumber  its potential base type

Definition at line 304 of file CdbBdbSchemaUtils.cc.

References LocalTypeID.

Referenced by CdbBdb2RooNTupleConverter< P, R, P_ELEMENT_CONVERSION_RULES, R_ELEMENT_CONVERSION_RULES >::CdbBdb2RooNTupleConverter().

bool CdbBdbSchemaUtils::loadDependencyTree Tree   theTree const
 

Get dependency tree for all known type numbers.

The method (if successfull) would set up a user supplied object with the full tree.

See also:
CdbBdbSchemaUtils::Node

CdbBdbSchemaUtils::Tree

Definition at line 351 of file CdbBdbSchemaUtils.cc.

References CdbBdbSchemaUtils::Tree::load().

bool CdbBdbSchemaUtils::typeNumberToClassName const ooTypeNumber    theTypeNumber,
std::string &    theClassName
const
 

Translate a type number into its class name.

The method will return "false" if specified type number is unknown or does not correspond to the class.

Parameters:
theTypeNumber  the type number in question
theClassName  its class name

Definition at line 325 of file CdbBdbSchemaUtils.cc.

Referenced by CdbBdb2RooNTupleConverter< P, R, P_ELEMENT_CONVERSION_RULES, R_ELEMENT_CONVERSION_RULES >::CdbBdb2RooNTupleConverter(), and CdbBdbNTupleConversionImpl_Helper< PERSISTENT, T, NCOL, ELEMENT_CONVERSION_RULES >::to_transient().

bool CdbBdbSchemaUtils::update  
 

Update class information from the federation's schema.

This method will drop the current object's cache and reload it fresh from the federation.

The method will return "false' should any problem occure durinig its execution.

Definition at line 358 of file CdbBdbSchemaUtils.cc.

References LocalTypeID.


Member Data Documentation

bool CdbBdbSchemaUtils::debugMode = false [static]
 

Definition at line 278 of file CdbBdbSchemaUtils.cc.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:18 2005 for CDB by doxygen1.3-rc3