This document is for a version of USD that is under development. See
this page
for the current release.
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
c
d
e
f
h
i
k
l
m
o
p
r
s
t
v
w
Enumerator
a
b
c
d
e
i
l
m
n
o
p
r
t
u
Related Functions
b
g
h
o
s
t
Files
File List
File Members
All
_
a
c
g
h
j
n
o
p
s
t
u
v
w
Functions
a
c
g
h
j
n
o
p
s
t
u
v
w
Variables
Typedefs
a
g
n
p
s
t
u
Enumerations
Enumerator
Macros
_
a
g
n
p
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
declareSpec.h
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_DECLARE_SPEC_H
8
#define PXR_USD_SDF_DECLARE_SPEC_H
9
10
#include "
pxr/pxr.h
"
11
#include "pxr/usd/sdf/api.h"
12
#include "
pxr/usd/sdf/declareHandles.h
"
13
#include "
pxr/usd/sdf/specType.h
"
14
#include "
pxr/base/tf/registryManager.h
"
15
#include "pxr/base/tf/type.h"
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
class
SdfSpec
;
20
40
#define SDF_DECLARE_ABSTRACT_SPEC(SpecType, BaseSpecType) \
41
public: \
42
SpecType() { } \
43
SpecType(const SpecType& spec) \
44
: BaseSpecType(spec) { } \
45
explicit SpecType(const Sdf_IdentityRefPtr& identity) \
46
: BaseSpecType(identity) { } \
47
protected: \
48
friend struct Sdf_CastAccess; \
49
explicit SpecType(const SdfSpec& spec) \
50
: BaseSpecType(spec) { } \
51
52
#define SDF_DEFINE_ABSTRACT_SPEC(SchemaType, SpecType, BaseSpecType) \
53
TF_REGISTRY_FUNCTION_WITH_TAG(TfType, Type) \
54
{ \
55
TfType::Define<SpecType, TfType::Bases<BaseSpecType> >(); \
56
} \
57
TF_REGISTRY_FUNCTION_WITH_TAG(SdfSpecTypeRegistration, Registration) \
58
{ \
59
SdfSpecTypeRegistration::RegisterAbstractSpecType< \
60
SchemaType, SpecType>(); \
61
}
62
63
// ------------------------------------------------------------
64
65
#define SDF_DECLARE_SPEC(SpecType, BaseSpecType) \
66
SDF_DECLARE_ABSTRACT_SPEC(SpecType, BaseSpecType) \
67
68
#define SDF_DEFINE_SPEC(SchemaType, SpecTypeEnum, SpecType, BaseSpecType) \
69
TF_REGISTRY_FUNCTION_WITH_TAG(TfType, Type) \
70
{ \
71
TfType::Define<SpecType, TfType::Bases<BaseSpecType> >(); \
72
} \
73
TF_REGISTRY_FUNCTION_WITH_TAG(SdfSpecTypeRegistration, Registration) \
74
{ \
75
SdfSpecTypeRegistration::RegisterSpecType<SchemaType, SpecType> \
76
(SpecTypeEnum); \
77
}
78
79
// ------------------------------------------------------------
80
// Special set of macros for SdfSpec only.
81
82
#define SDF_DECLARE_BASE_SPEC(SpecType) \
83
public: \
84
SpecType() { } \
85
SpecType(const SpecType& spec) : _id(spec._id) { } \
86
explicit SpecType(const Sdf_IdentityRefPtr& id) : _id(id) { } \
87
88
#define SDF_DEFINE_BASE_SPEC(SchemaType, SpecType) \
89
TF_REGISTRY_FUNCTION_WITH_TAG(TfType, Type) \
90
{ \
91
TfType::Define<SpecType>(); \
92
} \
93
TF_REGISTRY_FUNCTION_WITH_TAG(SdfSpecTypeRegistration, Registration) \
94
{ \
95
SdfSpecTypeRegistration::RegisterAbstractSpecType< \
96
SchemaType, SpecType>(); \
97
}
98
99
PXR_NAMESPACE_CLOSE_SCOPE
100
101
#endif
// PXR_USD_SDF_DECLARE_SPEC_H
SdfSpec
Base class for all Sdf spec classes.
Definition:
spec.h:33
declareHandles.h
pxr.h
registryManager.h
specType.h
pxr
usd
sdf
declareSpec.h
© Copyright 2024, Pixar Animation Studios. |
Terms of Use
| Generated on Fri Nov 22 2024 14:48:40 by
1.9.6