Alembic
1.8.11
Toggle main menu visibility
Loading...
Searching...
No Matches
ReadUtil.h
1
//-*****************************************************************************
2
//
3
// Copyright (c) 2009-2012,
4
// Sony Pictures Imageworks, Inc. and
5
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6
//
7
// All rights reserved.
8
//
9
// Redistribution and use in source and binary forms, with or without
10
// modification, are permitted provided that the following conditions are
11
// met:
12
// * Redistributions of source code must retain the above copyright
13
// notice, this list of conditions and the following disclaimer.
14
// * Redistributions in binary form must reproduce the above
15
// copyright notice, this list of conditions and the following disclaimer
16
// in the documentation and/or other materials provided with the
17
// distribution.
18
// * Neither the name of Sony Pictures Imageworks, nor
19
// Industrial Light & Magic nor the names of their contributors may be used
20
// to endorse or promote products derived from this software without specific
21
// prior written permission.
22
//
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
//
35
//-*****************************************************************************
36
37
#ifndef Alembic_AbcCoreHDF5_ReadUtil_h
38
#define Alembic_AbcCoreHDF5_ReadUtil_h
39
40
#include <Alembic/AbcCoreHDF5/Foundation.h>
41
#include <Alembic/AbcCoreHDF5/HDF5Hierarchy.h>
42
#include <Alembic/AbcCoreHDF5/StringReadUtil.h>
43
44
namespace
Alembic
{
45
namespace
AbcCoreHDF5 {
46
namespace
ALEMBIC_VERSION_NS {
47
48
//-*****************************************************************************
49
//-*****************************************************************************
50
// UTILITY THING
51
//-*****************************************************************************
52
53
//-*****************************************************************************
54
void
55
ReadReferences ( hid_t iParent,
56
const
std::string& iRefName,
57
std::vector<hobj_ref_t>& oRefs );
58
59
//-*****************************************************************************
60
bool
61
ReadKey( hid_t iHashDset,
62
const
std::string &iAttrName,
63
AbcA::ArraySample::Key &oKey );
64
65
//-*****************************************************************************
66
bool
67
ReadMetaData(
H5Node
& iGroup,
68
const
std::string &iMetaDataName,
69
AbcA::MetaData
&oMetaData );
70
71
//-*****************************************************************************
72
void
73
ReadPropertyHeader(
H5Node
& iParent,
74
const
std::string & iPropName,
75
AbcA::PropertyHeader
& oHeader,
76
bool
& oIsScalarLike,
77
uint32_t & oNumSamples,
78
uint32_t & oFirstChangedIndex,
79
uint32_t & oLastChangedIndex,
80
uint32_t & oTimeSamplingIndex );
81
82
//-*****************************************************************************
83
void
84
ReadScalar( hid_t iGroup,
85
const
std::string &iScalarName,
86
hid_t iFileType,
87
hid_t iNativeType,
88
void
*oData );
89
90
//-*****************************************************************************
91
void
92
ReadSmallArray( hid_t iGroup,
93
const
std::string &iAttrName,
94
hid_t iFileType,
95
hid_t iNativeType,
96
size_t
iMaxElems,
97
size_t
&oReadElems,
98
void
*oData );
99
100
//-*****************************************************************************
101
void
102
ReadDimensions( hid_t iParent,
103
const
std::string &iName,
104
Dimensions &oDims );
105
106
//-*****************************************************************************
107
void
108
ReadDataSetDimensions( hid_t iParent,
109
const
std::string &iName,
110
hsize_t iExtent,
111
Dimensions &oDims );
112
113
//-*****************************************************************************
114
AbcA::ArraySamplePtr
115
ReadArray( AbcA::ReadArraySampleCachePtr iCache,
116
hid_t iGroup,
117
const
std::string &iArrayName,
118
const
AbcA::DataType
&iDataType,
119
hid_t iFileType,
120
hid_t iNativeType );
121
122
//-*****************************************************************************
123
void
124
ReadArray(
void
* iIntoLocation,
125
hid_t iParent,
126
const
std::string &iName,
127
const
AbcA::DataType
&iDataType,
128
hid_t iType );
129
130
//-*****************************************************************************
131
// Fills in oTimeSamples with the different TimeSampling that the archive uses
132
// Intrinsically all archives have the first TimeSampling for uniform time
133
// sampling with a start time of 0 and time per cycle of 1
134
// (aka identity sampling)
135
void
136
ReadTimeSamples( hid_t iParent,
137
std::vector < AbcA::TimeSamplingPtr > & oTimeSamples );
138
139
}
// End namespace ALEMBIC_VERSION_NS
140
141
using namespace
ALEMBIC_VERSION_NS;
142
143
}
// End namespace AbcCoreHDF5
144
}
// End namespace Alembic
145
146
#endif
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::DataType
Definition
DataType.h:52
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::MetaData
Definition
MetaData.h:60
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader
Definition
PropertyHeader.h:79
Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::H5Node
Definition
HDF5Hierarchy.h:50
Alembic
Alembic namespace ...
Definition
ArchiveInfo.cpp:39
AbcCoreHDF5
ReadUtil.h
Generated by
1.18.0