Alembic
Version 1.1
Loading...
Searching...
No Matches
PropertyHeader.h
Go to the documentation of this file.
1
//-*****************************************************************************
2
//
3
// Copyright (c) 2009-2011,
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_AbcCoreAbstract_PropertyHeader_h
38
#define Alembic_AbcCoreAbstract_PropertyHeader_h
39
40
#include <
Alembic/AbcCoreAbstract/Foundation.h
>
41
#include <
Alembic/AbcCoreAbstract/MetaData.h
>
42
#include <
Alembic/AbcCoreAbstract/DataType.h
>
43
#include <
Alembic/AbcCoreAbstract/TimeSampling.h
>
44
45
namespace
Alembic
{
46
namespace
AbcCoreAbstract {
47
namespace
ALEMBIC_VERSION_NS
{
48
49
//-*****************************************************************************
56
enum
PropertyType
57
{
58
62
kCompoundProperty
= 0,
63
66
kScalarProperty
= 1,
67
71
kArrayProperty
= 2
72
};
73
74
//-*****************************************************************************
78
class
PropertyHeader
79
{
80
public
:
84
PropertyHeader
()
85
: m_name(),
86
m_propertyType(
kScalarProperty
),
87
m_metaData(),
88
m_dataType(),
89
m_timeSampling() {}
90
93
explicit
PropertyHeader
(
const
std::string &iName,
94
const
MetaData
&iMetaData )
95
: m_name( iName ),
96
m_propertyType(
kCompoundProperty
),
97
m_metaData( iMetaData ),
98
m_dataType(),
99
m_timeSampling() {}
100
103
PropertyHeader
(
const
std::string &iName,
104
PropertyType
iPropType,
105
const
MetaData
&iMetaData,
106
const
DataType
&iDataType,
107
const
TimeSamplingPtr
& iTsamp )
108
: m_name( iName ),
109
m_propertyType( iPropType ),
110
m_metaData( iMetaData ),
111
m_dataType( iDataType ),
112
m_timeSampling( iTsamp ) {}
113
116
PropertyHeader
(
const
PropertyHeader
&iCopy )
117
: m_name( iCopy.m_name ),
118
m_propertyType( iCopy.m_propertyType ),
119
m_metaData( iCopy.m_metaData ),
120
m_dataType( iCopy.m_dataType ),
121
m_timeSampling( iCopy.m_timeSampling ) {}
122
125
PropertyHeader
&
operator=
(
const
PropertyHeader
&iCopy )
126
{
127
m_name = iCopy.m_name;
128
m_propertyType = iCopy.m_propertyType;
129
m_metaData = iCopy.m_metaData;
130
m_dataType = iCopy.m_dataType;
131
m_timeSampling = iCopy.m_timeSampling;
132
return
*
this
;
133
}
134
137
const
std::string &
getName
()
const
{
return
m_name; }
138
139
void
setName
(
const
std::string &iName ) { m_name = iName; }
140
143
PropertyType
getPropertyType
()
const
{
return
m_propertyType; }
144
145
void
setPropertyType
(
PropertyType
iPtyp ) { m_propertyType = iPtyp; }
146
149
bool
isScalar
()
const
{
return
m_propertyType ==
kScalarProperty
; }
150
153
bool
isArray
()
const
{
return
m_propertyType ==
kArrayProperty
; }
154
157
bool
isCompound
()
const
{
return
m_propertyType ==
kCompoundProperty
; }
158
161
bool
isSimple
()
const
{
return
!
isCompound
(); }
162
165
const
MetaData
&
getMetaData
()
const
{
return
m_metaData; }
166
167
void
setMetaData
(
const
MetaData
&iMetaData ) { m_metaData = iMetaData; }
168
173
const
DataType
&
getDataType
()
const
{
return
m_dataType; }
174
175
void
setDataType
(
const
DataType
&iDataType ) { m_dataType = iDataType; }
176
181
TimeSamplingPtr
getTimeSampling
()
const
182
{
return
m_timeSampling; }
183
184
void
setTimeSampling
(
const
TimeSamplingPtr
&iTsamp )
185
{ m_timeSampling = iTsamp; }
186
187
private
:
188
std::string m_name;
189
PropertyType
m_propertyType;
190
MetaData
m_metaData;
191
DataType
m_dataType;
192
TimeSamplingPtr
m_timeSampling;
193
};
194
195
}
// End namespace ALEMBIC_VERSION_NS
196
197
using namespace
ALEMBIC_VERSION_NS
;
198
199
}
// End namespace AbcCoreAbstract
200
}
// End namespace Alembic
201
202
#endif
Foundation.h
DataType.h
MetaData.h
TimeSampling.h
ALEMBIC_VERSION_NS
#define ALEMBIC_VERSION_NS
Definition
Foundation.h:105
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::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::PropertyHeader
PropertyHeader(const std::string &iName, PropertyType iPropType, const MetaData &iMetaData, const DataType &iDataType, const TimeSamplingPtr &iTsamp)
Definition
PropertyHeader.h:103
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::PropertyHeader
PropertyHeader(const PropertyHeader &iCopy)
Definition
PropertyHeader.h:116
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::isCompound
bool isCompound() const
Definition
PropertyHeader.h:157
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::isScalar
bool isScalar() const
Definition
PropertyHeader.h:149
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::PropertyHeader
PropertyHeader(const std::string &iName, const MetaData &iMetaData)
Definition
PropertyHeader.h:93
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::setMetaData
void setMetaData(const MetaData &iMetaData)
Definition
PropertyHeader.h:167
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::setName
void setName(const std::string &iName)
Definition
PropertyHeader.h:139
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::isSimple
bool isSimple() const
Definition
PropertyHeader.h:161
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::PropertyHeader
PropertyHeader()
Definition
PropertyHeader.h:84
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::getMetaData
const MetaData & getMetaData() const
Definition
PropertyHeader.h:165
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::setTimeSampling
void setTimeSampling(const TimeSamplingPtr &iTsamp)
Definition
PropertyHeader.h:184
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::getTimeSampling
TimeSamplingPtr getTimeSampling() const
Definition
PropertyHeader.h:181
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::getPropertyType
PropertyType getPropertyType() const
Definition
PropertyHeader.h:143
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::setDataType
void setDataType(const DataType &iDataType)
Definition
PropertyHeader.h:175
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::getDataType
const DataType & getDataType() const
Definition
PropertyHeader.h:173
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::operator=
PropertyHeader & operator=(const PropertyHeader &iCopy)
Definition
PropertyHeader.h:125
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::setPropertyType
void setPropertyType(PropertyType iPtyp)
Definition
PropertyHeader.h:145
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::isArray
bool isArray() const
Definition
PropertyHeader.h:153
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyHeader::getName
const std::string & getName() const
Definition
PropertyHeader.h:137
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSamplingPtr
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
Definition
TimeSampling.h:137
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::PropertyType
PropertyType
Definition
PropertyHeader.h:57
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::kCompoundProperty
@ kCompoundProperty
Definition
PropertyHeader.h:62
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::kArrayProperty
@ kArrayProperty
Definition
PropertyHeader.h:71
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::kScalarProperty
@ kScalarProperty
Definition
PropertyHeader.h:66
Alembic
Alembic namespace ...
Definition
ArchiveInfo.h:46
opt
local
include
Alembic
AbcCoreAbstract
PropertyHeader.h
Generated on Tue Oct 1 2024 04:50:40 for Alembic by
1.11.0