Assimp  v3.1.1 (June 2014)
Value Class Reference

This class implements a value. More...

Classes

class  Iterator
 This class implements an iterator through a Value list. More...
 

Public Types

enum  ValueType {
  ddl_none = -1 , ddl_bool = 0 , ddl_int8 , ddl_int16 ,
  ddl_int32 , ddl_int64 , ddl_unsigned_int8 , ddl_unsigned_int16 ,
  ddl_unsigned_int32 , ddl_unsigned_int64 , ddl_half , ddl_float ,
  ddl_double , ddl_string , ddl_ref , ddl_types_max
}
 This enum describes the data type stored in the value. More...
 

Public Member Functions

void dump ()
 Dumps the value. More...
 
bool getBool ()
 Returns the boolean value. More...
 
double getDouble () const
 Returns the double value. More...
 
float getFloat () const
 Returns the float value. More...
 
int16 getInt16 ()
 Returns the int16 value. More...
 
int32 getInt32 ()
 Returns the int16 value. More...
 
int64 getInt64 ()
 Returns the int16 value. More...
 
int8 getInt8 ()
 Returns the int8 value. More...
 
ValuegetNext () const
 Returns the next value. More...
 
ReferencegetRef () const
 Returns the pointer showing to the reference. More...
 
const char * getString () const
 Returns the std::string value. More...
 
uint16 getUnsignedInt16 () const
 Returns the unsigned int16 value. More...
 
uint32 getUnsignedInt32 () const
 Returns the unsigned int8 value. More...
 
uint64 getUnsignedInt64 () const
 Returns the unsigned int64 value. More...
 
uint8 getUnsignedInt8 () const
 Returns the unsigned int8 value. More...
 
void setBool (bool value)
 Assigns a boolean to the value. More...
 
void setDouble (double value)
 Assigns a double to the value. More...
 
void setFloat (float value)
 Assigns a float to the value. More...
 
void setInt16 (int16 value)
 Assigns a int16 to the value. More...
 
void setInt32 (int32 value)
 Assigns a int32 to the value. More...
 
void setInt64 (int64 value)
 Assigns a int64 to the value. More...
 
void setInt8 (int8 value)
 Assigns a int8 to the value. More...
 
void setNext (Value *next)
 Assigns the next value. More...
 
void setRef (Reference *ref)
 Set the reference. More...
 
void setString (const std::string &str)
 Assigns a std::string to the value. More...
 
void setUnsignedInt16 (uint16 value)
 Assigns a unsigned int16 to the value. More...
 
void setUnsignedInt32 (uint32 value)
 Assigns a unsigned int32 to the value. More...
 
void setUnsignedInt64 (uint64 value)
 Assigns a unsigned int64 to the value. More...
 
void setUnsignedInt8 (uint8 value)
 Assigns a unsigned int8 to the value. More...
 
size_t size ()
 Gets the length of the array. More...
 
 Value (ValueType type)
 The class constructor. More...
 
 ~Value ()
 The class destructor. More...
 

Public Attributes

unsigned char * m_data
 
Valuem_next
 
size_t m_size
 
ValueType m_type
 

Friends

struct ValueAllocator
 

Detailed Description

This class implements a value.


Values are used to store data types like boolean, integer, floats, double and many mode. To get an overview please check the enum VylueType (

See also
Value::ValueType ).

Values can be single items or lists of items. They are implemented as linked lists.

Member Enumeration Documentation

◆ ValueType

This enum describes the data type stored in the value.

Enumerator
ddl_none 

Nothing specified.

ddl_bool 

A boolean type.

ddl_int8 

Integer type, 8 bytes.

ddl_int16 

Integer type, 16 bytes.

ddl_int32 

Integer type, 32 bytes.

ddl_int64 

Integer type, 64 bytes.

ddl_unsigned_int8 

Unsigned integer type, 8 bytes.

ddl_unsigned_int16 

Unsigned integer type, 16 bytes.

ddl_unsigned_int32 

Unsigned integer type, 32 bytes.

ddl_unsigned_int64 

Unsigned integer type, 64 bytes.

ddl_half 

Half data type.

ddl_float 

float data type

ddl_double 

Double data type.

ddl_string 

String data type.

ddl_ref 

Reference, used to define references to other data definitions.

ddl_types_max 

Upper limit.

Constructor & Destructor Documentation

◆ Value()

Value::Value ( ValueType  type)

The class constructor.

Parameters
type[in] The value type.

◆ ~Value()

Value::~Value ( )

The class destructor.

Member Function Documentation

◆ dump()

void Value::dump ( )

Dumps the value.

◆ getBool()

bool Value::getBool ( )

Returns the boolean value.

Returns
The boolean value.

◆ getDouble()

double Value::getDouble ( ) const

Returns the double value.

Returns
The double value.

◆ getFloat()

float Value::getFloat ( ) const

Returns the float value.

Returns
The float value.

◆ getInt16()

int16 Value::getInt16 ( )

Returns the int16 value.

Returns
The int16 value.

◆ getInt32()

int32 Value::getInt32 ( )

Returns the int16 value.

Returns
The int32 value.

◆ getInt64()

int64 Value::getInt64 ( )

Returns the int16 value.

Returns
The int64 value.

◆ getInt8()

int8 Value::getInt8 ( )

Returns the int8 value.

Returns
The int8 value.

◆ getNext()

Value * Value::getNext ( ) const

Returns the next value.

Returns
The next value.s

◆ getRef()

Reference * Value::getRef ( ) const

Returns the pointer showing to the reference.

Returns
Pointer showing to the reference.

◆ getString()

const char * Value::getString ( ) const

Returns the std::string value.

Returns
The std::string value.

◆ getUnsignedInt16()

uint16 Value::getUnsignedInt16 ( ) const

Returns the unsigned int16 value.

Returns
The unsigned int16 value.

◆ getUnsignedInt32()

uint32 Value::getUnsignedInt32 ( ) const

Returns the unsigned int8 value.

Returns
The unsigned int32 value.

◆ getUnsignedInt64()

uint64 Value::getUnsignedInt64 ( ) const

Returns the unsigned int64 value.

Returns
The unsigned int64 value.

◆ getUnsignedInt8()

uint8 Value::getUnsignedInt8 ( ) const

Returns the unsigned int8 value.

Returns
The unsigned int8 value.

◆ setBool()

void Value::setBool ( bool  value)

Assigns a boolean to the value.

Parameters
value[in9 The value.

◆ setDouble()

void Value::setDouble ( double  value)

Assigns a double to the value.

Parameters
value[in] The value.

◆ setFloat()

void Value::setFloat ( float  value)

Assigns a float to the value.

Parameters
value[in] The value.

◆ setInt16()

void Value::setInt16 ( int16  value)

Assigns a int16 to the value.

Parameters
value[in] The value.

◆ setInt32()

void Value::setInt32 ( int32  value)

Assigns a int32 to the value.

Parameters
value[in] The value.

◆ setInt64()

void Value::setInt64 ( int64  value)

Assigns a int64 to the value.

Parameters
value[in] The value.

◆ setInt8()

void Value::setInt8 ( int8  value)

Assigns a int8 to the value.

Parameters
value[in] The value.

◆ setNext()

void Value::setNext ( Value next)

Assigns the next value.

Parameters
next[n] The next value.

◆ setRef()

void Value::setRef ( Reference ref)

Set the reference.

Parameters
ref[in] Pointer showing to the reference.

◆ setString()

void Value::setString ( const std::string &  str)

Assigns a std::string to the value.

Parameters
value[in] The value.

◆ setUnsignedInt16()

void Value::setUnsignedInt16 ( uint16  value)

Assigns a unsigned int16 to the value.

Parameters
value[in] The value.

◆ setUnsignedInt32()

void Value::setUnsignedInt32 ( uint32  value)

Assigns a unsigned int32 to the value.

Parameters
value[in] The value.

◆ setUnsignedInt64()

void Value::setUnsignedInt64 ( uint64  value)

Assigns a unsigned int64 to the value.

Parameters
value[in] The value.

◆ setUnsignedInt8()

void Value::setUnsignedInt8 ( uint8  value)

Assigns a unsigned int8 to the value.

Parameters
value[in] The value.

◆ size()

size_t Value::size ( )

Gets the length of the array.

Returns
The number of items in the array.

Friends And Related Function Documentation

◆ ValueAllocator

friend struct ValueAllocator
friend

Member Data Documentation

◆ m_data

unsigned char* Value::m_data

◆ m_next

Value* Value::m_next

◆ m_size

size_t Value::m_size

◆ m_type

ValueType Value::m_type

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