Cumulia Illustrator Rendering Engine v1.0.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::Tuple< T > Class Template Reference

The Tuple is a templated class inheriting from the most basic class Variant. More...

#include <tuple.h>

Inheritance diagram for cil::Tuple< T >:
cil::Variant cil::Box< T > cil::Color< T > cil::Vector< T, S > cil::Box2< T, S > cil::Box3< T, S > cil::Color3< T > cil::Color4< T > cil::Vector2< T, S > cil::Vector3< T, S > cil::Vector4< T, S >

Public Member Functions

 Tuple (int size)
 Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.
 
virtual ~Tuple ()
 
int size () const
 Gets the number of elements of the Tuple.
 
T * data ()
 Gets the data array of the Tuple.
 
const T * data () const
 Gets the data array of the Tuple, and the data could not be modified upon which this function is called.
 
void setData (const T *data)
 Sets the data array of the Variant.
 
Tuple< T > & operator= (const Tuple &other)
 Copys the data of another Tuple to the one on which the operator is invoked.
 
bool operator== (const Tuple &other) const
 Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.
 
bool operator!= (const Tuple &other) const
 Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.
 
- Public Member Functions inherited from cil::Variant
 Variant ()
 
virtual ~Variant ()
 
const std::string & type () const
 

Protected Attributes

T * m_data
 The data array of the Tuple.
 
int m_size
 The number of elements that the data array of the Tuple holds.
 
- Protected Attributes inherited from cil::Variant
std::string m_type
 

Detailed Description

template<typename T>
class cil::Tuple< T >

The Tuple is a templated class inheriting from the most basic class Variant.

Constructor & Destructor Documentation

◆ Tuple()

template<typename T >
cil::Tuple< T >::Tuple ( int size)
inline

Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.

◆ ~Tuple()

template<typename T >
virtual cil::Tuple< T >::~Tuple ( )
inlinevirtual

Member Function Documentation

◆ data() [1/2]

template<typename T >
T * cil::Tuple< T >::data ( )
inline

Gets the data array of the Tuple.

◆ data() [2/2]

template<typename T >
const T * cil::Tuple< T >::data ( ) const
inline

Gets the data array of the Tuple, and the data could not be modified upon which this function is called.

◆ operator!=()

template<typename T >
bool cil::Tuple< T >::operator!= ( const Tuple< T > & other) const
inline

Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.

◆ operator=()

template<typename T >
Tuple< T > & cil::Tuple< T >::operator= ( const Tuple< T > & other)
inline

Copys the data of another Tuple to the one on which the operator is invoked.

◆ operator==()

template<typename T >
bool cil::Tuple< T >::operator== ( const Tuple< T > & other) const
inline

Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.

◆ setData()

template<typename T >
void cil::Tuple< T >::setData ( const T * data)
inline

Sets the data array of the Variant.

◆ size()

template<typename T >
int cil::Tuple< T >::size ( ) const
inline

Gets the number of elements of the Tuple.

Member Data Documentation

◆ m_data

template<typename T >
T* cil::Tuple< T >::m_data
protected

The data array of the Tuple.

◆ m_size

template<typename T >
int cil::Tuple< T >::m_size
protected

The number of elements that the data array of the Tuple holds.