DataArray

class rlogic::DataArray : public rlogic::LogicObject

Storage for data - e.g. animation data like keyframes or timestamps.

Public Functions

EPropertyType getDataType() const

Returns the type of data stored in this DataArray.

Return

the data type

template<typename T>
const std::vector<T> *getData() const

Returns the data stored in this DataArray. Make sure to use the right template type, query getDataType to see what data type is stored (see also rlogic::PropertyTypeToEnum traits and rlogic::CanPropertyTypeBeStoredInDataArray). When called with an unsupported type, a compile-time assert is triggered. When called with a mismatching type (e.g. getData<float>() when the type is vec4f) the method returns nullptr.

Return

vector of data or nullptr if incorrect template type is provided

size_t getNumElements() const

Returns the number of elements stored in this DataArray.

Return

the number of elements

~DataArray() noexcept override

Destructor of DataArray

DataArray(const DataArray&) = delete

Copy Constructor of DataArray is deleted because DataArray is not supposed to be copied

DataArray(DataArray&&) = delete

Move Constructor of DataArray is deleted because DataArray is not supposed to be moved

DataArray &operator=(const DataArray&) = delete

Assignment operator of DataArray is deleted because DataArray is not supposed to be copied

DataArray &operator=(DataArray&&) = delete

Move assignment operator of DataArray is deleted because DataArray is not supposed to be moved

DataArray(std::unique_ptr<internal::DataArrayImpl> impl) noexcept

Constructor of DataArray. Use rlogic::LogicEngine::createDataArray.

Parameters
  • impl: implementation details of the DataArray

Public Members

internal::DataArrayImpl &m_impl

Implementation detail of DataArray