Loading...
Searching...
No Matches
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample Class Reference

`#include <ScalarSample.h>`

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

## Classes

class | Data

## Public Member Functions

| ScalarSample (const DataType &iDataType)
void | copyFrom (const void *iData)
const DataType & | getDataType () const
const void * | getData () const
bool | operator== (const void *iRhs) const
bool | operator== (const ScalarSample &iRhs) const
bool | equalWithRelAbsError (const void *iRhs, double iRelAbsError) const
bool | equalWithRelAbsError (const ScalarSample &iRhs, double iRelAbsError) const
bool | operator< (const void *iRhs) const
bool | operator< (const ScalarSample &iRhs) const
void | setToDefault ()

## Detailed Description

ScalarSample is purely a helper class for implementations. It is not a required object of exchange within Alembic, and you wouldn't want this to be the carrier of data with scalars because you'd be carrying around the extra 2 bytes of "DataType" data every time you passed data, which is wasteful and unnecessary.

However, since the Scalar Readers and Writers will always be obligated to compare samples to previously written samples and copy sample values, this class will be helpful in that regard.

Plus - and this is just a hunch - I suspect that as Alembic evolves, there will be a need for this extra bit of encapsulation at the abstract level, which is why I'm putting it here.

Definition at line 62 of file ScalarSample.h.

## Constructor & Destructor Documentation

## ScalarSample()

Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::ScalarSample | ( | const DataType & | iDataType | ) |

explicit

Construct from given data type and data. Data will be copied. If given data is NULL, internal data will be set to default value.

Referenced by equalWithRelAbsError(), operator<(), and operator==().

Here is the caller graph for this function:

## Member Function Documentation

## copyFrom()

void Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::copyFrom | ( | const void * | iData | ) |

inline

Assignment to just data. Will assume data is of the same type as described internally by our data type. is invalid to set to NULL here.

Definition at line 92 of file ScalarSample.h.

## equalWithRelAbsError() [1/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::equalWithRelAbsError | ( | const ScalarSample & | iRhs,
|  | double | iRelAbsError ) const

inline

Same as precision-bound equality operator above. ...

Definition at line 140 of file ScalarSample.h.

References ScalarSample(), getData(), and getDataType().

Here is the call graph for this function:

## equalWithRelAbsError() [2/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::equalWithRelAbsError | ( | const void * | iRhs,
|  | double | iRelAbsError ) const

inline

Are the data types equal with some precision. This only applies to floating point types, but will just ignore the relAbsError for the non-floating-point types.

Definition at line 132 of file ScalarSample.h.

## getData()

const void * Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::getData | ( |  | ) | const

inline

Returns the memory address corresponding to the data ...

Definition at line 107 of file ScalarSample.h.

Referenced by equalWithRelAbsError(), operator<(), and operator==().

Here is the caller graph for this function:

## getDataType()

const DataType & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::getDataType | ( |  | ) | const

inline

Returns the datatype. ...

Definition at line 103 of file ScalarSample.h.

Referenced by equalWithRelAbsError(), operator<(), and operator==().

Here is the caller graph for this function:

## operator<() [1/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::operator< | ( | const ScalarSample & | iRhs | ) | const

inline

Sorting operator. Compares element by element, with first elements having precedence over later ones.

Definition at line 156 of file ScalarSample.h.

References ScalarSample(), getData(), and getDataType().

Here is the call graph for this function:

## operator<() [2/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::operator< | ( | const void * | iRhs | ) | const

inline

Sorting operator. Compares element by element, with first elements having precedence over later ones.

Definition at line 149 of file ScalarSample.h.

## operator==() [1/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::operator== | ( | const ScalarSample & | iRhs | ) | const

inline

Are the data types exactly equal? This will do an element-by-element comparison.

Definition at line 123 of file ScalarSample.h.

References ScalarSample(), getData(), and getDataType().

Here is the call graph for this function:

## operator==() [2/2]

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::operator== | ( | const void * | iRhs | ) | const

inline

Assuming the passed memory address points to data of the same type as us, are they equal? An element-by-element comparison is done.

Definition at line 116 of file ScalarSample.h.

## setToDefault()

void Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarSample::setToDefault | ( |  | ) |

inline

Sets to to default values for whichever POD types are contained. ...

Definition at line 178 of file ScalarSample.h.

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

- opt/local/include/Alembic/AbcCoreAbstract/ScalarSample.h