Radium Engine
1.5.20
|
#include <Core/Utils/Attribs.hpp>
Public Types | |
using | value_type = T |
using | Container = VectorArray<T> |
Public Member Functions | |
Attrib (const std::string &name) | |
void | resize (size_t s) override |
Resize the container (value_type must have a default ctor). | |
Container & | getDataWithLock () |
const Container & | data () const |
Read-only acccess to the attribute content. | |
bool | isFloat () const override |
Return true if the attribute content is of Scalar type, false otherwise. | |
bool | isVector2 () const override |
Return true if the attribute content is of Vector2 type, false otherwise. | |
bool | isVector3 () const override |
Return true if the attribute content is of Vector3 type, false otherwise. | |
bool | isVector4 () const override |
Return true if the attribute content is of Vector4 type, false otherwise. | |
template<typename U > | |
bool | isType () |
check if attrib is a given type, as in attr.isType<MyMatrix>() | |
std::unique_ptr< AttribBase > | clone () override |
size_t | getSize () const override |
size_t | getNumberOfComponents () const override |
int | getStride () const override |
size_t | getBufferSize () const override |
const void * | dataPtr () const override |
void | setData (const Container &data) |
void | setData (Container &&data) |
Public Member Functions inherited from Ra::Core::Utils::AttribBase | |
AttribBase (const std::string &name) | |
AttribBase (const AttribBase &)=delete | |
AttribBase & | operator= (const AttribBase &)=delete |
std::string | getName () const |
Return the attribute's name. | |
void | setName (const std::string &name) |
Set the attribute's name. | |
bool | operator== (const AttribBase &rhs) |
Return true if *this and rhs have the same name. | |
template<typename T > | |
Attrib< T > & | cast () |
Downcast from AttribBase to Attrib<T>. | |
template<typename T > | |
const Attrib< T > & | cast () const |
Downcast from AttribBase to Attrib<T>. | |
bool | isLocked () const |
void | unlock () |
Unlock data so another one can gain write access. | |
Public Member Functions inherited from Ra::Core::Utils::ContainerIntrospectionInterface | |
virtual | ~ContainerIntrospectionInterface () |
only needed for correct abstract dtor call. | |
Additional Inherited Members | |
Protected Member Functions inherited from Ra::Core::Utils::AttribBase | |
void | lock (bool isLocked=true) |
An Attrib stores an element of type T
for each entry.
Definition at line 91 of file Attribs.hpp.
using Ra::Core::Utils::Attrib< T >::Container = VectorArray<T> |
Definition at line 95 of file Attribs.hpp.
using Ra::Core::Utils::Attrib< T >::value_type = T |
Definition at line 94 of file Attribs.hpp.
|
explicit |
Definition at line 487 of file Attribs.hpp.
|
virtual |
Definition at line 491 of file Attribs.hpp.
|
inlineoverridevirtual |
Implements Ra::Core::Utils::AttribBase.
Definition at line 133 of file Attribs.hpp.
|
inline |
Read-only acccess to the attribute content.
Definition at line 524 of file Attribs.hpp.
|
overridevirtual |
Implements Ra::Core::Utils::ContainerIntrospectionInterface.
Definition at line 505 of file Attribs.hpp.
|
overridevirtual |
Implements Ra::Core::Utils::ContainerIntrospectionInterface.
Definition at line 539 of file Attribs.hpp.
|
inline |
Read-write access to the attribute content. lock the content, when done call unlock()
Definition at line 499 of file Attribs.hpp.
|
overridevirtual |
Return the number of components of one element (i.e. for glVertexAttribPointer size argument )
Implements Ra::Core::Utils::ContainerIntrospectionInterface.
Definition at line 571 of file Attribs.hpp.
|
overridevirtual |
ContainerIntrosectionInterface implementation
Implements Ra::Core::Utils::ContainerIntrospectionInterface.
Definition at line 529 of file Attribs.hpp.
|
overridevirtual |
Implements Ra::Core::Utils::ContainerIntrospectionInterface.
Definition at line 534 of file Attribs.hpp.
|
overridevirtual |
Return true if the attribute content is of Scalar type, false otherwise.
Implements Ra::Core::Utils::AttribBase.
Definition at line 544 of file Attribs.hpp.
check if attrib is a given type, as in attr.isType<MyMatrix>()
Definition at line 565 of file Attribs.hpp.
|
overridevirtual |
Return true if the attribute content is of Vector2 type, false otherwise.
Implements Ra::Core::Utils::AttribBase.
Definition at line 549 of file Attribs.hpp.
|
overridevirtual |
Return true if the attribute content is of Vector3 type, false otherwise.
Implements Ra::Core::Utils::AttribBase.
Definition at line 554 of file Attribs.hpp.
|
overridevirtual |
Return true if the attribute content is of Vector4 type, false otherwise.
Implements Ra::Core::Utils::AttribBase.
Definition at line 559 of file Attribs.hpp.
|
overridevirtual |
Resize the container (value_type must have a default ctor).
Implements Ra::Core::Utils::AttribBase.
Definition at line 495 of file Attribs.hpp.
void Ra::Core::Utils::Attrib< T >::setData | ( | const Container & | data | ) |
setAttribData, attrib mustn't be locked (it's asserted).
Definition at line 510 of file Attribs.hpp.
void Ra::Core::Utils::Attrib< T >::setData | ( | Container && | data | ) |
Definition at line 517 of file Attribs.hpp.