Alembic 1.8.11

Loading...
Searching...
No Matches
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter Class Referenceabstract

`#include <BasePropertyWriter.h>`

Inheritance diagram for Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter:
[legend]
Collaboration diagram for Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter:
[legend]

## Public Member Functions
virtual | ~BasePropertyWriter ()
virtual const PropertyHeader & | getHeader () const =0
const std::string & | getName () const
PropertyType | getPropertyType () const
bool | isScalar () const
bool | isArray () const
bool | isCompound () const
bool | isSimple () const
const MetaData & | getMetaData () const
const DataType & | getDataType () const
TimeSamplingPtr | getTimeSampling () const
virtual ObjectWriterPtr | getObject ()=0
virtual CompoundPropertyWriterPtr | getParent ()=0
virtual ScalarPropertyWriterPtr | asScalarPtr ()
virtual ArrayPropertyWriterPtr | asArrayPtr ()
virtual CompoundPropertyWriterPtr | asCompoundPtr ()

## Detailed Description

The BasePropertyWriter is the base class for all properties, from Simple (which encompasses Scalar and Array properties) to Compound. The functions here establish the things which all properties have in common - name, metaData, propertyType, as well as upcasting capabilities. We don't want to rely on dynamic_cast - it's slow and potentially has problems across DSO interfaces.

## Constructor & Destructor Documentation

## ◆ ~BasePropertyWriter()

Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::~BasePropertyWriter | ( |  | ) |
| virtual

Virtual destructor ...

## Member Function Documentation

## ◆ asArrayPtr()

ArrayPropertyWriterPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::asArrayPtr | ( |  | ) |
| virtual

Up-cast this base property to an ArrayProperty, if such an upcast is valid. This can be checked with the isArray() function. If the upcast is not valid, an empty pointer will be returned. This default implementation returns an empty pointer.

Reimplemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::ApwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::ApwImpl.

## ◆ asCompoundPtr()

CompoundPropertyWriterPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::asCompoundPtr | ( |  | ) |
| virtual

Up-cast this base property to a CompoundProperty, if such an upcast is valid. This can be checked with the isCompound() function. If the upcast is not valid, an empty pointer will be returned. This default implementation returns an empty pointer.

Reimplemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CpwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::CpwImpl.

## ◆ asScalarPtr()

ScalarPropertyWriterPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::asScalarPtr | ( |  | ) |
| virtual

Up-cast this base property to a ScalarProperty, if such an upcast is valid. This can be checked with the isScalar() function. If the upcast is not valid, an empty pointer will be returned. This default implementation returns an empty pointer.

Reimplemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::SpwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl.

## ◆ getDataType()

const DataType & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getDataType | ( |  | ) | const
| inline

Non-compound properties have a DataType. It is an error to call this function for CompoundProperties, and an exception will be thrown. This is a convenience function which just returns the DataType from the header that was used in creation.

## ◆ getHeader()

virtual const PropertyHeader & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getHeader | ( |  | ) | const
| pure virtual

Properties are created with a collection of metadata that is stored in a lightweight structure called PropertyHeader. This returns a constant reference to the PropertyHeader which was given upon creation.

Implemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CpwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::ApwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::CpwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl.

## ◆ getMetaData()

const MetaData & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getMetaData | ( |  | ) | const
| inline

All properties have MetaData. This just returns the MetaData portion of the header that was used in creation.

## ◆ getName()

const std::string & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getName | ( |  | ) | const
| inline

All properties have a name, which is unique amongst its siblings in the compund property they all live in. This is the name that was given when the property was created, and is part of the property header.

## ◆ getObject()

virtual ObjectWriterPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getObject | ( |  | ) |
| pure virtual

All properties have an object that owns them, and in order to ensure the object stays alive as long as the properties do, they retain a shared pointer to their object.

Implemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CpwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::ApwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::CpwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl.

## ◆ getParent()

virtual CompoundPropertyWriterPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getParent | ( |  | ) |
| pure virtual

Most properties live in a compound property. (Except for the top-compound property in any object) This returns a pointer to the parent compound property.

Implemented in Alembic::AbcCoreHDF5::ALEMBIC_VERSION_NS::CpwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::ApwImpl, Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::CpwImpl, and Alembic::AbcCoreOgawa::ALEMBIC_VERSION_NS::SpwImpl.

## ◆ getPropertyType()

PropertyType Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getPropertyType | ( |  | ) | const
| inline

There are three types of abstract properties. They are Scalar, Array, and Compound properties. This function returns an enum PropertyType which indicates which property type is returned. This is simply a convenience function which returns data from the PropertyHeader.

## ◆ getTimeSampling()

TimeSamplingPtr Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::getTimeSampling | ( |  | ) | const
| inline

Non-compound properties have a TimeSampling. It is an error to call this function for CompoundProperties, and an exception will be thrown. This is a convenience function which just returns the TimeSamplingType from the header that was used in creation.

## ◆ isArray()

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::isArray | ( |  | ) | const
| inline

Convenience to return whether the property is array. Same as getPropertyType() == kArrayProperty

## ◆ isCompound()

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::isCompound | ( |  | ) | const
| inline

Convenience to return whether the property is compound. Same as getPropertyType() == kCompoundProperty

## ◆ isScalar()

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::isScalar | ( |  | ) | const
| inline

Convenience to return whether the property is scalar. Same as getPropertyType() == kScalarProperty

## ◆ isSimple()

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter::isSimple | ( |  | ) | const
| inline

Convenience to return whether the property is simple (non-compound) Same as getPropertyType() != kCompoundProperty

The documentation for this class was generated from the following files:

- AbcCoreAbstract/BasePropertyWriter.h
- AbcCoreAbstract/BasePropertyWriter.cpp