CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdDbObjectContextCollection Class Referenceabstract

#include <DbObjectContextCollection.h>

Inheritance diagram for OdDbObjectContextCollection:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDbObjectContextCollection)
 
virtual OdString name () const =0
 
virtual OdDbObjectContextPtr currentContext (const OdDbObject *pRequestingObject) const =0
 
virtual OdResult setCurrentContext (const OdDbObjectContext *pContext)=0
 
virtual OdResult addContext (const OdDbObjectContext *pContext)=0
 
virtual OdResult removeContext (const OdString &contextName)=0
 
virtual OdResult lockContext (const OdDbObjectContext *pContext)=0
 
virtual OdResult unlockContext ()=0
 
virtual bool locked () const =0
 
virtual OdDbObjectContextPtr getContext (const OdString &contextName) const =0
 
virtual bool hasContext (const OdString &contextName) const =0
 
virtual OdDbObjectContextCollectionIteratorPtr newIterator () const =0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class represents a collection of objects that have context items defined.

Remarks
Implement this interface and register it with OdDbObjectContextContextManager for each database that supports context items. A context collection can be made current, locked, or unlocked.

<group OdDb_Classes>

Definition at line 44 of file DbObjectContextCollection.h.

Member Function Documentation

◆ addContext()

virtual OdResult OdDbObjectContextCollection::addContext ( const OdDbObjectContext pContext)
pure virtual

Copies a context and adds the copy to the context collection.

\param pContext [in]  Pointer to the context for which a uniqueIdentifier is defined
to copy and add to the context collection.

\remarks
The new context is assigned a new uniqueIdentifier.
Returns eOk if successful, or an appropriate error code if not.

◆ currentContext()

virtual OdDbObjectContextPtr OdDbObjectContextCollection::currentContext ( const OdDbObject pRequestingObject) const
pure virtual

Returns a pointer to the current context of the context collection.

\param pRequestingObject [in]  Optional pointer to the object for which you want
the current context.

\remarks
If no current context exists, Null is returned.

◆ getContext()

virtual OdDbObjectContextPtr OdDbObjectContextCollection::getContext ( const OdString contextName) const
pure virtual

Returns a pointer to a copy of a named context in the collection.

\param contextName [in]  Name of the context.

\remarks
If no context exists with the specified name, Null is returned.

◆ hasContext()

virtual bool OdDbObjectContextCollection::hasContext ( const OdString contextName) const
pure virtual

Returns whether a named context exists in the collection.

\param contextName [in]  Name of the context.

\returns
Returns true if the named context exists in the collection, 
or returns Null if it does not exist.

◆ lockContext()

virtual OdResult OdDbObjectContextCollection::lockContext ( const OdDbObjectContext pContext)
pure virtual

Internal use only.

◆ locked()

virtual bool OdDbObjectContextCollection::locked ( ) const
pure virtual

Internal use only.

◆ name()

virtual OdString OdDbObjectContextCollection::name ( ) const
pure virtual

Returns the name of the context collection.

\remarks
The context collection name is used by the context manager to identify the 
collection and the context items that it contains.

◆ newIterator()

virtual OdDbObjectContextCollectionIteratorPtr OdDbObjectContextCollection::newIterator ( ) const
pure virtual

Returns an Iterator to the contexts in the collection.

◆ ODRX_DECLARE_MEMBERS()

OdDbObjectContextCollection::ODRX_DECLARE_MEMBERS ( OdDbObjectContextCollection  )

◆ removeContext()

virtual OdResult OdDbObjectContextCollection::removeContext ( const OdString contextName)
pure virtual

Removes a context from the context collection.

\param contextName [in]  Name of the context to delete from the context
collection.

\remarks
To remove the current context from a collection, first make a different
context current, then delete the desired context.
Returns eOk if successful, or an appropriate error code if not.

◆ setCurrentContext()

virtual OdResult OdDbObjectContextCollection::setCurrentContext ( const OdDbObjectContext pContext)
pure virtual

Sets the current context of the context collection.

\param pContext [in]  Pointer to the context for which a uniqueIdentifier is defined
to make current for the context collection.

◆ unlockContext()

virtual OdResult OdDbObjectContextCollection::unlockContext ( )
pure virtual

Internal use only.


The documentation for this class was generated from the following file: