|
A singleton that holds known kinds and information about them. More...
#include <registry.h>
Static Public Member Functions | |
static KIND_API KindRegistry & | GetInstance () |
Return the single KindRegistry instance. | |
static KIND_API bool | HasKind (const TfToken &kind) |
Test whether kind is known to the registry. | |
static KIND_API TfToken | GetBaseKind (const TfToken &kind) |
Return the base kind of the given kind. | |
static KIND_API bool | IsA (const TfToken &derivedKind, const TfToken &baseKind) |
Test whether derivedKind is the same as baseKind or has it as a base kind (either directly or indirectly). | |
static KIND_API std::vector< TfToken > | GetAllKinds () |
Return an unordered vector of all kinds known to the registry. | |
static KIND_API bool | IsModel (const TfToken &kind) |
Returns true if kind IsA model kind. | |
static KIND_API bool | IsGroup (const TfToken &kind) |
Returns true if kind IsA group kind. | |
static KIND_API bool | IsAssembly (const TfToken &kind) |
Return true if kind IsA assembly kind. | |
static KIND_API bool | IsComponent (const TfToken &kind) |
Returns true if kind IsA component kind. | |
static KIND_API bool | IsSubComponent (const TfToken &kind) |
Returns true if kind IsA subcomponent kind. | |
Friends | |
class | TfSingleton< KindRegistry > |
Additional Inherited Members | |
Public Member Functions inherited from TfWeakBase | |
TfWeakBase (const TfWeakBase &) | |
const TfWeakBase & | __GetTfWeakBase__ () const |
const TfWeakBase & | operator= (const TfWeakBase &) |
void | EnableNotification2 () const |
TF_API void const * | GetUniqueIdentifier () const |
Protected Member Functions inherited from TfWeakBase | |
TfRefPtr< Tf_Remnant > | _Register () const |
template<class T > | |
TfRefPtr< Tf_Remnant > | _Register (T *tempRmnt) const |
bool | _HasRemnant () const |
A singleton that holds known kinds and information about them.
See Kind Overview for a description of why kind exists, what the builtin registered kinds are, and how to extend the core kinds.
KindRegistry serves performance-critical clients that operate under the stl threading model, and therefore itself follows that model in order to avoid locking during HasKind() and IsA() queries.
To make this robust, KindRegistry exposes no means to mutate the registry. All extensions must be accomplished via plugInfo.json files, which are consumed once during the registry initialization (See Extending the KindRegistry )
Definition at line 53 of file registry.h.
|
static |
Return an unordered vector of all kinds known to the registry.
Return the base kind of the given kind.
If there is no base, the result will be an empty token. Issues a coding error if kind is unknown to the registry.
|
static |
Return the single KindRegistry
instance.
|
static |
Test whether kind is known to the registry.
Test whether derivedKind is the same as baseKind or has it as a base kind (either directly or indirectly).
It is not required that derivedKind or baseKind be known to the registry: if they are unknown but equal, IsA will return true
; otherwise if either is unknown, we will simply return false.
Therefore this method will not raise any errors.
|
static |
Return true if kind
IsA assembly kind.
|
static |
Returns true if kind
IsA component kind.
|
static |
Returns true if kind
IsA group kind.
|
static |
Returns true if kind
IsA model kind.
|
static |
Returns true if kind
IsA subcomponent kind.
|
friend |
Definition at line 96 of file registry.h.