HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
HUSD_ObjectHandle.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 Side Effects Software Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#ifndef __HUSD_ObjectHandle_h__
19
#define __HUSD_ObjectHandle_h__
20
21
#include "
HUSD_API.h
"
22
#include "
HUSD_DataHandle.h
"
23
#include "
HUSD_PostLayers.h
"
24
#include "
HUSD_Overrides.h
"
25
#include "
HUSD_Path.h
"
26
#include <
UT/UT_StringHolder.h
>
27
28
// This class is a standalone wrapper around a specific object in a USD
29
// stage wrapped in an HUSD_DataHandle. It's purpose is to serve as the data
30
// accessor for tree nodes in the Scene Graph Tree. It should not be used for
31
// any other purpose, as it is extremely inefficient. Each function call locks
32
// the HUSD_DataHandle, queries its information, then unlocks it again. This
33
// is a matter of convenience for the calling pattern of the scene graph tree.
34
// Because it is inefficient the scene graph tree caches any information that
35
// comes out of this object.
36
//
37
// Anyone else tempted to use this object should use HUSD_Info instead.
38
class
HUSD_API
HUSD_ObjectHandle
39
{
40
public
:
41
enum
OverridesHandling
{
42
OVERRIDES_COMPOSE
,
43
OVERRIDES_INSPECT
,
44
OVERRIDES_IGNORE
45
};
46
47
HUSD_ObjectHandle
(
48
OverridesHandling overrides_handling
49
= OVERRIDES_IGNORE);
50
HUSD_ObjectHandle
(
const
HUSD_Path
&
path
,
51
OverridesHandling overrides_handling
52
= OVERRIDES_IGNORE);
53
virtual
~
HUSD_ObjectHandle
();
54
55
virtual
const
HUSD_DataHandle
&dataHandle()
const
= 0;
56
virtual
const
HUSD_ConstOverridesPtr
&overrides()
const
= 0;
57
virtual
const
HUSD_ConstPostLayersPtr
&postLayers()
const
= 0;
58
59
OverridesHandling
overridesHandling
()
const
60
{
return
myOverridesHandling; }
61
const
HUSD_Path
&
path
()
const
62
{
return
myPath; }
63
bool
isValid
()
const
64
{
return
!myPath.isEmpty(); }
65
66
private
:
67
HUSD_Path
myPath;
68
OverridesHandling myOverridesHandling;
69
};
70
71
#endif
72
HUSD_ObjectHandle::overridesHandling
OverridesHandling overridesHandling() const
Definition:
HUSD_ObjectHandle.h:59
HUSD_DataHandle
Definition:
HUSD_DataHandle.h:87
HUSD_Path.h
HUSD_ObjectHandle::OverridesHandling
OverridesHandling
Definition:
HUSD_ObjectHandle.h:41
HUSD_Path
Definition:
HUSD_Path.h:31
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
HUSD_API
#define HUSD_API
Definition:
HUSD_API.h:32
HUSD_ObjectHandle::OVERRIDES_INSPECT
Definition:
HUSD_ObjectHandle.h:43
HUSD_ObjectHandle::OVERRIDES_COMPOSE
Definition:
HUSD_ObjectHandle.h:42
HUSD_ObjectHandle
Definition:
HUSD_ObjectHandle.h:38
HUSD_Overrides.h
HUSD_API.h
UT_IntrusivePtr< const HUSD_Overrides >
UT_StringHolder.h
HUSD_ObjectHandle::path
const HUSD_Path & path() const
Definition:
HUSD_ObjectHandle.h:61
HUSD_DataHandle.h
HUSD_PostLayers.h
HUSD_ObjectHandle::isValid
bool isValid() const
Definition:
HUSD_ObjectHandle.h:63
HUSD
HUSD_ObjectHandle.h
Generated on Tue Dec 17 2024 03:39:51 for HDK by
1.8.6