Cumulia Illustrator Rendering Engine v2.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::Real Class Reference

The Real class inherits from the Tuple class and stores a single float. More...

#include <real.h>

Inheritance diagram for cil::Real:
cil::Tuple< float > cil::Variant

Public Member Functions

 Real ()
 Contructs a Real object that stores a single float, initialized to 0.
 
 Real (float v)
 Contructs a Real object that stores the specified float v.
 
 Real (const Real &other)
 Constructs a Real object by copying the value of another Real object.
 
void set (float v)
 Sets the value of the Real object to the provided float v.
 
float get () const
 Gets the value of the Real object and the value could not be changed while accessing it.
 
- Public Member Functions inherited from cil::Tuple< float >
 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.
 
float * data ()
 Gets the data array of the Tuple.
 
const float * 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 float *data)
 Sets the data array of the Variant.
 
Tuple< float > & 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
 

Additional Inherited Members

- Protected Attributes inherited from cil::Tuple< float >
float * 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

The Real class inherits from the Tuple class and stores a single float.

Constructor & Destructor Documentation

◆ Real() [1/3]

cil::Real::Real ( )

Contructs a Real object that stores a single float, initialized to 0.

◆ Real() [2/3]

cil::Real::Real ( float v)

Contructs a Real object that stores the specified float v.

◆ Real() [3/3]

cil::Real::Real ( const Real & other)

Constructs a Real object by copying the value of another Real object.

Member Function Documentation

◆ get()

float cil::Real::get ( ) const

Gets the value of the Real object and the value could not be changed while accessing it.

◆ set()

void cil::Real::set ( float v)

Sets the value of the Real object to the provided float v.