Loading...
Searching...
No Matches
PropertyHeader.h
Go to the documentation of this file.
//-*****************************************************************************
//
// Copyright (c) 2009-2011,
// Sony Pictures Imageworks Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Sony Pictures Imageworks, nor
// Industrial Light & Magic, nor the names of their contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//-*****************************************************************************
#ifndef Alembic_AbcCoreAbstract_PropertyHeader_h
#define Alembic_AbcCoreAbstract_PropertyHeader_h
#include <Alembic/AbcCoreAbstract/Foundation.h>
#include <Alembic/AbcCoreAbstract/MetaData.h>
#include <Alembic/AbcCoreAbstract/DataType.h>
#include <Alembic/AbcCoreAbstract/TimeSampling.h>
namespace Alembic {
namespace AbcCoreAbstract {
namespace ALEMBIC_VERSION_NS {
//-*****************************************************************************
enum PropertyType
{
kCompoundProperty = 0,
kScalarProperty = 1,
kArrayProperty = 2
};
//-*****************************************************************************
class PropertyHeader
{
public:
PropertyHeader()
: m_name(),
m_propertyType( kScalarProperty ),
m_metaData(),
m_dataType(),
m_timeSampling() {}
explicit PropertyHeader( const std::string &iName,
const MetaData &iMetaData )
: m_name( iName ),
m_propertyType( kCompoundProperty ),
m_metaData( iMetaData ),
m_dataType(),
m_timeSampling() {}
PropertyHeader( const std::string &iName,
PropertyType iPropType,
const MetaData &iMetaData,
const DataType &iDataType,
const TimeSamplingPtr & iTsamp )
: m_name( iName ),
m_propertyType( iPropType ),
m_metaData( iMetaData ),
m_dataType( iDataType ),
m_timeSampling( iTsamp ) {}
PropertyHeader( const PropertyHeader &iCopy )
: m_name( iCopy.m_name ),
m_propertyType( iCopy.m_propertyType ),
m_metaData( iCopy.m_metaData ),
m_dataType( iCopy.m_dataType ),
m_timeSampling( iCopy.m_timeSampling ) {}
PropertyHeader& operator=( const PropertyHeader &iCopy )
{
m_name = iCopy.m_name;
m_propertyType = iCopy.m_propertyType;
m_metaData = iCopy.m_metaData;
m_dataType = iCopy.m_dataType;
m_timeSampling = iCopy.m_timeSampling;
return *this;
}
const std::string &getName() const { return m_name; }
void setName( const std::string &iName ) { m_name = iName; }
PropertyType getPropertyType() const { return m_propertyType; }
void setPropertyType( PropertyType iPtyp ) { m_propertyType = iPtyp; }
bool isScalar() const { return m_propertyType == kScalarProperty; }
bool isArray() const { return m_propertyType == kArrayProperty; }
bool isCompound() const { return m_propertyType == kCompoundProperty; }
bool isSimple() const { return !isCompound(); }
const MetaData &getMetaData() const { return m_metaData; }
void setMetaData( const MetaData &iMetaData ) { m_metaData = iMetaData; }
const DataType &getDataType() const { return m_dataType; }
void setDataType( const DataType &iDataType ) { m_dataType = iDataType; }
TimeSamplingPtr getTimeSampling() const
{ return m_timeSampling; }
void setTimeSampling( const TimeSamplingPtr &iTsamp )
{ m_timeSampling = iTsamp; }
private:
std::string m_name;
PropertyType m_propertyType;
MetaData m_metaData;
DataType m_dataType;
TimeSamplingPtr m_timeSampling;
};
} // End namespace ALEMBIC_VERSION_NS
using namespace ALEMBIC_VERSION_NS;
} // End namespace AbcCoreAbstract
} // End namespace Alembic
#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::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
Definition ArchiveReader.h:47
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::AbcCoreAbstract
Definition ArchiveReader.h:46
Alembic
Alembic namespace ...
Definition ArchiveInfo.h:46