ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
pool::DbTypeInfo Class Reference

#include <StorageSvc/DbTypeInfo.h>

Inheritance diagram for pool::DbTypeInfo:
Collaboration diagram for pool::DbTypeInfo:

Public Types

typedef RootType TypeH
 Definition of reflection class handle. More...
 
typedef std::vector< const DbColumn * > Columns
 Column Container definition. More...
 

Public Member Functions

void destroy ()
 Destroy type information; to be used with extreme care. More...
 
void addRef () const
 
void deleteRef () const
 Releases the ownership. More...
 
TypeH clazz (bool noIdScan=false) const
 Access to reflection class. If not known, by default scan all types for class ID. More...
 
const Columnscolumns () const
 Prepare for the case of discrete columns: Column information. More...
 
Columnscolumns ()
 Modify content of the object by editing columns. More...
 
const std::string toString () const
 Create string representation of the type information object. More...
 
DbStatus declareBase (const DbTypeInfo *pInfo)
 Allow usage of base classes. More...
 
const GuidshapeID () const
 Access database identifier. More...
 
GuidshapeID ()
 
void setShapeID (const Guid &id)
 Access database identifier. More...
 
GuidsetShapeID (const std::string &id)
 

Static Public Member Functions

static DbTypeInfocreate (const std::string &cl_name)
 Create type information using name. More...
 
static DbTypeInfocreate (const std::string &cl_name, Columns &cols)
 Create type information using name. More...
 
static DbTypeInfocreate (const Guid &guid)
 Create type information using Guid only Class must already be registered. More...
 
static DbTypeInfocreate (const Guid &guid, Columns &cols)
 Create type information using Guid only Class must already be registered. More...
 
static DbTypeInfocreateEx (const Guid &guid)
 Create type information using Guid only Class must already be registered. More...
 
static DbTypeInfocreateEx (const Guid &guid, Columns &cols)
 Create type information using Guid only Class must already be registered. More...
 
static const DbTypeInfofromString (const std::string &string_rep)
 Load type information object from string representation. More...
 
static const std::string typeName (const std::type_info &typ)
 Access type name by type identifier from RTTI. More...
 

Protected Member Functions

 DbTypeInfo (const Guid &guid, TypeH cl, Columns &cols)
 Constructor with type id. More...
 
 DbTypeInfo (const Guid &guid)
 
virtual ~DbTypeInfo ()
 Destructor. More...
 
DbStatus i_fromString (const std::string &string_rep)
 Load type information object from string representation. More...
 

Static Protected Member Functions

static DbTypeInforegShape (const Guid &guid, const TypeH &type, Columns &cols)
 try to add a new shape More...
 

Protected Attributes

Guid m_id
 Object global identifier. More...
 

Private Attributes

std::atomic< int > m_refCount
 Reference counter. More...
 
Columns m_columns
 Column definitions. More...
 
int m_mult
 Multiplicity. More...
 
CxxUtils::CachedValue< TypeHm_class
 Reflection class. More...
 

Detailed Description

Definition of class DbTypeInfo

Description: Generalized persistent type information

Author
M.Frank
Version
1.0

Definition at line 47 of file DbTypeInfo.h.

Member Typedef Documentation

◆ Columns

typedef std::vector<const DbColumn*> pool::DbTypeInfo::Columns

Column Container definition.

Definition at line 53 of file DbTypeInfo.h.

◆ TypeH

Definition of reflection class handle.

Definition at line 51 of file DbTypeInfo.h.

Constructor & Destructor Documentation

◆ DbTypeInfo() [1/2]

pool::DbTypeInfo::DbTypeInfo ( const Guid guid,
TypeH  cl,
Columns cols 
)
protected

Constructor with type id.

◆ DbTypeInfo() [2/2]

pool::DbTypeInfo::DbTypeInfo ( const Guid guid)
protected

◆ ~DbTypeInfo()

virtual pool::DbTypeInfo::~DbTypeInfo ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ addRef()

void pool::DbTypeInfo::addRef ( ) const
inline

Definition at line 103 of file DbTypeInfo.h.

103 { ++m_refCount; }

◆ clazz()

TypeH pool::DbTypeInfo::clazz ( bool  noIdScan = false) const

Access to reflection class. If not known, by default scan all types for class ID.

◆ columns() [1/2]

Columns& pool::DbTypeInfo::columns ( )
inline

Modify content of the object by editing columns.

Definition at line 111 of file DbTypeInfo.h.

111 { return m_columns; }

◆ columns() [2/2]

const Columns& pool::DbTypeInfo::columns ( ) const
inline

Prepare for the case of discrete columns: Column information.

Definition at line 109 of file DbTypeInfo.h.

109 { return m_columns; }

◆ create() [1/4]

static DbTypeInfo* pool::DbTypeInfo::create ( const Guid guid)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is Mandatory!

◆ create() [2/4]

static DbTypeInfo* pool::DbTypeInfo::create ( const Guid guid,
Columns cols 
)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is Mandatory!

◆ create() [3/4]

static DbTypeInfo* pool::DbTypeInfo::create ( const std::string &  cl_name)
static

Create type information using name.

Note: Existence of reflection class is Mandatory!

◆ create() [4/4]

static DbTypeInfo* pool::DbTypeInfo::create ( const std::string &  cl_name,
Columns cols 
)
static

Create type information using name.

◆ createEx() [1/2]

static DbTypeInfo* pool::DbTypeInfo::createEx ( const Guid guid)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is NOT mandatory!

◆ createEx() [2/2]

static DbTypeInfo* pool::DbTypeInfo::createEx ( const Guid guid,
Columns cols 
)
static

Create type information using Guid only Class must already be registered.

Note: Existence of reflection class is NOT mandatory!

◆ declareBase()

DbStatus pool::DbTypeInfo::declareBase ( const DbTypeInfo pInfo)

Allow usage of base classes.

◆ deleteRef()

void pool::DbTypeInfo::deleteRef ( ) const

Releases the ownership.

◆ destroy()

void pool::DbTypeInfo::destroy ( )
inline

Destroy type information; to be used with extreme care.

Definition at line 80 of file DbTypeInfo.h.

80 { delete this; }

◆ fromString()

static const DbTypeInfo* pool::DbTypeInfo::fromString ( const std::string &  string_rep)
static

Load type information object from string representation.

◆ i_fromString()

DbStatus pool::DbTypeInfo::i_fromString ( const std::string &  string_rep)
protected

Load type information object from string representation.

◆ regShape()

static DbTypeInfo* pool::DbTypeInfo::regShape ( const Guid guid,
const TypeH type,
Columns cols 
)
staticprotected

try to add a new shape

◆ setShapeID() [1/2]

void pool::Shape::setShapeID ( const Guid id)
inlineinherited

Access database identifier.

Definition at line 48 of file Shape.h.

48 { m_id=id; }

◆ setShapeID() [2/2]

Guid& pool::Shape::setShapeID ( const std::string &  id)
inlineinherited

Definition at line 49 of file Shape.h.

49 { m_id.fromString(id); return shapeID(); }

◆ shapeID() [1/2]

Guid& pool::Shape::shapeID ( )
inlineinherited

Definition at line 46 of file Shape.h.

46 { return m_id; }

◆ shapeID() [2/2]

const Guid& pool::Shape::shapeID ( ) const
inlineinherited

Access database identifier.

Definition at line 45 of file Shape.h.

45 { return m_id; }

◆ toString()

const std::string pool::DbTypeInfo::toString ( ) const

Create string representation of the type information object.

◆ typeName()

static const std::string pool::DbTypeInfo::typeName ( const std::type_info &  typ)
static

Access type name by type identifier from RTTI.

Member Data Documentation

◆ m_class

CxxUtils::CachedValue<TypeH> pool::DbTypeInfo::m_class
private

Reflection class.

Definition at line 63 of file DbTypeInfo.h.

◆ m_columns

Columns pool::DbTypeInfo::m_columns
private

Column definitions.

Definition at line 59 of file DbTypeInfo.h.

◆ m_id

Guid pool::Shape::m_id
protectedinherited

Object global identifier.

Definition at line 38 of file Shape.h.

◆ m_mult

int pool::DbTypeInfo::m_mult
private

Multiplicity.

Definition at line 61 of file DbTypeInfo.h.

◆ m_refCount

std::atomic<int> pool::DbTypeInfo::m_refCount
mutableprivate

Reference counter.

Definition at line 57 of file DbTypeInfo.h.


The documentation for this class was generated from the following file:
pool::Shape::shapeID
const Guid & shapeID() const
Access database identifier.
Definition: Shape.h:45
pool::DbTypeInfo::m_refCount
std::atomic< int > m_refCount
Reference counter.
Definition: DbTypeInfo.h:57
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
pool::DbTypeInfo::m_columns
Columns m_columns
Column definitions.
Definition: DbTypeInfo.h:59
Guid::fromString
const Guid & fromString(const std::string &s)
Automatic conversion from string representation.
Definition: Guid.cxx:65
pool::Shape::m_id
Guid m_id
Object global identifier.
Definition: Shape.h:38