#include <objreg.h>
Inheritance diagram for csObjectRegistry:
Public Methods | |
csObjectRegistry () | |
virtual | ~csObjectRegistry () |
Client must explicitly call Clear(). | |
virtual void | Clear () |
Clear the object registry and release all references. | |
virtual bool | Register (iBase *obj, char const *tag=NULL) |
Register an object with this registry. More... | |
virtual void | Unregister (iBase *obj, char const *tag=NULL) |
Unregister an object with this registry. More... | |
virtual iBase* | Get (char const *tag) |
Get the registered object corresponding with the given tag. More... | |
virtual iBase* | Get (char const *tag, scfInterfaceID id, int version) |
Get the registered object corresponding with the given tag and implementing the specified interface. More... | |
virtual iObjectRegistryIterator* | Get (scfInterfaceID id, int version) |
Get an iterator with all objects implementing the given interface. | |
virtual iObjectRegistryIterator* | Get () |
Get an iterator with all objects in this object registry. | |
Public Attributes | |
SCF_DECLARE_IBASE |
|
Get the registered object corresponding with the given tag and implementing the specified interface. The iBase pointers returned by the iterator will be the requested interface itself so there is no need to do further QueryInterface(). This function will increase the ref count of the returned object. Reimplemented from iObjectRegistry. |
|
Get the registered object corresponding with the given tag. This function will increase the ref count of the returned object. Reimplemented from iObjectRegistry. |
|
Register an object with this registry. The same object can be registered multiple times but in that case it is probably best to have different tags so they can be distinguished. This function will increase the ref count of the given object. Note that a given tag (if non-NULL) may only be registered once. This function will return false otherwise. This function will also fail if this object registry is being cleared. Reimplemented from iObjectRegistry. |
|
Unregister an object with this registry. If 'tag' is not given then it will unregister all occurances of the given object in the registry (i.e. for all tags). If 'tag' is given then only the object that has that tag will be unregistered. This function will decrease the ref count of the given object. Reimplemented from iObjectRegistry. |