Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Utils::AttribBase Class Referenceabstract

#include <Core/Utils/Attribs.hpp>

+ Inheritance diagram for Ra::Core::Utils::AttribBase:
+ Collaboration diagram for Ra::Core::Utils::AttribBase:

Public Member Functions

 AttribBase (const std::string &name)
 
 AttribBase (const AttribBase &)=delete
 
AttribBaseoperator= (const AttribBase &)=delete
 
std::string getName () const
 Return the attribute's name.
 
void setName (const std::string &name)
 Set the attribute's name.
 
virtual void resize (size_t s)=0
 Resize the attribute's array.
 
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>.
 
virtual bool isFloat () const =0
 Return true if the attribute content is of Scalar type, false otherwise.
 
virtual bool isVector2 () const =0
 Return true if the attribute content is of Vector2 type, false otherwise.
 
virtual bool isVector3 () const =0
 Return true if the attribute content is of Vector3 type, false otherwise.
 
virtual bool isVector4 () const =0
 Return true if the attribute content is of Vector4 type, false otherwise.
 
bool isLocked () const
 
void unlock ()
 Unlock data so another one can gain write access.
 
virtual std::unique_ptr< AttribBaseclone ()=0
 
- Public Member Functions inherited from Ra::Core::Utils::ContainerIntrospectionInterface
virtual ~ContainerIntrospectionInterface ()
 only needed for correct abstract dtor call.
 
virtual size_t getSize () const =0
 
virtual size_t getNumberOfComponents () const =0
 
virtual size_t getBufferSize () const =0
 
virtual int getStride () const =0
 
virtual const void * dataPtr () const =0
 

Protected Member Functions

void lock (bool isLocked=true)
 

Detailed Description

AttribBase is the base class for attributes of all type.

Definition at line 26 of file Attribs.hpp.

Constructor & Destructor Documentation

◆ AttribBase()

Ra::Core::Utils::AttribBase::AttribBase ( const std::string & name)
inlineexplicit

Definition at line 446 of file Attribs.hpp.

◆ ~AttribBase()

Ra::Core::Utils::AttribBase::~AttribBase ( )
virtual

Definition at line 9 of file Attribs.cpp.

Member Function Documentation

◆ cast() [1/2]

template<typename T >
Attrib< T > & Ra::Core::Utils::AttribBase::cast ( )
inline

Downcast from AttribBase to Attrib<T>.

Definition at line 461 of file Attribs.hpp.

◆ cast() [2/2]

template<typename T >
const Attrib< T > & Ra::Core::Utils::AttribBase::cast ( ) const
inline

Downcast from AttribBase to Attrib<T>.

Definition at line 466 of file Attribs.hpp.

◆ getName()

std::string Ra::Core::Utils::AttribBase::getName ( ) const
inline

Return the attribute's name.

Definition at line 448 of file Attribs.hpp.

◆ isFloat()

virtual bool Ra::Core::Utils::AttribBase::isFloat ( ) const
pure virtual

Return true if the attribute content is of Scalar type, false otherwise.

Implemented in Ra::Core::Utils::Attrib< T >.

◆ isLocked()

bool Ra::Core::Utils::AttribBase::isLocked ( ) const
inline

Return true if data is locked, i.e. has been locked for write access with getDataWithlock() (defined in subclass Attrib). Double lock is prohebited, so when finished, call unlock();

Definition at line 470 of file Attribs.hpp.

◆ isVector2()

virtual bool Ra::Core::Utils::AttribBase::isVector2 ( ) const
pure virtual

Return true if the attribute content is of Vector2 type, false otherwise.

Implemented in Ra::Core::Utils::Attrib< T >.

◆ isVector3()

virtual bool Ra::Core::Utils::AttribBase::isVector3 ( ) const
pure virtual

Return true if the attribute content is of Vector3 type, false otherwise.

Implemented in Ra::Core::Utils::Attrib< T >.

◆ isVector4()

virtual bool Ra::Core::Utils::AttribBase::isVector4 ( ) const
pure virtual

Return true if the attribute content is of Vector4 type, false otherwise.

Implemented in Ra::Core::Utils::Attrib< T >.

◆ lock()

void Ra::Core::Utils::AttribBase::lock ( bool isLocked = true)
inlineprotected

Definition at line 478 of file Attribs.hpp.

◆ operator==()

bool Ra::Core::Utils::AttribBase::operator== ( const AttribBase & rhs)
inline

Return true if *this and rhs have the same name.

Definition at line 456 of file Attribs.hpp.

+ Here is the call graph for this function:

◆ resize()

virtual void Ra::Core::Utils::AttribBase::resize ( size_t s)
pure virtual

Resize the attribute's array.

Implemented in Ra::Core::Utils::Attrib< T >.

◆ setName()

void Ra::Core::Utils::AttribBase::setName ( const std::string & name)
inline

Set the attribute's name.

Definition at line 452 of file Attribs.hpp.

◆ unlock()

void Ra::Core::Utils::AttribBase::unlock ( )
inline

Unlock data so another one can gain write access.

Definition at line 474 of file Attribs.hpp.


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