![]() |
|
A singleton that manages profile capabilities and their relationships. More...
#include <profileRegistry.h>
Inheritance diagram for UsdProfileRegistry:Classes | |
| struct | CapabilityResult |
| Per-capability query result. More... | |
Public Types | |
| enum class | QueryStatus { NoPath , ValidPath , Deprecated , DeprecationConflict , Excepted , CycleFound } |
| Result of a predecessor reachability query. More... | |
Static Public Member Functions | |
| static USDPROFILES_API bool | HasCapability (const TfToken &capability) |
Test whether capability is known to the registry. | |
| static USDPROFILES_API bool | IsProfile (const TfToken &capability) |
Return true if capability is tagged as a profile node (i.e., declared with "isProfile": true in plugInfo.json). | |
| static USDPROFILES_API VtDictionary | GetCapabilityMetadata (const TfToken &capability) |
Return metadata associated with capability as a VtDictionary with keys name, docstring, style, and subgraph. | |
| static USDPROFILES_API std::vector< CapabilityResult > | GetPredecessors (const TfToken &capability) |
Return all direct predecessors (incoming edges) of capability. | |
| static USDPROFILES_API std::vector< CapabilityResult > | GetTransitivePredecessors (const TfToken &capability) |
Return the full transitive closure of all ancestors of capability. | |
| static USDPROFILES_API std::pair< TfToken, int > | ParseCapabilityVersion (const TfToken &capability) |
Parse the _vN version suffix from a capability token. | |
| static USDPROFILES_API TfToken | ResolveCapability (const TfToken &capability) |
| Return the preferred registered capability for the given token, applying the versioning precedence rules from §6 of the Profiles spec: | |
| static USDPROFILES_API QueryStatus | HasPredecessor (const TfToken &capabilityA, const TfToken &capabilityB) |
Return whether capabilityA has capabilityB anywhere in its predecessor DAG (i.e., A transitively depends on B). | |
| static USDPROFILES_API QueryStatus | CoversCapabilities (const TfToken &perspective, const std::vector< TfToken > &required, const std::vector< TfToken > &excepted={}, std::vector< CapabilityResult > *results=nullptr) |
Return whether perspective transitively reaches every capability in required, and with what deprecation status. | |
| static USDPROFILES_API std::vector< TfToken > | GetAllCapabilities () |
| Return an unordered vector of all capabilities known to the registry. | |
| static USDPROFILES_API std::vector< TfToken > | GetAllProfiles () |
| Return an unordered vector of all profiles known to the registry. | |
| static USDPROFILES_API TfToken | GetStyleForCapability (const TfToken &capability) |
| Get the style token for a given capability. | |
| static USDPROFILES_API TfToken | GetSubgraphForCapability (const TfToken &capability) |
| Get the subgraph name for a given capability. | |
| static USDPROFILES_API std::string | GetDocString (const TfToken &capability) |
| Get docstring for a given capability. | |
| static USDPROFILES_API std::string | GetDisplayName (const TfToken &capability) |
| Get display name for a given capability. | |
| static USDPROFILES_API std::map< TfToken, std::string > | GetCapabilityStyles () |
| Get all capability styles. | |
Static Public Member Functions inherited from TfSingleton< UsdProfileRegistry > | |
| static UsdProfileRegistry & | GetInstance () |
Return a reference to an object of type T, creating it if necessary. | |
| static bool | CurrentlyExists () |
Return whether or not the single object of type T is currently in existence. | |
| static void | SetInstanceConstructed (UsdProfileRegistry &instance) |
| Indicate that the sole instance object has already been created. | |
| static void | DeleteInstance () |
Destroy the sole instance object of type T, if it exists. | |
Friends | |
| class | TfSingleton< UsdProfileRegistry > |
Additional Inherited Members | |
Public Member Functions inherited from TfSingleton< UsdProfileRegistry > | |
| void | DeleteInstance ()=delete |
A singleton that manages profile capabilities and their relationships.
The profile registry collects capability information from plugins and provides methods to query capabilities and their relationships.
UsdProfileRegistry serves performance-critical clients that operate under the STL threading model, and therefore itself follows that model in order to avoid locking during queries.
Definition at line 39 of file profileRegistry.h.
| struct UsdProfileRegistry::CapabilityResult |
Per-capability query result.
Definition at line 82 of file profileRegistry.h.
| Class Members | ||
|---|---|---|
| TfToken | capability | |
| QueryStatus | status | |
|
strong |
Result of a predecessor reachability query.
Definition at line 46 of file profileRegistry.h.
|
static |
Return whether perspective transitively reaches every capability in required, and with what deprecation status.
perspective and each token in required are resolved via ResolveCapability before the DAG query, so unversioned names automatically match the highest registered versioned form.
excepted is an optional caller-supplied set of capabilities to exclude from coverage. A required capability whose resolved token appears in excepted is reported with status Excepted rather than its DAG-derived status, and is treated as NoPath for the aggregate. This allows callers to express "profile X is satisfied under these
known exclusions" without modifying the registry.
The aggregate QueryStatus precedence is: NoPath > DeprecationConflict > Excepted > Deprecated > ValidPath. CycleFound is treated as NoPath in the aggregate.
If results is non-null it is populated with one entry per required capability. Each entry's capability field holds the resolved token (which may differ from the input if a higher versioned form was found), and status holds that capability's individual QueryStatus. Entries are in the same order as required.
Returns NoPath (with an empty results) if perspective is unknown after resolution, or if required is empty.
|
static |
Return an unordered vector of all capabilities known to the registry.
|
static |
Return an unordered vector of all profiles known to the registry.
Profiles are capabilities declared with "isProfile": true in plugInfo.json.
|
static |
Return metadata associated with capability as a VtDictionary with keys name, docstring, style, and subgraph.
Returns an empty dictionary if the capability is unknown.
|
static |
Get all capability styles.
|
static |
Get display name for a given capability.
|
static |
Get docstring for a given capability.
|
static |
Return all direct predecessors (incoming edges) of capability.
Each entry carries the predecessor token and ValidPath or Deprecated reflecting whether that edge is deprecated. Returns an empty vector if capability is unknown or has no predecessors.
Get the style token for a given capability.
Get the subgraph name for a given capability.
|
static |
Return the full transitive closure of all ancestors of capability.
Each entry carries the ancestor token and the best QueryStatus of any path from capability to that ancestor (ValidPath, Deprecated, or DeprecationConflict). Does not include capability itself. Returns an empty vector if capability is unknown or has no predecessors.
|
static |
Test whether capability is known to the registry.
|
static |
Return whether capabilityA has capabilityB anywhere in its predecessor DAG (i.e., A transitively depends on B).
Both tokens are resolved via ResolveCapability before the DAG query. Returns NoPath if either resolved capability is unknown or if A == B.
|
static |
Return true if capability is tagged as a profile node (i.e., declared with "isProfile": true in plugInfo.json).
Returns false for unknown capabilities.
|
static |
Parse the _vN version suffix from a capability token.
Returns the base name and integer version, where an unversioned capability (e.g. usd.physics) returns version 0. Examples:
usd.physics → {usd.physics, 0} usd.physics_v2 → {usd.physics, 2} yoyo.foo_v10 → {yoyo.foo, 10} Return the preferred registered capability for the given token, applying the versioning precedence rules from §6 of the Profiles spec:
_vN) is preferred over the unversioned base name.If capability is already the preferred form (or no versioned siblings are registered), returns capability unchanged. Returns an empty TfToken if neither capability nor any versioned sibling is registered.
|
friend |
Definition at line 195 of file profileRegistry.h.