![]() |
Public API Reference |
![]() |
This interface serves as a registry of other objects. More...
#include <iutil/objreg.h>
Public Member Functions | |
virtual void | Clear ()=0 |
Clear the object registry and release all references. | |
virtual iBase * | Get (char const *tag)=0 |
Get the registered object corresponding with the given tag. | |
virtual iBase * | Get (char const *tag, scfInterfaceID id, int version)=0 |
Get the registered object corresponding with the given tag and implementing the specified interface. | |
virtual csPtr < iObjectRegistryIterator > | Get (scfInterfaceID id, int version)=0 |
Get an iterator with all objects implementing the given interface. | |
virtual csPtr < iObjectRegistryIterator > | Get ()=0 |
Get an iterator with all objects in this object registry. | |
virtual bool | Register (iBase *obj, char const *tag=0)=0 |
Register an object with this registry. | |
virtual void | Unregister (iBase *obj, char const *tag=0)=0 |
Unregister an object with this registry. |
This interface serves as a registry of other objects.
The object registry is thread-safe.
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
Main users of this interface:
virtual void iObjectRegistry::Clear | ( | ) | [pure virtual] |
Clear the object registry and release all references.
Implemented in csObjectRegistry.
virtual iBase* iObjectRegistry::Get | ( | char const * | tag | ) | [pure virtual] |
Get the registered object corresponding with the given tag.
Implemented in csObjectRegistry.
virtual iBase* iObjectRegistry::Get | ( | char const * | tag, |
scfInterfaceID | id, | ||
int | version | ||
) | [pure virtual] |
Get the registered object corresponding with the given tag and implementing the specified interface.
Implemented in csObjectRegistry.
virtual csPtr<iObjectRegistryIterator> iObjectRegistry::Get | ( | scfInterfaceID | id, |
int | version | ||
) | [pure virtual] |
Get an iterator with all objects implementing the given interface.
Note that the iterator iterates over a copy of the elements in the object registry so no thread-locking on the object registry happens except at the time the iterator is created.
Implemented in csObjectRegistry.
virtual csPtr<iObjectRegistryIterator> iObjectRegistry::Get | ( | ) | [pure virtual] |
Get an iterator with all objects in this object registry.
Note that the iterator iterates over a copy of the elements in the object registry so no thread-locking on the object registry happens except at the time the iterator is created.
Implemented in csObjectRegistry.
virtual bool iObjectRegistry::Register | ( | iBase * | obj, |
char const * | tag = 0 |
||
) | [pure virtual] |
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.
obj | Object to place into the registry. |
tag | Optional tag. The tag is interpreted in any way the client sees fit, however some facilities expect tags to follow a certain convention, so be sure to check suitable documentation. |
Implemented in csObjectRegistry.
virtual void iObjectRegistry::Unregister | ( | iBase * | obj, |
char const * | tag = 0 |
||
) | [pure virtual] |
Unregister an object with this registry.
obj | Object to removed from the registry. |
tag | Optional tag. |
Implemented in csObjectRegistry.