#include <kis_generic_registry.h>
Public Member Functions | |
| void | add (_T item) |
| void | add (KisID id, _T item) |
| _T | remove (const KisID &name) |
| _T | remove (const TQString &id) |
| _T | get (const KisID &name) const |
| _T | get (const TQString &id) const |
| bool | exists (const KisID &id) const |
| bool | exists (const TQString &id) const |
| bool | search (const TQString &t, KisID &result) const |
| KisIDList | listKeys () const |
Protected Types | |
| typedef std::map< KisID, _T > | storageMap |
Protected Member Functions | |
| KisGenericRegistry (const KisGenericRegistry &) | |
| KisGenericRegistry | operator= (const KisGenericRegistry &) |
Protected Attributes | |
| storageMap | m_storage |
Detailed Description
class KisGenericRegistry< _T >
Base class for registry objects in Chalk.
Chalk registries contain resources such as filters, tools or colorspaces.
Items are mapped by KisID. A KisID is the combination of a non-localized string that can be used in files and a user-visible, translated string that can be used in the user interface.
Definition at line 39 of file kis_generic_registry.h.
Member Typedef Documentation
◆ storageMap
|
protected |
Definition at line 41 of file kis_generic_registry.h.
Constructor & Destructor Documentation
◆ KisGenericRegistry() [1/2]
|
inline |
Definition at line 43 of file kis_generic_registry.h.
◆ ~KisGenericRegistry()
|
inlinevirtual |
Definition at line 44 of file kis_generic_registry.h.
◆ KisGenericRegistry() [2/2]
|
inlineprotected |
Definition at line 161 of file kis_generic_registry.h.
Member Function Documentation
◆ add() [1/2]
|
inline |
add an object to the registry
- Parameters
-
item the item to add (NOTE: _T must have an KisID id() function)
Definition at line 51 of file kis_generic_registry.h.
◆ add() [2/2]
|
inline |
add an object to the registry
- Parameters
-
id the id of the object item the item
Definition at line 60 of file kis_generic_registry.h.
◆ exists() [1/2]
|
inline |
- Parameters
-
id
- Returns
- true if there is an object corresponding to id
Definition at line 115 of file kis_generic_registry.h.
◆ exists() [2/2]
|
inline |
Definition at line 121 of file kis_generic_registry.h.
◆ get() [1/2]
|
inline |
This function allow to get an object from its KisID.
- Parameters
-
name the KisID of the object
- Returns
- _T the object
Definition at line 92 of file kis_generic_registry.h.
◆ get() [2/2]
|
inline |
Get a single entry based on the identifying part of KisID, not the the descriptive part.
Definition at line 106 of file kis_generic_registry.h.
◆ listKeys()
|
inline |
This function return a list of all the keys.
Definition at line 147 of file kis_generic_registry.h.
◆ operator=()
|
inlineprotected |
Definition at line 162 of file kis_generic_registry.h.
◆ remove() [1/2]
|
inline |
This function remove an item from the registry.
- Returns
- the object which have been remove from the registry and which can be safely delete
Definition at line 68 of file kis_generic_registry.h.
◆ remove() [2/2]
|
inline |
This function remove an item from the registry.
- Parameters
-
id the identifiant of the object
- Returns
- the object which have been remove from the registry and which can be safely delete
Definition at line 83 of file kis_generic_registry.h.
◆ search()
|
inline |
This function allow to search a KisID from the name.
- Parameters
-
t the name to search result The result is filled in this variable
- Returns
- true if the search has been successfull, false otherwise
Definition at line 131 of file kis_generic_registry.h.
Member Data Documentation
◆ m_storage
|
protected |
Definition at line 163 of file kis_generic_registry.h.
The documentation for this class was generated from the following file:
