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

DataObject Class Reference

A DataObject is the base class of any identifyable object on any data store. More...

#include <GaudiKernel/DataObject.h>

Inheritance diagram for DataObject:

IInspectable NTuple::Directory NTuple::Tuple ObjectContainerBase RefTableBase NTuple::File NTuple::TupleImp ObjectList ObjectVector RefTable1to1 RefTable1toN NTuple::ColumnWiseTuple NTuple::RowWiseTuple List of all members.

Public Types

typedef std::vector<Link*> LinkVector
typedef IDataDirectory::DirIterator DirIterator
 Data type: iterator over leaf objects. More...

typedef IDataDirectory::DirIterator ConstDirIterator
 Data type: iterator over leaf objects (CONST). More...

typedef LinkVector::iterator LinkIterator
 Data type: iterator over leaf links. More...

typedef LinkVector::const_iterator ConstLinkIterator
 Data type: iterator over leaf links (CONST). More...

enum  DirLinkType { INVALID, VALID }
 Directory link types. More...


Public Methods

 DataObject (const std::string& name = "")
 Standard Constructor. More...

virtual ~DataObject ()
 Standard Destructor. More...

virtual unsigned long addRef ()
 Add reference to object. More...

virtual unsigned long release ()
 release reference to object. More...

virtual unsigned long refCount () const
 Access reference count. More...

virtual const CLIDclID () const
 Retrieve reference to class definition structure. More...

virtual const unsigned char version () const
 Retrieve version number of this object representation. More...

virtual void setVersion (unsigned char vsn)
 Set version number of this object representation. More...

const std::string& localPath () const
 Retreive DataObject name. It is the name when registered in the store. More...

const std::string& location () const
 Name of the location this object resides in. More...

const std::string& fullpath () const
 Name of the full path in the data store leading to this object. More...

DataObject* parent ()
 Parent object. More...

const DataObject* parent () const
 Parent object. More...

DataObject* find (const std::string& path)
 Find leaf object. More...

const DataObject* find (const std::string& path) const
 Find leaf object. More...

IDataDirectoryleaf (const std::string& path)
 Find leaf directory. More...

const IDataDirectoryleaf (const std::string& path) const
 Find leaf directory. More...

void setDirectory (IDataDirectory* dir)
 Set pointer to data directory. More...

IDataDirectorydirectory ()
 Retrieve pointer to data directory. More...

const IDataDirectorydirectory () const
 Retrieve pointer to data directory. More...

virtual TransientStorestore ()
 Retrieve pointer to Transient Store. More...

virtual const TransientStorestore () const
 Retrieve pointer to Transient Store. More...

IOpaqueAddressaddress ()
 Retrieve Pointer to representation address. More...

const IOpaqueAddressaddress () const
 Retrieve Pointer to representation address. More...

DirIterator dirBegin ()
 Retrieve start iterator to directory. More...

ConstDirIterator dirBegin () const
 Retrieve start iterator to directory. More...

DirIterator dirEnd ()
 Retrieve end iterator to directory. More...

ConstDirIterator dirEnd () const
 Retrieve end iterator to directory. More...

LinkIterator linkBegin ()
 Retrieve start iterator to directory. More...

ConstLinkIterator linkBegin () const
 Retrieve start iterator to directory. More...

LinkIterator linkEnd ()
 Retrieve end iterator to directory. More...

ConstLinkIterator linkEnd () const
 Retrieve end iterator to directory. More...

size_t linkSize () const
 Retrieve number of links within the object. More...

LinksymLink (long id)
 Retrieve symbolic link identified by ID. More...

LinksymLink (DataObject* pObject)
 Retrieve symbolic link identified by object. More...

LinksymLink (const std::string& path)
 Retrieve symbolic link identified by path. More...

long addLink (const std::string& path, const DataObject* pObject) const
 Add link by object reference and path. More...

long removeLink (const DataObject* pObject) const
 Remove link by object reference. More...

long removeLink (const std::string& fullPath) const
 Remove link by object reference. More...

long removeLink (long id) const
 Remove link by link ID. More...

void clearLinks ()
 Remove all possibly existing symbolic links. More...

virtual StreamBufferserialize (StreamBuffer& s)
 Serialize the object for reading. More...

virtual StreamBufferserialize (StreamBuffer& s) const
 Serialize the object for writing. More...

virtual bool acceptInspector (IInspector* pI)
 Allow for data inspection. More...

virtual bool acceptInspector (IInspector* pI) const
 Allow for data inspection. More...

bool isLocked ( ) const
 Is the DataObject locked? More...

StatusCode setLocked ( )
 Lock the DataObject. More...


Static Public Methods

const CLIDclassID ()
 Retrieve reference to class definition structure (static access). More...


Private Methods

StatusCode setUnlocked ( )
 Unlock the DataObject. More...


Private Attributes

IDataDirectorym_pDirectory
 Pointer to directory with leaf objects. More...

unsigned long m_refCount
 Reference count. More...

LinkVector m_linkVector
 Store of symbolic links. More...

unsigned char m_version
 Version number. More...

bool m_isLocked
 Locked indicator. More...


Detailed Description

A DataObject is the base class of any identifyable object on any data store.

The base class supplies the implementation of data streaming.

Author(s):
M.Frank

Definition at line 30 of file DataObject.h.


Member Typedef Documentation

typedef IDataDirectory::DirIterator DataObject::ConstDirIterator
 

Data type: iterator over leaf objects (CONST).

Definition at line 99 of file DataObject.h.

typedef LinkVector::const_iterator DataObject::ConstLinkIterator
 

Data type: iterator over leaf links (CONST).

Definition at line 103 of file DataObject.h.

typedef IDataDirectory::DirIterator DataObject::DirIterator
 

Data type: iterator over leaf objects.

Definition at line 97 of file DataObject.h.

typedef LinkVector::iterator DataObject::LinkIterator
 

Data type: iterator over leaf links.

Definition at line 101 of file DataObject.h.

typedef std::vector<Link*> DataObject::LinkVector
 

Definition at line 95 of file DataObject.h.


Member Enumeration Documentation

enum DataObject::DirLinkType
 

Directory link types.

Enumeration values:
INVALID  
VALID  

Definition at line 33 of file DataObject.h.


Constructor & Destructor Documentation

DataObject::DataObject ( const std::string & name = "" )
 

Standard Constructor.

Definition at line 21 of file DataObject.cpp.

DataObject::~DataObject ( ) [virtual]
 

Standard Destructor.

Definition at line 30 of file DataObject.cpp.


Member Function Documentation

bool DataObject::acceptInspector ( IInspector * pI ) const [virtual]
 

Allow for data inspection.

Reimplemented from IInspectable.

Definition at line 372 of file DataObject.cpp.

bool DataObject::acceptInspector ( IInspector * pI ) [virtual]
 

Allow for data inspection.

Reimplemented from IInspectable.

Definition at line 360 of file DataObject.cpp.

long DataObject::addLink ( const std::string & path,
const DataObject * pObject ) const
 

Add link by object reference and path.

Definition at line 281 of file DataObject.cpp.

Referenced by SmartRefBase::accessData().

unsigned long DataObject::addRef ( ) [virtual]
 

Add reference to object.

Definition at line 50 of file DataObject.cpp.

Referenced by RegistryEntry::setObject(), and DataSvc::unregisterObject().

const IOpaqueAddress * DataObject::address ( ) const
 

Retrieve Pointer to representation address.

Definition at line 90 of file DataObject.cpp.

IOpaqueAddress * DataObject::address ( )
 

Retrieve Pointer to representation address.

Definition at line 85 of file DataObject.cpp.

Referenced by RegistryEntry::makeSoft().

const CLID & DataObject::clID ( ) const [virtual]
 

Retrieve reference to class definition structure.

Reimplemented in NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList, ObjectVector, RefTable1to1, and RefTable1toN.

Definition at line 231 of file DataObject.cpp.

Referenced by NTuple::Tuple::i_addItem(), and NTuple::Tuple::i_item().

const CLID & DataObject::classID ( ) [static]
 

Retrieve reference to class definition structure (static access).

Reimplemented in NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList, and ObjectVector.

Definition at line 236 of file DataObject.cpp.

Referenced by ObjectVector::clID(), ObjectList::clID(), NTuple::File::clID(), and NTuple::Directory::clID().

void DataObject::clearLinks ( )
 

Remove all possibly existing symbolic links.

Definition at line 342 of file DataObject.cpp.

Referenced by ~DataObject().

DataObject::ConstDirIterator DataObject::dirBegin ( ) const
 

Retrieve start iterator to directory.

Definition at line 100 of file DataObject.cpp.

DataObject::DirIterator DataObject::dirBegin ( )
 

Retrieve start iterator to directory.

Definition at line 95 of file DataObject.cpp.

DataObject::ConstDirIterator DataObject::dirEnd ( ) const
 

Retrieve end iterator to directory.

Definition at line 110 of file DataObject.cpp.

DataObject::DirIterator DataObject::dirEnd ( )
 

Retrieve end iterator to directory.

Definition at line 105 of file DataObject.cpp.

const IDataDirectory * DataObject::directory ( ) const
 

Retrieve pointer to data directory.

Definition at line 70 of file DataObject.cpp.

IDataDirectory * DataObject::directory ( )
 

Retrieve pointer to data directory.

Definition at line 65 of file DataObject.cpp.

Referenced by SmartDataLocator::SmartDataLocator(), SmartDataPtr::SmartDataPtr(), DataObject::Link::address(), DataSvc::clearSubTree(), SmartDataObjectPtr::findObject(), DataSvc::findObject(), RegistryEntry::findParent(), DataSvc::preLoad(), SmartDataObjectPtr::retrieveObject(), DataSvc::retrieveObject(), DataSvc::traverseSubTree(), DataSvc::unregisterObject(), DataSvc::updateObject(), and DataSvc::updateRegistryEntry().

const DataObject * DataObject::find ( const std::string & name ) const
 

Find leaf object.

Reimplemented in NTuple::TupleImp.

Definition at line 202 of file DataObject.cpp.

DataObject * DataObject::find ( const std::string & name )
 

Find leaf object.

Reimplemented in NTuple::TupleImp.

Definition at line 191 of file DataObject.cpp.

const std::string & DataObject::fullpath ( ) const
 

Name of the full path in the data store leading to this object.

Definition at line 271 of file DataObject.cpp.

bool DataObject::isLocked ( ) const
 

Is the DataObject locked?

Definition at line 383 of file DataObject.cpp.

const IDataDirectory * DataObject::leaf ( const std::string & path ) const
 

Find leaf directory.

Definition at line 222 of file DataObject.cpp.

IDataDirectory * DataObject::leaf ( const std::string & path )
 

Find leaf directory.

Definition at line 213 of file DataObject.cpp.

DataObject::ConstLinkIterator DataObject::linkBegin ( ) const
 

Retrieve start iterator to directory.

Definition at line 120 of file DataObject.cpp.

DataObject::LinkIterator DataObject::linkBegin ( )
 

Retrieve start iterator to directory.

Definition at line 115 of file DataObject.cpp.

DataObject::ConstLinkIterator DataObject::linkEnd ( ) const
 

Retrieve end iterator to directory.

Definition at line 130 of file DataObject.cpp.

DataObject::LinkIterator DataObject::linkEnd ( )
 

Retrieve end iterator to directory.

Definition at line 125 of file DataObject.cpp.

size_t DataObject::linkSize ( ) const
 

Retrieve number of links within the object.

Definition at line 135 of file DataObject.cpp.

const std::string & DataObject::localPath ( ) const
 

Retreive DataObject name. It is the name when registered in the store.

Definition at line 251 of file DataObject.cpp.

const std::string & DataObject::location ( ) const
 

Name of the location this object resides in.

Definition at line 261 of file DataObject.cpp.

const DataObject * DataObject::parent ( ) const
 

Parent object.

Definition at line 180 of file DataObject.cpp.

DataObject * DataObject::parent ( )
 

Parent object.

Definition at line 169 of file DataObject.cpp.

Referenced by ObjectVector::erase(), ObjectList::erase(), ObjectVector::push_back(), and ObjectList::push_back().

unsigned long DataObject::refCount ( ) const [virtual]
 

Access reference count.

Definition at line 55 of file DataObject.cpp.

unsigned long DataObject::release ( ) [virtual]
 

release reference to object.

Reimplemented in ObjectContainerBase, ObjectList, and ObjectVector.

Definition at line 41 of file DataObject.cpp.

Referenced by ObjectVector::push_back(), ObjectList::push_back(), ObjectContainerBase::release(), RegistryEntry::setObject(), and RegistryEntry::~RegistryEntry().

long DataObject::removeLink ( long id ) const
 

Remove link by link ID.

Definition at line 332 of file DataObject.cpp.

long DataObject::removeLink ( const std::string & path ) const
 

Remove link by object reference.

Definition at line 318 of file DataObject.cpp.

long DataObject::removeLink ( const DataObject * pObject ) const
 

Remove link by object reference.

Definition at line 304 of file DataObject.cpp.

StreamBuffer & DataObject::serialize ( StreamBuffer & s ) const [virtual]
 

Serialize the object for writing.

Reimplemented in ObjectContainerBase, and RefTableBase.

Definition at line 355 of file DataObject.cpp.

StreamBuffer & DataObject::serialize ( StreamBuffer & s ) [virtual]
 

Serialize the object for reading.

Reimplemented in ObjectContainerBase, and RefTableBase.

Definition at line 350 of file DataObject.cpp.

Referenced by RefTableBase::serialize(), and ObjectContainerBase::serialize().

void DataObject::setDirectory ( IDataDirectory * dir )
 

Set pointer to data directory.

Definition at line 60 of file DataObject.cpp.

Referenced by RegistryEntry::makeHard(), DataSvc::updateRegistryEntry(), and RegistryEntry::~RegistryEntry().

StatusCode DataObject::setLocked ( )
 

Lock the DataObject.

Definition at line 388 of file DataObject.cpp.

StatusCode DataObject::setUnlocked ( ) [private]
 

Unlock the DataObject.

Definition at line 394 of file DataObject.cpp.

void DataObject::setVersion ( unsigned char vsn ) [virtual]
 

Set version number of this object representation.

Definition at line 246 of file DataObject.cpp.

const TransientStore * DataObject::store ( ) const [virtual]
 

Retrieve pointer to Transient Store.

Definition at line 80 of file DataObject.cpp.

TransientStore * DataObject::store ( ) [virtual]
 

Retrieve pointer to Transient Store.

Definition at line 75 of file DataObject.cpp.

Referenced by SmartRefBase::accessData().

DataObject::Link * DataObject::symLink ( const std::string & path )
 

Retrieve symbolic link identified by path.

Definition at line 157 of file DataObject.cpp.

DataObject::Link * DataObject::symLink ( DataObject * pObject )
 

Retrieve symbolic link identified by object.

Definition at line 145 of file DataObject.cpp.

DataObject::Link * DataObject::symLink ( long id )
 

Retrieve symbolic link identified by ID.

Definition at line 140 of file DataObject.cpp.

Referenced by SmartRefBase::accessData().

const unsigned char DataObject::version ( ) const [virtual]
 

Retrieve version number of this object representation.

Definition at line 241 of file DataObject.cpp.


Member Data Documentation

bool DataObject::m_isLocked [private]
 

Locked indicator.

Definition at line 114 of file DataObject.h.

LinkVector DataObject::m_linkVector [mutable, private]
 

Store of symbolic links.

Definition at line 110 of file DataObject.h.

IDataDirectory * DataObject::m_pDirectory [private]
 

Pointer to directory with leaf objects.

Definition at line 106 of file DataObject.h.

unsigned long DataObject::m_refCount [private]
 

Reference count.

Definition at line 108 of file DataObject.h.

unsigned char DataObject::m_version [private]
 

Version number.

Definition at line 112 of file DataObject.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:09 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000