#include <contexttyperegistryinfo.h>
Public Member Functions | |
| QString | registryPath () |
| Returns the full path to the registry directory. | |
| QString | coreTypesPath () |
| Returns the full path to the core property declaration file. | |
| AssocTree | typeDefinitionForName (QString name) |
| Returns a type definition for the type with the given name. | |
Static Public Member Functions | |
| static ContextTypeRegistryInfo * | instance () |
| Returns the singleton instance of the ContextTypeRegistryInfo. | |
Private Member Functions | |
| ContextTypeRegistryInfo () | |
| Private constructor. Do not use. | |
| ContextTypeRegistryInfo (const ContextTypeRegistryInfo &) | |
| Private constructor. Do not use. | |
| ContextTypeRegistryInfo & | operator= (const ContextTypeRegistryInfo &) |
| Private operator. Do not use. | |
Private Attributes | |
| AssocTree | coreTree |
| The core.types as AssocTree. Read on construction. | |
| QHash< QString, AssocTree > | typeCache |
Static Private Attributes | |
| static ContextTypeRegistryInfo * | registryInstance = NULL |
| Holds the actual pointer to the singleton instance. | |
Friends | |
| class | ContextTypeRegistryInfoUnitTest |
This is a singelton class used to obtain information about the core types defined in the type registry. Information is provided as type definitions returned as AssocTree instances. Each type definition is a QVariant tree wrapped in AssocTree for easy helper key accessors.
AssocTree typeDefinition = ContextTypeRegistryInfo::instance()->typeDefinitionForName("string-enum");
Unless you're building a dedicated type-introspection application, you don't want to deal with ContextTypeRegistryInfo directly. Instead, you can use the ContextTypeInfo class to fetch concrete types and use the easy accessors provided there.
| ContextTypeRegistryInfo::ContextTypeRegistryInfo | ( | ) | [private] |
Private constructor. Do not use.
| ContextTypeRegistryInfo::ContextTypeRegistryInfo | ( | const ContextTypeRegistryInfo & | ) | [private] |
Private constructor. Do not use.
| ContextTypeRegistryInfo * ContextTypeRegistryInfo::instance | ( | ) | [static] |
Returns the singleton instance of the ContextTypeRegistryInfo.
The object is constructed automaticall on first access.
| QString ContextTypeRegistryInfo::registryPath | ( | ) |
Returns the full path to the registry directory.
Takes the CONTEXT_TYPES env variable into account.
| QString ContextTypeRegistryInfo::coreTypesPath | ( | ) |
Returns the full path to the core property declaration file.
Takes the CONTEXT_CORE_TYPES env variable into account.
| AssocTree ContextTypeRegistryInfo::typeDefinitionForName | ( | QString | name | ) |
Returns a type definition for the type with the given name.
The type is being fetched from the registry.
| ContextTypeRegistryInfo& ContextTypeRegistryInfo::operator= | ( | const ContextTypeRegistryInfo & | ) | [private] |
Private operator. Do not use.
friend class ContextTypeRegistryInfoUnitTest [friend] |
ContextTypeRegistryInfo * ContextTypeRegistryInfo::registryInstance = NULL [static, private] |
Holds the actual pointer to the singleton instance.
Mutex protected during creation.
AssocTree ContextTypeRegistryInfo::coreTree [private] |
The core.types as AssocTree. Read on construction.
QHash<QString, AssocTree> ContextTypeRegistryInfo::typeCache [private] |
1.5.6