7#ifndef PXR_USD_PROFILE_REGISTRY_H
8#define PXR_USD_PROFILE_REGISTRY_H
12#include "pxr/usd/usdProfiles/api.h"
13#include "pxr/base/tf/type.h"
26PXR_NAMESPACE_OPEN_SCOPE
89 return capability < rhs.capability;
98 USDPROFILES_API
static
108 USDPROFILES_API
static
118 USDPROFILES_API
static
168 const std::set<TfToken>& required,
169 const std::set<TfToken>& excepted = {},
170 std::set<CapabilityResult>* results =
nullptr);
185 static std::set<TfToken>
199 static std::set<TfToken>
211 static std::set<TfToken>
213 std::set<TfToken> tokens;
214 for (
const auto& r : results) {
215 tokens.insert(r.capability);
240 friend class Usd_ProfilesRegistryTestAccess;
249 void _RegisterFromPlugins();
254 bool _LoadCapabilitiesFromProfileData(
const JsObject& profileData);
256 class _CapabilityGraph;
257 std::unique_ptr<_CapabilityGraph> _capabilityGraph;
260 std::map<TfToken, std::string> _capabilityStyles;
265PXR_NAMESPACE_CLOSE_SCOPE
Manage a single instance of an object (see.
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
A singleton that manages profile capabilities and their relationships.
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 std::set< TfToken > CapabilityResultsToTokens(const std::set< CapabilityResult > &results)
Extract just the capability tokens from a CapabilityResult set, discarding the per-entry status.
static USDPROFILES_API std::set< CapabilityResult > GetPredecessors(const TfToken &capability)
Return all direct predecessors (incoming edges) of capability.
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 std::set< TfToken > GetAllProfiles()
Return the set of all profiles known to the registry.
static USDPROFILES_API std::set< TfToken > GetFileFormatImpliedCapabilities(const TfType &formatType)
Return the union of impliesCapabilities declared on formatType and all of its ancestor types,...
static USDPROFILES_API VtDictionary GetCapabilityMetadata(const TfToken &capability)
Return metadata associated with capability as a VtDictionary with keys name, docstring,...
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 QueryStatus CoversCapabilities(const TfToken &perspective, const std::set< TfToken > &required, const std::set< TfToken > &excepted={}, std::set< CapabilityResult > *results=nullptr)
Return whether perspective transitively reaches every capability in required, and with what deprecati...
static USDPROFILES_API std::set< TfToken > GetAllCapabilities()
Return the set of all capabilities known to the registry.
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::set< TfToken > GetSchemaImpliedCapabilities(const TfType &schemaType)
Return the union of impliesCapabilities declared on schemaType and all of its ancestor types,...
static USDPROFILES_API std::set< 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 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.
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.
Per-capability query result.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...