Loading...
Searching...
No Matches
variantSetSpec.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_SDF_VARIANT_SET_SPEC_H
8#define PXR_USD_SDF_VARIANT_SET_SPEC_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/sdf/api.h"
14#include "pxr/usd/sdf/declareSpec.h"
15#include "pxr/usd/sdf/spec.h"
16#include "pxr/usd/sdf/proxyTypes.h"
17#include "pxr/usd/sdf/types.h"
18
19#include <iosfwd>
20#include <map>
21#include <string>
22#include <vector>
23
24PXR_NAMESPACE_OPEN_SCOPE
25
46{
47 SDF_DECLARE_SPEC(SdfVariantSetSpec, SdfSpec);
48
49public:
53
55 SDF_API
56 static SdfVariantSetSpecHandle
57 New(const SdfPrimSpecHandle& prim, const std::string& name);
58
60 SDF_API
61 static SdfVariantSetSpecHandle
62 New(const SdfVariantSpecHandle& prim, const std::string& name);
63
65
68
70 SDF_API
71 std::string GetName() const;
72
74 SDF_API
76
80
82 SDF_API
83 SdfSpecHandle GetOwner() const;
84
88
90 SDF_API
92
94 SDF_API
95 SdfVariantSpecHandleVector GetVariantList() const;
96
101 SDF_API
102 void RemoveVariant(const SdfVariantSpecHandle& variant);
103
105};
106
107PXR_NAMESPACE_CLOSE_SCOPE
108
109#endif // SD_VARIANTSETSPEC_H
Provides a view onto an object's children.
Definition: childrenView.h:205
Base class for all Sdf spec classes.
Definition: spec.h:33
Represents a coherent set of alternate representations for part of a scene.
SDF_API std::string GetName() const
Returns the name of this variant set.
SDF_API SdfVariantView GetVariants() const
Returns the variants as a map.
SDF_API TfToken GetNameToken() const
Returns the name of this variant set.
SDF_API SdfVariantSpecHandleVector GetVariantList() const
Returns the variants as a vector.
static SDF_API SdfVariantSetSpecHandle New(const SdfPrimSpecHandle &prim, const std::string &name)
Constructs a new instance.
SDF_API SdfSpecHandle GetOwner() const
Returns the prim or variant that this variant set belongs to.
SDF_API void RemoveVariant(const SdfVariantSpecHandle &variant)
Removes variant from the list of variants.
static SDF_API SdfVariantSetSpecHandle New(const SdfVariantSpecHandle &prim, const std::string &name)
Constructs a new instance.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Basic Sdf data types.