ContextTypeRegistryInfo Class Reference

A class to access the type registry. More...

#include <contexttyperegistryinfo.h>

List of all members.

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 ContextTypeRegistryInfoinstance ()
 Returns the singleton instance of the ContextTypeRegistryInfo.

Private Member Functions

 ContextTypeRegistryInfo ()
 Private constructor. Do not use.
 ContextTypeRegistryInfo (const ContextTypeRegistryInfo &)
 Private constructor. Do not use.
ContextTypeRegistryInfooperator= (const ContextTypeRegistryInfo &)
 Private operator. Do not use.

Private Attributes

AssocTree coreTree
 The core.types as AssocTree. Read on construction.
QHash< QString, AssocTreetypeCache

Static Private Attributes

static ContextTypeRegistryInforegistryInstance = NULL
 Holds the actual pointer to the singleton instance.

Friends

class ContextTypeRegistryInfoUnitTest


Detailed Description

A class to access the type registry.

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.

Usage

To obtain a type definition for a given type:

    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.


Constructor & Destructor Documentation

ContextTypeRegistryInfo::ContextTypeRegistryInfo (  )  [private]

Private constructor. Do not use.

ContextTypeRegistryInfo::ContextTypeRegistryInfo ( const ContextTypeRegistryInfo  )  [private]

Private constructor. Do not use.


Member Function Documentation

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.


Friends And Related Function Documentation

friend class ContextTypeRegistryInfoUnitTest [friend]


Member Data Documentation

Holds the actual pointer to the singleton instance.

Mutex protected during creation.

The core.types as AssocTree. Read on construction.

QHash<QString, AssocTree> ContextTypeRegistryInfo::typeCache [private]


The documentation for this class was generated from the following files:

Generated on Thu Feb 21 18:31:19 2013 for libcontextsubscriber by  doxygen 1.5.6