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_PostLayers.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_PostLayers_h__
19
#define __HUSD_PostLayers_h__
20
21
#include "
HUSD_API.h
"
22
#include "
HUSD_DataHandle.h
"
23
#include <
UT/UT_IntrusivePtr.h
>
24
#include <
UT/UT_IStream.h
>
25
#include <
UT/UT_StringArray.h
>
26
#include <iosfwd>
27
28
class
HUSD_API
HUSD_PostLayers
:
29
public
UT_IntrusiveRefCounter
<HUSD_PostLayers>,
30
public
UT_NonCopyable
31
{
32
public
:
33
HUSD_PostLayers
();
34
~
HUSD_PostLayers
();
35
36
int
layerCount()
const
;
37
const
UT_StringHolder
&layerName(
int
i)
const
;
38
bool
hasLayer(
const
UT_StringRef
&
name
)
const
;
39
PXR_NS::XUSD_LayerPtr
layer
(
int
i)
const
;
40
PXR_NS::XUSD_LayerPtr
layer
(
const
UT_StringRef
&name)
const
;
41
void
*pythonLayer(
int
i)
const
;
42
void
*pythonLayer(
const
UT_StringRef
&name)
const
;
43
44
void
save(std::ostream &os)
const
;
45
bool
load(
UT_IStream
&is);
46
void
copy
(
const
HUSD_PostLayers
&
src
);
47
void
clear();
48
bool
removeLayer(
int
i);
49
bool
removeLayer(
const
UT_StringRef
&name);
50
51
// Prepare to author data into the named layer in the context of the
52
// supplied data handle and load masks.
53
void
writeLock(
const
HUSD_DataHandle
&datahandle,
54
const
HUSD_LoadMasksPtr
&loadmasks,
55
const
UT_StringHolder
&layername);
56
// Once a write lock has been established, it is possible to author data
57
// to our own copy of this data handle using stadard AutoLock methods.
58
const
HUSD_DataHandle
&lockedDataHandle();
59
// Releasing the write lock copies the active layer of our data handle
60
// into the named layer in our map.
61
void
release(
const
HUSD_AutoWriteLock
*writelock);
62
63
exint
versionId
()
const
64
{
return
myVersionId; }
65
66
private
:
67
UT_Array<PXR_NS::XUSD_LayerPtr>
myLayers;
68
UT_StringArray
myLayerNames;
69
HUSD_DataHandle
myDataHandle;
70
const
HUSD_DataHandle
*myLockedToDataHandle;
71
UT_StringHolder
myLockedToLayerName;
72
exint
myLockedToLayerIndex;
73
exint
myVersionId;
74
};
75
76
#endif
77
HUSD_DataHandle
Definition:
HUSD_DataHandle.h:87
HUSD_LoadMasksPtr
UT_SharedPtr< HUSD_LoadMasks > HUSD_LoadMasksPtr
Definition:
HUSD_DataHandle.h:54
Filesystem::copy
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
UT_IStream
Definition:
UT_IStream.h:56
exint
int64 exint
Definition:
SYS_Types.h:125
HUSD_API
#define HUSD_API
Definition:
HUSD_API.h:32
UT_StringArray.h
UT_IStream.h
UT_StringRef
Definition:
UT_StringHolder.h:188
UT_IntrusiveRefCounter
A reference counter base class for use with UT_IntrusivePtr.
Definition:
UT_IntrusivePtr.h:242
HUSD_AutoWriteLock
Definition:
HUSD_DataHandle.h:261
UT_Array
Definition:
BV_KDOPTree.h:18
HUSD_PostLayers::versionId
exint versionId() const
Definition:
HUSD_PostLayers.h:63
layer
GLenum GLuint GLint GLint layer
Definition:
glcorearb.h:1299
UT_StringHolder
Definition:
UT_StringHolder.h:999
UT_StringArray
Definition:
UT_StringArray.h:24
HUSD_API.h
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
HUSD_PostLayers
Definition:
HUSD_PostLayers.h:28
UT_NonCopyableNS::UT_NonCopyable
Definition:
UT_NonCopyable.h:17
HUSD_DataHandle.h
UT_IntrusivePtr.h
XUSD_LayerPtr
UT_IntrusivePtr< XUSD_Layer > XUSD_LayerPtr
Definition:
HUSD_DataHandle.h:62
src
GLenum src
Definition:
glcorearb.h:1793
HUSD
HUSD_PostLayers.h
Generated on Fri Nov 8 2024 03:39:22 for HDK by
1.8.6