![]() |
Carousel
|
This utility class is a dictionary, used to store anonymous object by a key. More...
#include <TypeObjectsMap.h>
Public Member Functions | |
TValue | getInstance (const QString &key) const |
TValue | getInstance (const QString &key, const QString &tag) const |
QStringList | keys () const |
QStringList | keys (const QString &tag) const |
void | registerInstance (TValue instance, const QString &key) |
void | registerInstance (TValue instance, const QString &key, const QString &tag) |
int | size () const |
TValue | unregisterInstance (const QString &key, const QString &tag) |
This utility class is a dictionary, used to store anonymous object by a key.
This class designed to store objects of anonymous type with unique keys. It is used in service locators and component extensions.
TValue TypeObjectsMap< TValue >::getInstance | ( | const QString & | key | ) | const |
Finds pointer associated with specified key and empty tag in inner objects dictionary.
TValue TypeObjectsMap< TValue >::getInstance | ( | const QString & | key, |
const QString & | tag | ||
) | const |
Finds pointer associated with specified key and tag in inner objects dictionary.
void TypeObjectsMap< TValue >::registerInstance | ( | TValue | instance, |
const QString & | key | ||
) |
Registers a value with empty tag and specified key in inner objects dictionary.
void TypeObjectsMap< TValue >::registerInstance | ( | TValue | instance, |
const QString & | key, | ||
const QString & | tag | ||
) |
Registers a value with specified key and tag in inner objects dictionary.
int TypeObjectsMap< TValue >::size | ( | ) | const |
Returns the amount of registered in map objects.
TValue TypeObjectsMap< TValue >::unregisterInstance | ( | const QString & | key, |
const QString & | tag | ||
) |
Removes value with specified key and tag from the inner objects dictionary.
QStringList TypeObjectsMap< TValue >::keys | ( | ) | const |
Returns all registered keys for instances;
QStringList TypeObjectsMap< TValue >::keys | ( | const QString & | tag | ) | const |
Returns all registered with specified tag keys for instances;