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
discoveryPlugin.h
1
//
2
// Copyright 2018 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
8
#ifndef PXR_USD_NDR_DISCOVERY_PLUGIN_H
9
#define PXR_USD_NDR_DISCOVERY_PLUGIN_H
10
12
13
#include "
pxr/pxr.h
"
14
#include "pxr/usd/ndr/api.h"
15
#include "
pxr/base/tf/declarePtrs.h
"
16
#include "pxr/base/tf/type.h"
17
#include "
pxr/base/tf/weakBase.h
"
18
#include "
pxr/usd/ndr/declare.h
"
19
#include "pxr/usd/ndr/nodeDiscoveryResult.h"
20
21
PXR_NAMESPACE_OPEN_SCOPE
22
26
#define NDR_REGISTER_DISCOVERY_PLUGIN(DiscoveryPluginClass) \
27
TF_REGISTRY_FUNCTION(TfType) \
28
{ \
29
TfType::Define<DiscoveryPluginClass, TfType::Bases<NdrDiscoveryPlugin>>() \
30
.SetFactory<NdrDiscoveryPluginFactory<DiscoveryPluginClass>>(); \
31
}
32
33
TF_DECLARE_WEAK_AND_REF_PTRS
(
NdrDiscoveryPluginContext
);
34
38
class
NdrDiscoveryPluginContext
:
public
TfRefBase
,
public
TfWeakBase
39
{
40
public
:
41
NDR_API
42
virtual
~NdrDiscoveryPluginContext
() =
default
;
43
46
NDR_API
47
virtual
TfToken
GetSourceType
(
const
TfToken
& discoveryType)
const
= 0;
48
};
49
50
TF_DECLARE_WEAK_AND_REF_PTRS
(
NdrDiscoveryPlugin
);
51
126
class
NdrDiscoveryPlugin
:
public
TfRefBase
,
public
TfWeakBase
127
{
128
public
:
129
using
Context
=
NdrDiscoveryPluginContext
;
130
131
NDR_API
132
NdrDiscoveryPlugin
();
133
NDR_API
134
virtual
~NdrDiscoveryPlugin
();
135
138
NDR_API
139
virtual
NdrNodeDiscoveryResultVec
DiscoverNodes
(
const
Context
&) = 0;
140
142
NDR_API
143
virtual
const
NdrStringVec&
GetSearchURIs
()
const
= 0;
144
};
145
146
149
150
class
NdrDiscoveryPluginFactoryBase :
public
TfType::FactoryBase
151
{
152
public
:
153
NDR_API
154
virtual
NdrDiscoveryPluginRefPtr New()
const
= 0;
155
};
156
157
template
<
class
T>
158
class
NdrDiscoveryPluginFactory :
public
NdrDiscoveryPluginFactoryBase
159
{
160
public
:
161
NdrDiscoveryPluginRefPtr New()
const override
162
{
163
return
TfCreateRefPtr(
new
T);
164
}
165
};
166
168
169
PXR_NAMESPACE_CLOSE_SCOPE
170
171
#endif
// PXR_USD_NDR_DISCOVERY_PLUGIN_H
NdrDiscoveryPluginContext
A context for discovery.
Definition:
discoveryPlugin.h:39
NdrDiscoveryPluginContext::GetSourceType
virtual NDR_API TfToken GetSourceType(const TfToken &discoveryType) const =0
Returns the source type associated with the discovery type.
NdrDiscoveryPlugin
Interface for discovery plugins.
Definition:
discoveryPlugin.h:127
NdrDiscoveryPlugin::DiscoverNodes
virtual NDR_API NdrNodeDiscoveryResultVec DiscoverNodes(const Context &)=0
Finds and returns all nodes that the implementing plugin should be aware of.
NdrDiscoveryPlugin::GetSearchURIs
virtual NDR_API const NdrStringVec & GetSearchURIs() const =0
Gets the URIs that this plugin is searching for nodes in.
TfRefBase
Enable a concrete base class for use with TfRefPtr.
Definition:
refBase.h:56
TfToken
Token for efficient comparison, assignment, and hashing of known strings.
Definition:
token.h:71
TfType::FactoryBase
Base class of all factory types.
Definition:
type.h:56
TfWeakBase
Enable a concrete base class for use with TfWeakPtr.
Definition:
weakBase.h:124
declarePtrs.h
Standard pointer typedefs.
TF_DECLARE_WEAK_AND_REF_PTRS
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition:
declarePtrs.h:72
pxr.h
declare.h
Common typedefs that are used throughout the NDR library.
weakBase.h
pxr
usd
ndr
discoveryPlugin.h
© Copyright 2024, Pixar Animation Studios. |
Terms of Use
| Generated on Thu Oct 24 2024 22:27:10 by
1.9.6