7#ifndef PXR_USD_PROFILE_REGISTRY_H
8#define PXR_USD_PROFILE_REGISTRY_H
12#include "pxr/usd/usdProfiles/api.h"
25PXR_NAMESPACE_OPEN_SCOPE
92 USDPROFILES_API
static
102 USDPROFILES_API
static
112 USDPROFILES_API
static
163 const std::vector<TfToken>& required,
164 const std::vector<TfToken>& excepted = {},
165 std::vector<CapabilityResult>* results =
nullptr);
195 friend class Usd_ProfilesRegistryTestAccess;
204 void _RegisterFromPlugins();
209 bool _LoadCapabilitiesFromProfileData(
const JsObject& profileData);
211 class _CapabilityGraph;
212 std::unique_ptr<_CapabilityGraph> _capabilityGraph;
215 std::map<TfToken, std::string> _capabilityStyles;
220PXR_NAMESPACE_CLOSE_SCOPE
Manage a single instance of an object (see.
Token for efficient comparison, assignment, and hashing of known strings.
A singleton that manages profile capabilities and their relationships.
static USDPROFILES_API std::vector< TfToken > GetAllProfiles()
Return an unordered vector of all profiles known to the registry.
QueryStatus
Result of a predecessor reachability query.
@ Deprecated
All paths to the candidate pass through at least one deprecated edge.
@ Excepted
The capability is reachable but was explicitly excluded by the caller via the excepted parameter of C...
@ ValidPath
A non-deprecated path exists.
@ DeprecationConflict
Both deprecated and non-deprecated paths exist.
@ NoPath
No path exists from capability to the candidate.
@ CycleFound
A cycle was detected in the graph (indicates malformed data).
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 depe...
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 plugI...
static USDPROFILES_API VtDictionary GetCapabilityMetadata(const TfToken &capability)
Return metadata associated with capability as a VtDictionary with keys name, docstring,...
static USDPROFILES_API std::vector< CapabilityResult > GetPredecessors(const TfToken &capability)
Return all direct predecessors (incoming edges) of capability.
static USDPROFILES_API TfToken GetStyleForCapability(const TfToken &capability)
Get the style token for a given capability.
static USDPROFILES_API bool HasCapability(const TfToken &capability)
Test whether capability is known to the registry.
static USDPROFILES_API std::map< TfToken, std::string > GetCapabilityStyles()
Get all capability styles.
static USDPROFILES_API std::vector< CapabilityResult > GetTransitivePredecessors(const TfToken &capability)
Return the full transitive closure of all ancestors of capability.
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 deprecati...
static USDPROFILES_API TfToken GetSubgraphForCapability(const TfToken &capability)
Get the subgraph name for a given capability.
static USDPROFILES_API TfToken ResolveCapability(const TfToken &capability)
Return the preferred registered capability for the given token, applying the versioning precedence ru...
static USDPROFILES_API std::vector< TfToken > GetAllCapabilities()
Return an unordered vector of all capabilities known to the registry.
static USDPROFILES_API std::pair< TfToken, int > ParseCapabilityVersion(const TfToken &capability)
Parse the _vN version suffix from a capability token.
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.
Per-capability query result.
A map with string keys and VtValue values.
Manage a single instance of an object.
This file defines some macros that are useful for declaring and using static TfTokens.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...