![]() |
|
|
Bdb packages | Design docs | Source docs | Guidelines | Recent releases |
|
Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members CdbView Class Reference
The transient representation for the persistent view. More...
[CdbBase]
#include <CdbView.hh>
Inheritance diagram for CdbView:
List of all members.
Public Methods
const CdbDatabasePtr & parent () const Return a smart pointer to the parent object. const char * name () const Obtain the current name of the view. const CdbId & id () const Obtain the current identifier of the view. virtual bool isFrozen () const=0 Get the current status of the view. virtual CdbStatus get (const char *theName, const BdbTime &theValidityTime, CdbConfigElement &theConfigElement) const=0 Get a "config element" for a condition at specified point of validity time. virtual CdbStatus configIterator (const char *theName, CdbItr< CdbConfigElement > &theItr) const=0 Set up an iterator of "config elements" for a condition. virtual CdbStateId currentStateId (const BdbTime &theValidityTime) const=0 Get current value of the state identifier. Static Public Methods
CdbStatus instance (CdbViewPtr &theViewPtr, const char *theViewName=0, const char *theDatabaseName=0, CdbPtr theCdbPtr=0) Static locator for a view object. CdbStatus instance (CdbViewPtr &theViewPtr, const CdbId &theViewId, const char *theDatabaseName=0, CdbPtr theCdbPtr=0) Static locator for a view object. Protected Methods
CdbView (const CdbDatabasePtr &theDatabasePtr, const char *theName, const CdbId &theId) CdbView (const CdbView &theView) The copy constructor. virtual ~CdbView () The destructor. CdbView & operator= (const CdbView &theView) The assignment operator. Private Methods
CdbView () The default constructor (NOT IMPLEMENTED). Private Attributes
CdbDatabasePtr _myParentPtr std::string _myName CdbId _myId Friends
class CdbCPtrBase< CdbView > Detailed Description
The transient representation for the persistent view.Note, that this is an abstract class specifying the interface to the view. It also maintains the general status of the view object as it's seen to its clients through the API.
This class also includes the CdbStateControl, CdbFolderLocator CdbHistoryProvider and CdbCloneable interfaces.
- See also:
- CdbStateControl , CdbFolderLocator , CdbConditionLocator , CdbHistoryProvider , CdbCloneable , CdbRevisionPolicy
Definition at line 40 of file CdbView.hh.
Constructor & Destructor Documentation
CdbView::CdbView ( ) [private]
The default constructor (NOT IMPLEMENTED).
Is disabled...
CdbView::CdbView ( const CdbDatabasePtr & theDatabasePtr, const char * theName, const CdbId & theId ) [protected]
Initialize the context of the view with specified set of parameters. This will also validate the internal state of the object.
Both pointers should not point to 0 objects.
- See also:
- CdbDatabase , CdbDatabasePtr
- Parameters:
theDatabasePtr the smart pointer providing a back link to the parent object theName the name of the view theId the extended identifier of this view Definition at line 87 of file CdbView.cc.
References CdbCPtr< CdbDatabase, CdbAlwaysClosePolicy< CdbDatabase > >::isNull().
CdbView::CdbView ( const CdbView & theView ) [protected]
The copy constructor.
Details...
Definition at line 97 of file CdbView.cc.
CdbView::~CdbView ( ) [protected, virtual]
The destructor.
Is only available for the derived classes and friends to prevent accidental deletion of objects.
Definition at line 103 of file CdbView.cc.
Member Function Documentation
virtual CdbStatus CdbView::configIterator ( const char * theName, CdbItr< CdbConfigElement > & theItr ) const [pure virtual]
Set up an iterator of "config elements" for a condition.
The iterator will retirn valid elements for the interval of validity covered by the view.
- Returns:
- completion status
Implemented in CdbBdbSView, and CdbBdbWView.
virtual CdbStateId CdbView::currentStateId ( const BdbTime & theValidityTime ) const [pure virtual]
Get current value of the state identifier.
The method delivers a value of the identifier calculated in the scope of he view. The only explicit parameter of the method is a point of time in the validity dimension, in which the identifier is requested.
The returned identifier will be "invalid" should any problem occures to construct (calculate) the identifier.
The method is supposed to be implemented by subclasses.
- See also:
- CdbStateId
- Returns:
- a value of the identifier.
Implemented in CdbBdbSView, and CdbBdbWView.
virtual CdbStatus CdbView::get ( const char * theName, const BdbTime & theValidityTime, CdbConfigElement & theConfigElement ) const [pure virtual]
Get a "config element" for a condition at specified point of validity time.
A full path name (inluding a condition itself) is used to specify the corresponding condition.
The method delivers its results through the "config element" comprising the found revision policy and its interval of the validity.
Note, that returned policy may prohibit accessing the database for specified period of time.
- See also:
- CdbConfigElement , CdbRevisionPolicy
- Returns:
- completion status
Implemented in CdbBdbSView, and CdbBdbWView.
const CdbId & CdbView::id ( )
Obtain the current identifier of the view.
It's an extended identifier of the view in the (potentially) distributed installation.
- Returns:
- a const reference to the identifier
Definition at line 130 of file CdbView.cc.
References _myId.
Referenced by CdbBdbSView::clone(), CdbBdbWView::currentStateId(), and CdbBdbSView::currentStateId().
CdbStatus CdbView::instance ( CdbViewPtr & theViewPtr, const CdbId & theViewId, const char * theDatabaseName = 0, CdbPtr theCdbPtr = 0 ) [static]
Static locator for a view object.
Unlike the previous method, this one uses extended identifier of a view to find the corresponding object.
- See also:
- CdbId
- Parameters:
theViewPtr the smart pointer to be initialized theViewId the view identifier theDatabaseName the database name theCdbPtr the pointer to the top-level API object Definition at line 52 of file CdbView.cc.
References CdbStatus::Error, CdbDatabase::instance(), Cdb::instance(), CdbCPtr< Cdb, CdbDoNotClosePolicy< Cdb > >::isNull(), result, and CdbStatus::Success.
CdbStatus CdbView::instance ( CdbViewPtr & theViewPtr, const char * theViewName = 0, const char * theDatabaseName = 0, CdbPtr theCdbPtr = 0 ) [static]
Static locator for a view object.
Locates specified view object and returns a smart pointer to the transient object of the current class. This "shortcut" allows to avoid the complicated multi-staged process of the object location, which is useless when the intermediate objects are not needed.
The last parameter (a pointer to the top-level Cdb singleton) is optional. If 0 is passed then a default instance is used.
Note, that if specified object is not found then a smart pointer is initialized to point to 0.
- See also:
- Cdb , CdbViewPtr , CdbStatus
- Returns:
- a completion status
- Parameters:
theViewPtr the smart pointer to be initialized theViewName the view name theDatabaseName the database name theCdbPtr the pointer to the top-level API object Definition at line 16 of file CdbView.cc.
References CdbStatus::Error, CdbDatabase::instance(), Cdb::instance(), CdbCPtr< Cdb, CdbDoNotClosePolicy< Cdb > >::isNull(), result, and CdbStatus::Success.
Referenced by cmd_config(), cmd_config_at(), CdbEnvironment::defaultStateId(), CdbFolder::instance(), CdbToolslsCmd::listFolder(), CdbBdbTestNavigation::quickNavigation(), and CdbToolsContext::setCurrViewPtr().
virtual bool CdbView::isFrozen ( ) [pure virtual]
Get the current status of the view.
A non-"frozen" view is not stable since its configuration is allowed to be changed by the database administration tools. This kind (non-"frozen") views are used where the views is being in a transition state. Once it's done the view can be turned into the "frozen" state.
Implemented in CdbBdbSView, and CdbBdbWView.
const char * CdbView::name ( )
Obtain the current name of the view.
This name is garanteed to be non 0 pointer.
- Returns:
- a const pointer to the name of the object
Definition at line 124 of file CdbView.cc.
References _myName.
Referenced by CdbBdbWView::clone(), CdbBdbSView::clone(), CdbBdbSView::configIterator(), and CdbBdbSView::get().
CdbView & CdbView::operator= ( const CdbView & theView ) [protected]
The assignment operator.
Details...
Definition at line 107 of file CdbView.cc.
References _myId, _myName, and _myParentPtr.
const CdbDatabasePtr & CdbView::parent ( )
Return a smart pointer to the parent object.
- See also:
- CdbDatabase
Definition at line 118 of file CdbView.cc.
References _myParentPtr.
Referenced by CdbBdbWView::clone(), and CdbBdbSView::clone().
Friends And Related Function Documentation
friend class CdbCPtrBase< CdbView > [friend]
Definition at line 45 of file CdbView.hh.
Member Data Documentation
CdbId CdbView::_myId [private]
Definition at line 219 of file CdbView.hh.
Referenced by id(), and operator=().
std::string CdbView::_myName [private]
Definition at line 218 of file CdbView.hh.
Referenced by name(), and operator=().
CdbDatabasePtr CdbView::_myParentPtr [private]
Definition at line 217 of file CdbView.hh.
Referenced by operator=(), and parent().
The documentation for this class was generated from the following files:
- /CdbBase/CdbView.hh
- /CdbBase/CdbView.cc
BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us
Page Owner: Jacek Becla
Last Update: October 04, 2002