HDK
 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_Overrides.h"
24 #include <UT/UT_StringHolder.h>
25 
26 // This class is a standalone wrapper around a specific object in a USD
27 // stage wrapped in an HUSD_DataHandle. It's purpose is to serve as the data
28 // accessor for tree nodes in the Scene Graph Tree. It should not be used for
29 // any other purpose, as it is extremely inefficient. Each function call locks
30 // the HUSD_DataHandle, queries its information, then unlocks it again. This
31 // is a matter of convenience for the calling pattern of the scene graph tree.
32 // Because it is inefficient the scene graph tree caches any information that
33 // comes out of this object.
34 //
35 // Anyone else tempted to use this object should use HUSD_Info instead.
37 {
38 public:
41  const UT_StringHolder &name);
42  virtual ~HUSD_ObjectHandle();
43 
44  virtual const HUSD_DataHandle &dataHandle() const = 0;
45  virtual const HUSD_ConstOverridesPtr&overrides() const = 0;
46 
47  const UT_StringHolder &path() const
48  { return myPath; }
49  const UT_StringHolder &name() const
50  { return myName; }
51  bool isValid() const
52  { return myPath.isstring(); }
53 
54 protected:
57 
60 };
61 
62 #endif
63 
GLuint const GLchar * name
Definition: glew.h:1814
UT_StringHolder myPath
#define HUSD_API
Definition: HUSD_API.h:32
static const UT_StringHolder theRootPrimName
UT_StringHolder myName
static const UT_StringHolder theRootPrimPath
const UT_StringHolder & path() const
GLsizei const GLchar *const * path
Definition: glew.h:6461
const UT_StringHolder & name() const
bool isValid() const