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

CdbFolder Class Reference

The transient representation for the persistent folder. More...

#include <CdbFolder.hh>

Inheritance diagram for CdbFolder:

CdbStateControl CdbFolderLocator CdbCloneable< CdbFolder > CdbBdbSFolder CdbBdbWFolder CdbRooRoFolder CdbSQLApiFolder List of all members.

Public Member Functions

const CdbViewPtrparentView () const
 Return a smart pointer to the parent CdbView object.

const CdbFolderPtrparentFolder () const
 Return a smart pointer to the parent CdbFolder object.

const char * name () const
 Obtain the current name of the CdbFolder.

virtual BdbTime created () const=0
 Obtain the creation time of the folder.

virtual std::string description () const=0
 Obtain the folder description.

virtual CdbStatus findCondition (CdbConditionPtr &theConditionPtr, const char *theName)=0
 Find the specified condition.

virtual CdbStatus conditionIterator (CdbConditionItr &theItr)=0
 Initialize an instance of an iterator for the known conditions names.


Static Public Member Functions

CdbStatus instance (CdbFolderPtr &theFolderPtr, const char *theFullPathName, const char *theViewName=0, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a folder object.

CdbStatus instance (CdbFolderPtr &theFolderPtr, const char *theFullPathName, const CdbId &theViewId, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0)
 Static locator for a folder object.


Protected Member Functions

 CdbFolder (const CdbViewPtr &theViewPtr, const CdbFolderPtr &theFolderPtr, const char *theName)
 CdbFolder (const CdbFolder &theFolder)
 The copy constructor.

virtual ~CdbFolder ()
 The destructor.

CdbFolder & operator= (const CdbFolder &theFolder)
 The assignment operator.


Friends

class CdbCPtrBase< CdbFolder >

Detailed Description

The transient representation for the persistent folder.

This class also includes the CdbStateControl, CdbFolderLocator and CdbCloneable interfaces.

Note, that this is an abstract class specifying the interface to the folder. It also maintains the general status of an object of the CdbFolder class as it's seen to its clients through the API.

See also:
CdbStateControl

CdbFolderLocator

CdbCloneable

Definition at line 35 of file CdbFolder.hh.


Constructor & Destructor Documentation

CdbFolder::CdbFolder const CdbViewPtr   theViewPtr,
const CdbFolderPtr   theFolderPtr,
const char *    theName
[protected]
 

Initialize the context of the Folder with specified set of parameters. This will also validate the internal state of the object.

If the folder was already open it will be closed before replacing the parameters.

See also:
CdbView

CdbViewPtr

CdbFolderPtr

Parameters:
theViewPtr  the smart pointer providing a back link to the parent view
theFolderPtr  the smart pointer providing a back link to the parent folder
theName  the name of the folder

Definition at line 148 of file CdbFolder.cc.

CdbFolder::CdbFolder const CdbFolder &    theFolder [protected]
 

The copy constructor.

Details...

Definition at line 156 of file CdbFolder.cc.

CdbFolder::~CdbFolder   [protected, virtual]
 

The destructor.

Is only available for the derived classes and friends to prevent accidental deletion of objects.

Definition at line 162 of file CdbFolder.cc.


Member Function Documentation

virtual CdbStatus CdbFolder::conditionIterator CdbConditionItr   theItr [pure virtual]
 

Initialize an instance of an iterator for the known conditions names.

This method is supposed to be implemented by the corresponding subclass.

The iterator will be set into a "valid" state upon successfull completion.

See also:
CdbIItr::isValid()

CdbCondition

CdbConditionItr

CdbStatus

Returns:
completion status

Implemented in CdbBdbWFolder, CdbBdbSFolder, CdbRooRoFolder, and CdbSQLApiFolder.

virtual BdbTime CdbFolder::created   const [pure virtual]
 

Obtain the creation time of the folder.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a string with the object's description

Implemented in CdbBdbWFolder, CdbBdbSFolder, CdbRooRoFolder, and CdbSQLApiFolder.

virtual std::string CdbFolder::description   const [pure virtual]
 

Obtain the folder description.

This method is supposed to be implemented by the corresponding subclass.

Returns:
a string with the object's description

Implemented in CdbBdbWFolder, CdbBdbSFolder, CdbRooRoFolder, and CdbSQLApiFolder.

virtual CdbStatus CdbFolder::findCondition CdbConditionPtr   theConditionPtr,
const char *    theName
[pure virtual]
 

Find the specified condition.

This method is supposed to be implemented by the corresponding subclass.

This method initializes a smart pointer to a transient object of the CdbCondition class representing the found condition. It will initialize the smart pointer to point onto 0 and return the corresponding error statuswhen specified object is not found or is not awailable for some other reason.

The only characteristics of the condition is its name. This name should not be a 0 pointer.

See also:
CdbCondition

CdbConditionPtr

CdbStatus

Returns:
a completion status of the operation
Parameters:
theConditionPtr  a smart pointer to an object to be initialized
theName  the name of an object to be found

Implemented in CdbBdbWFolder, CdbBdbSFolder, CdbRooRoFolder, and CdbSQLApiFolder.

CdbStatus CdbFolder::instance CdbFolderPtr   theFolderPtr,
const char *    theFullPathName,
const CdbId   theViewId,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a folder object.

Unlike the previous method this one requires extended identifier of a view.

See also:
CdbId
Parameters:
theFolderPtr  the smart pointer to be initialized
theFullPathName  the full path name of the folder
theViewId  the view identifier
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 85 of file CdbFolder.cc.

References CdbPathName::beforeLast(), CdbStatus::Error, CdbView::instance(), instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString().

CdbStatus CdbFolder::instance CdbFolderPtr   theFolderPtr,
const char *    theFullPathName,
const char *    theViewName = 0,
const char *    theDatabaseName = 0,
const char *    theImplementationName = 0,
const char *    theTechnologyName = 0
[static]
 

Static locator for a folder object.

Locates specified folder 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

CdbFolderPtr

CdbStatus

Returns:
a completion status
Parameters:
theFolderPtr  the smart pointer to be initialized
theFullPathName  the full path name of the folder
theViewName  the view name
theDatabaseName  the database name
theImplementationName  the implementation name
theTechnologyName  the technology name

Definition at line 21 of file CdbFolder.cc.

References CdbPathName::beforeLast(), CdbStatus::Error, CdbView::instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString().

Referenced by instance(), and CdbCondition::instance().

const char * CdbFolder::name   const
 

Obtain the current name of the CdbFolder.

It's guranteed that the returned pointer will point onto non 0 string.

Returns:
a const pointer on to the object's name

Definition at line 189 of file CdbFolder.cc.

Referenced by CdbSQLApiFolder::clone(), CdbRooRoFolder::clone(), CdbBdbWFolder::clone(), CdbBdbSFolder::clone(), CdbSQLApiFolder::conditionIterator(), CdbSQLApiFolder::findCondition(), CdbRooRoFolder::findCondition(), CdbBdbWFolder::findCondition(), CdbBdbSFolder::findCondition(), CdbSQLApiFolder::findFolder(), CdbRooRoFolder::findFolder(), CdbBdbSFolder::findFolder(), and CdbSQLApiFolder::folderIterator().

CdbFolder & CdbFolder::operator= const CdbFolder &    theFolder [protected]
 

The assignment operator.

Details...

Definition at line 166 of file CdbFolder.cc.

References _myFolderPtr, _myName, and _myViewPtr.

const CdbFolderPtr & CdbFolder::parentFolder   const
 

Return a smart pointer to the parent CdbFolder object.

See also:
CdbFolder

CdbFolderPtr

Definition at line 183 of file CdbFolder.cc.

Referenced by CdbSQLApiFolder::clone(), CdbRooRoFolder::clone(), CdbBdbWFolder::clone(), CdbBdbSFolder::clone(), CdbBdbWFolder::findCondition(), and CdbBdbWFolder::findFolder().

const CdbViewPtr & CdbFolder::parentView   const
 

Return a smart pointer to the parent CdbView object.

See also:
CdbView

CdbViewPtr

Definition at line 177 of file CdbFolder.cc.

Referenced by CdbSQLApiFolder::clone(), CdbRooRoFolder::clone(), CdbBdbWFolder::clone(), CdbBdbSFolder::clone(), CdbSQLApiFolder::findCondition(), CdbRooRoFolder::findCondition(), CdbBdbSFolder::findCondition(), CdbSQLApiFolder::findFolder(), CdbRooRoFolder::findFolder(), CdbBdbWFolder::findFolder(), and CdbBdbSFolder::findFolder().


Friends And Related Function Documentation

friend class CdbCPtrBase< CdbFolder > [friend]
 

Definition at line 39 of file CdbFolder.hh.


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