Orxonox: orxonox::MultiType Class Reference

# orxonox::MultiType Class Reference

The MultiType can hold a value of many possible types and convert them to other types. More...

`#include <src/util/MultiType.h>`

List of all members.

## Public Member Functions

bool | convert (MT_Type::Value type)
| Converts the current value to the type of the other MultiType.
bool | convert (const MultiType &other)
| Converts the current value to type T.
template<typename T>
bool | convert ()
void | copy (const MultiType &other)
| Copies the other MultiType by assigning value and type.
template<>
void | createNewValueContainer (const orxonox::Degree &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::Radian &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::Quaternion &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::ColourValue &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::Vector4 &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::Vector3 &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const orxonox::Vector2 &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const std::string &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (void *const &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const bool &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const long double &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const double &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const float &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const unsigned long long &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const long long &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const unsigned long &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const long &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const unsigned int &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const int &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const unsigned short &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const short &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const unsigned char &value)
| Creates a new value container for the given type.
template<>
void | createNewValueContainer (const char &value)
| Returns the current value, converted to the requested type.
void | exportData (uint8_t *&mem) const
| Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT.
bool | getBool () const
| Returns the current value, converted to the requested type.
char | getChar () const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
orxonox::ColourValue | getColourValue () const
| Returns the current value, converted to the requested type.
orxonox::Degree | getDegree () const
| Returns the current value, converted to the requested type.
double | getDouble () const
| Returns the current value, converted to the requested type.
float | getFloat () const
| Returns the current value, converted to the requested type.
int | getInt () const
| Returns the current value, converted to the requested type.
long | getLong () const
| Returns the current value, converted to the requested type.
long double | getLongDouble () const
| Returns the current value, converted to the requested type.
long long | getLongLong () const
| Returns the current value, converted to the requested type.
uint32_t | getNetworkSize () const
template<typename T>
T * | getPointer () const
| Returns the current value, converted to the requested type.
orxonox::Quaternion | getQuaternion () const
| Returns the current value, converted to the requested type.
orxonox::Radian | getRadian () const
| Returns the current value, converted to the requested type.
short | getShort () const
| Returns the current value, converted to the requested type.
std::string | getString () const
| Returns the current value, converted to the requested type.
MT_Type::Value | getType () const
| Resets the value and changes the internal type to the given type.
std::string | getTypename () const
| Returns the name of the current type.
unsigned char | getUnsignedChar () const
| Returns the current value, converted to the requested type.
unsigned int | getUnsignedInt () const
| Returns the current value, converted to the requested type.
unsigned long | getUnsignedLong () const
| Returns the current value, converted to the requested type.
unsigned long long | getUnsignedLongLong () const
| Returns the current value, converted to the requested type.
unsigned short | getUnsignedShort () const
| Returns the current value, converted to the requested type.
bool | getValue (orxonox::Degree *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::Radian *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::Quaternion *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::ColourValue *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::Vector4 *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::Vector3 *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (orxonox::Vector2 *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (std::string *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (void **value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (bool *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (long double *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (double *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (float *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (unsigned long long *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (long long *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (unsigned long *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (long *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (unsigned int *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (int *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (unsigned short *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (short *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (unsigned char *value) const
| Assigns the value to the given pointer. The value gets converted if the types don't match.
bool | getValue (char *value) const
orxonox::Vector2 | getVector2 () const
| Returns the current value, converted to the requested type.
orxonox::Vector3 | getVector3 () const
| Returns the current value, converted to the requested type.
orxonox::Vector4 | getVector4 () const
| Returns the current value, converted to the requested type.
void * | getVoid () const
| Returns the current value, converted to the requested type.
bool | hasDefaultValue () const
| Checks whether the value is a default one.
void | importData (uint8_t *&mem)
| Loads the value of the MT from a bytestream (pointed at by mem) and increases mem pointer by size of MT.
template<typename T>
bool | isType () const
| Returns true if the current type is T.
bool | isType (MT_Type::Value type) const
| Returns true if the current type equals the given type.
| MultiType (MT_Type::Value type)
| Copyconstructor: Assigns value and type of the other MultiType.
| MultiType (const MultiType &other)
| Constructor: Converts the char array to a std::string, assigns the value and sets the type.
| MultiType (const char *value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Degree &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Radian &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Quaternion &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::ColourValue &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Vector4 &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Vector3 &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const orxonox::Vector2 &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const std::string &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (void *const &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const bool &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const long double &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const double &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const float &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const unsigned long long &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const long long &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const unsigned long &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const long &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const unsigned int &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const int &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const unsigned short &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const short &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const unsigned char &value)
| Constructor: Assigns the given value and sets the type.
| MultiType (const char &value)
| Default constructor: Assigns no value and no type. The type will be determined by the first assignment of a value.
| MultiType ()
| operator bool () const
| Returns the current value, converted to the requested type.
| operator char () const
| operator double () const
| Returns the current value, converted to the requested type.
| operator float () const
| Returns the current value, converted to the requested type.
| operator int () const
| Returns the current value, converted to the requested type.
| operator long () const
| Returns the current value, converted to the requested type.
| operator long double () const
| Returns the current value, converted to the requested type.
| operator long long () const
| Returns the current value, converted to the requested type.
| operator orxonox::ColourValue () const
| Returns the current value, converted to the requested type.
| operator orxonox::Degree () const
| Returns the current value, converted to the requested type.
| operator orxonox::Quaternion () const
| Returns the current value, converted to the requested type.
| operator orxonox::Radian () const
| Returns the current value, converted to the requested type.
| operator orxonox::Vector2 () const
| Returns the current value, converted to the requested type.
| operator orxonox::Vector3 () const
| Returns the current value, converted to the requested type.
| operator orxonox::Vector4 () const
| Returns the current value, converted to the requested type.
| operator short () const
| Returns the current value, converted to the requested type.
| operator std::string () const
| Returns the current value, converted to the requested type.
template<class T>
| operator T * () const
| Returns the current value, converted to a T* pointer.
| operator unsigned char () const
| Returns the current value, converted to the requested type.
| operator unsigned int () const
| Returns the current value, converted to the requested type.
| operator unsigned long () const
| Returns the current value, converted to the requested type.
| operator unsigned long long () const
| Returns the current value, converted to the requested type.
| operator unsigned short () const
| Returns the current value, converted to the requested type.
| operator void * () const
| Returns the current value, converted to the requested type.
uint8_t *& | operator<< (uint8_t *&mem)
| Saves the value of the MT to a bytestream and increases pointer to bytestream by size of MT.
const MultiType & | operator= (MT_Type::Value type)
| Assigns the value of the other MultiType and converts it to the current type of the MultiType.
const MultiType & | operator= (const MultiType &other)
| Assigns a pointer.
template<typename V>
const MultiType & | operator= (V *value)
| Assigns a new value. The value will be converted to the current type of the MultiType.
template<typename V>
const MultiType & | operator= (const V &value)
void | operator>> (uint8_t *&mem) const
| Loads the value of the MT to a bytestream and increases pointer to bytestream by size of MT.
void | reset ()
| Current content gets deleted. New type is MT_Type::Null.
void | resetValue ()
| Current content gets overridden with default zero value.
void | setType (MT_Type::Value type)
| Resets the value and changes the internal type to the type of the other MultiType.
void | setType (const MultiType &other)
| Resets the value and changes the internal type to T.
template<typename T>
void | setType ()
template<typename T, typename V>
bool | setValue (const V &value)
| Changes the type to T and assigns the new value (which might be of another type than T - it gets converted).
bool | setValue (const MultiType &other)
| Assigns the value of the other MultiType and converts it to the current type.
template<typename V>
bool | setValue (V *value)
| Assigns a pointer.
bool | setValue (const char *value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Degree &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Radian &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Quaternion &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::ColourValue &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Vector4 &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Vector3 &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const orxonox::Vector2 &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const std::string &value)
| Assigns the given value and converts it to the current type.
bool | setValue (void *const &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const bool &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const long double &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const double &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const float &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const unsigned long long &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const long long &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const unsigned long &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const long &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const unsigned int &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const int &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const unsigned short &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const short &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const unsigned char &value)
| Assigns the given value and converts it to the current type.
bool | setValue (const char &value)
| Resets the value and changes the type.
| ~MultiType ()
| Constructor: Sets the type, the next assignment will determine the value.

## Private Member Functions

bool | assignValue (const orxonox::Degree &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::Radian &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::Quaternion &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::ColourValue &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::Vector4 &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::Vector3 &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const orxonox::Vector2 &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const std::string &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (void *const &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const bool &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const long double &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const double &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const float &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const unsigned long long &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const long long &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const unsigned long &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const long &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const unsigned int &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const int &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const unsigned short &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const short &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const unsigned char &value)
| Assigns a new value by changing type and creating a new container.
bool | assignValue (const char &value)
| Returns the current value, converted to a T* pointer.
template<typename T>
void | changeValueContainer (const T &value)
| Assigns a new value by changing type and creating a new container.
template<typename T>
void | createNewValueContainer (const T &value)
| Creates a new value container (works only with specialized types).

## Private Attributes

MT_ValueBase * | value_
| A pointer to the value container.

## Friends

class | MT_Value
_UtilExport friend std::ostream & | operator<< (std::ostream &outstream, const MultiType &mt)
| Puts the MultiType on a stream by using the native << operator of the current type.

## Classes

class | MT_ValueBase
| MT_ValueBase is an almost pure virtual baseclass of MT_Value<T>, which holds the value of the MultiType. This class is only used within the MultiType. More...

## Detailed Description

The MultiType can hold a value of many possible types and convert them to other types.

The following types are supported by the MultiType:

- all primitves
- all pointers
- string
- Vector2, Vector3, Vector4
- Quaternion
- ColourValue
- Radian, Degree

The internal type of a MultiType is determined by the first assigned value, but can be changed by using setType<T>(), convert<T>() or setValue<T>(value). If a value gets assigned the normal way (operator=, setValue(value)), the value gets converted to the current internal type of the MultiType.

## Constructor & Destructor Documentation

orxonox::MultiType::MultiType | ( |  | ) | `[inline]`

orxonox::MultiType::MultiType | ( | const char & | value | ) | `[inline]`

Default constructor: Assigns no value and no type. The type will be determined by the first assignment of a value.

orxonox::MultiType::MultiType | ( | const unsigned char & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const short & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const unsigned short & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const int & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const unsigned int & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const long & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const unsigned long & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const long long & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const unsigned long long & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const float & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const double & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const long double & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const bool & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | void *const & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const std::string & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Vector2 & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Vector3 & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Vector4 & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::ColourValue & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Quaternion & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Radian & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const orxonox::Degree & | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const char * | value | ) | `[inline]`

Constructor: Assigns the given value and sets the type.

orxonox::MultiType::MultiType | ( | const MultiType & | other | ) | `[inline]`

Constructor: Converts the char array to a std::string, assigns the value and sets the type.

orxonox::MultiType::MultiType | ( | MT_Type::Value | type | ) | `[inline]`

Copyconstructor: Assigns value and type of the other MultiType.

orxonox::MultiType::~MultiType | ( |  | ) | `[inline]`

Constructor: Sets the type, the next assignment will determine the value.

Destructor: Deletes the MT_Value.

## Member Function Documentation

bool orxonox::MultiType::assignValue | ( | const orxonox::Degree & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Degree.

bool orxonox::MultiType::assignValue | ( | const orxonox::Radian & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Radian.

bool orxonox::MultiType::assignValue | ( | const orxonox::Quaternion & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Quaternion.

bool orxonox::MultiType::assignValue | ( | const orxonox::ColourValue & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::ColourValue.

bool orxonox::MultiType::assignValue | ( | const orxonox::Vector4 & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Vector4.

bool orxonox::MultiType::assignValue | ( | const orxonox::Vector3 & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Vector3.

bool orxonox::MultiType::assignValue | ( | const orxonox::Vector2 & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Vector2.

bool orxonox::MultiType::assignValue | ( | const std::string & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::String.

bool orxonox::MultiType::assignValue | ( | void *const & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::VoidPointer.

bool orxonox::MultiType::assignValue | ( | const bool & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Bool.

bool orxonox::MultiType::assignValue | ( | const long double & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::LongDouble.

bool orxonox::MultiType::assignValue | ( | const double & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Double.

bool orxonox::MultiType::assignValue | ( | const float & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Float.

bool orxonox::MultiType::assignValue | ( | const unsigned long long & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::UnsignedLongLong.

bool orxonox::MultiType::assignValue | ( | const long long & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::LongLong.

bool orxonox::MultiType::assignValue | ( | const unsigned long & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::UnsignedLong.

bool orxonox::MultiType::assignValue | ( | const long & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Long.

bool orxonox::MultiType::assignValue | ( | const unsigned int & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::UnsignedInt.

bool orxonox::MultiType::assignValue | ( | const int & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Int.

bool orxonox::MultiType::assignValue | ( | const unsigned short & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::UnsignedShort.

bool orxonox::MultiType::assignValue | ( | const short & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::Short.

bool orxonox::MultiType::assignValue | ( | const unsigned char & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

References orxonox::MT_Type::UnsignedChar.

bool orxonox::MultiType::assignValue | ( | const char & | value | ) | `[inline, private]`

Returns the current value, converted to a T* pointer.

References orxonox::MT_Type::Char.

Referenced by setValue().

template<typename T>

void orxonox::MultiType::changeValueContainer | ( | const T & | value | ) | `[inline, private]`

Assigns a new value by changing type and creating a new container.

Changes the value container.

bool orxonox::MultiType::convert | ( | MT_Type::Value | type | ) |

Converts the current value to the type of the other MultiType.

Converts the current value of the MultiType to a new type.

Parameters:

  | type | The type

References orxonox::MT_Type::Bool, orxonox::MT_Type::Char, orxonox::MT_Type::ColourValue, orxonox::MT_Type::Degree, orxonox::MT_Type::Double, orxonox::MT_Type::Float, orxonox::MT_Type::Int, orxonox::MT_Type::Long, orxonox::MT_Type::LongDouble, orxonox::MT_Type::LongLong, orxonox::MT_Type::Null, orxonox::MT_Type::Quaternion, orxonox::MT_Type::Radian, reset(), orxonox::MT_Type::Short, orxonox::MT_Type::String, orxonox::MT_Type::UnsignedChar, orxonox::MT_Type::UnsignedInt, orxonox::MT_Type::UnsignedLong, orxonox::MT_Type::UnsignedLongLong, orxonox::MT_Type::UnsignedShort, orxonox::MT_Type::Vector2, orxonox::MT_Type::Vector3, orxonox::MT_Type::Vector4, and orxonox::MT_Type::VoidPointer.

bool orxonox::MultiType::convert | ( | const MultiType & | other | ) | `[inline]`

Converts the current value to type T.

References getType().

template<typename T>

bool orxonox::MultiType::convert | ( |  | ) | `[inline]`

References orxonox::KeyCode::T.

void orxonox::MultiType::copy | ( | const MultiType & | other | ) | `[inline]`

Copies the other MultiType by assigning value and type.

References orxonox::MultiType::MT_ValueBase::clone(), and value_.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Degree & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Degree, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Radian & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Radian, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Quaternion & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Quaternion, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::ColourValue & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::ColourValue, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Vector4 & | value | ) | `[inline]`

Creates a new value container for the given type.

References value_, and orxonox::MT_Type::Vector4.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Vector3 & | value | ) | `[inline]`

Creates a new value container for the given type.

References value_, and orxonox::MT_Type::Vector3.

void orxonox::MultiType::createNewValueContainer | ( | const orxonox::Vector2 & | value | ) | `[inline]`

Creates a new value container for the given type.

References value_, and orxonox::MT_Type::Vector2.

void orxonox::MultiType::createNewValueContainer | ( | const std::string & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::String, and value_.

void orxonox::MultiType::createNewValueContainer | ( | void *const & | value | ) | `[inline]`

Creates a new value container for the given type.

References value_, and orxonox::MT_Type::VoidPointer.

void orxonox::MultiType::createNewValueContainer | ( | const bool & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Bool, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const long double & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::LongDouble, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const double & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Double, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const float & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Float, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const unsigned long long & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::UnsignedLongLong, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const long long & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::LongLong, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const unsigned long & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::UnsignedLong, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const long & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Long, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const unsigned int & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::UnsignedInt, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const int & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Int, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const unsigned short & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::UnsignedShort, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const short & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::Short, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const unsigned char & | value | ) | `[inline]`

Creates a new value container for the given type.

References orxonox::MT_Type::UnsignedChar, and value_.

void orxonox::MultiType::createNewValueContainer | ( | const char & | value | ) | `[inline]`

Returns the current value, converted to the requested type.

Converts the current value to the given type.

References orxonox::MT_Type::Char, and value_.

template<typename T>

void orxonox::MultiType::createNewValueContainer | ( | const T & | value | ) | `[inline, private]`

Creates a new value container (works only with specialized types).

void orxonox::MultiType::exportData | ( | uint8_t *& | mem | ) | const`[inline]`

Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT.

Referenced by orxonox::packet::FunctionCalls::addCallMember(), and orxonox::packet::FunctionCalls::addCallStatic().

bool orxonox::MultiType::getBool | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

char orxonox::MultiType::getChar | ( |  | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

orxonox::ColourValue orxonox::MultiType::getColourValue | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::ColourValue.

orxonox::Degree orxonox::MultiType::getDegree | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Degree.

double orxonox::MultiType::getDouble | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

float orxonox::MultiType::getFloat | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

int orxonox::MultiType::getInt | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

long orxonox::MultiType::getLong | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

long double orxonox::MultiType::getLongDouble | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

long long orxonox::MultiType::getLongLong | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

uint32_t orxonox::MultiType::getNetworkSize | ( |  | ) | const`[inline]`

Referenced by orxonox::packet::FunctionCalls::addCallMember(), and orxonox::packet::FunctionCalls::addCallStatic().

template<typename T>

T* orxonox::MultiType::getPointer | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::KeyCode::T.

orxonox::Quaternion orxonox::MultiType::getQuaternion | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Quaternion.

orxonox::Radian orxonox::MultiType::getRadian | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Radian.

short orxonox::MultiType::getShort | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

std::string orxonox::MultiType::getString | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

Referenced by orxonox::CommandEvaluation::dump(), orxonox::TclThreadManager::evalQuery(), orxonox::CommandExecutor::getReturnValueString(), orxonox::ConfigValueContainer::initValue(), and orxonox::TclBind::tcl_query().

MT_Type::Value orxonox::MultiType::getType | ( |  | ) | const`[inline]`

Resets the value and changes the internal type to the given type.

Returns the current type.

References orxonox::MT_Type::Null.

Referenced by convert(), orxonox::CommandLineArgument::parse(), and setType().

std::string orxonox::MultiType::getTypename | ( |  | ) | const

Returns the name of the current type.

Returns:
  The name

References orxonox::MT_Type::Bool, orxonox::MT_Type::Char, orxonox::MT_Type::ColourValue, orxonox::MT_Type::Degree, orxonox::MT_Type::Double, orxonox::MT_Type::Float, orxonox::MT_Type::Int, orxonox::MT_Type::Long, orxonox::MT_Type::LongDouble, orxonox::MT_Type::LongLong, orxonox::MT_Type::Null, orxonox::MT_Type::Quaternion, orxonox::MT_Type::Radian, orxonox::MT_Type::Short, orxonox::MT_Type::String, orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedChar, orxonox::MT_Type::UnsignedInt, orxonox::MT_Type::UnsignedLong, orxonox::MT_Type::UnsignedLongLong, orxonox::MT_Type::UnsignedShort, value_, orxonox::MT_Type::Vector2, orxonox::MT_Type::Vector3, orxonox::MT_Type::Vector4, and orxonox::MT_Type::VoidPointer.

unsigned char orxonox::MultiType::getUnsignedChar | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

unsigned int orxonox::MultiType::getUnsignedInt | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

unsigned long orxonox::MultiType::getUnsignedLong | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

unsigned long long orxonox::MultiType::getUnsignedLongLong | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

unsigned short orxonox::MultiType::getUnsignedShort | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

bool orxonox::MultiType::getValue | ( | orxonox::Degree * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::Radian * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::Quaternion * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::ColourValue * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::Vector4 * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::Vector3 * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | orxonox::Vector2 * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | std::string * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | void ** | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | bool * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | long double * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | double * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | float * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | unsigned long long * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | long long * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | unsigned long * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | long * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | unsigned int * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | int * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | unsigned short * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | short * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | unsigned char * | value | ) | const`[inline]`

Assigns the value to the given pointer. The value gets converted if the types don't match.

bool orxonox::MultiType::getValue | ( | char * | value | ) | const`[inline]`

orxonox::Vector2 orxonox::MultiType::getVector2 | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Vector2.

orxonox::Vector3 orxonox::MultiType::getVector3 | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Vector3.

orxonox::Vector4 orxonox::MultiType::getVector4 | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Vector4.

void* orxonox::MultiType::getVoid | ( |  | ) | const`[inline]`

Returns the current value, converted to the requested type.

bool orxonox::MultiType::hasDefaultValue | ( |  | ) | const`[inline]`

Checks whether the value is a default one.

void orxonox::MultiType::importData | ( | uint8_t *& | mem | ) | `[inline]`

Loads the value of the MT from a bytestream (pointed at by mem) and increases mem pointer by size of MT.

Referenced by orxonox::packet::FunctionCalls::process().

bool orxonox::MultiType::isType< void * > | ( |  | ) | const`[inline]`

Returns true if the current type is T.

Returns true if the current type equals the given type.

bool orxonox::MultiType::isType | ( | MT_Type::Value | type | ) | const`[inline]`

Returns true if the current type equals the given type.

References orxonox::MT_Type::Null.

Referenced by orxonox::ConfigValueContainer::initVector(), orxonox::ConfigValueContainer::remove(), orxonox::ConfigValueContainer::set(), and orxonox::ConfigValueContainer::update().

orxonox::MultiType::operator bool | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Bool, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator char | ( |  | ) | const

References orxonox::MT_Type::Char, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator double | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Double, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator float | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Float, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator int | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Int, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator long | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Long, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator long double | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::LongDouble, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator long long | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::LongLong, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator orxonox::ColourValue | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::ColourValue, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator orxonox::Degree | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Degree, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator orxonox::Quaternion | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Quaternion, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator orxonox::Radian | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Radian, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator orxonox::Vector2 | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, value_, and orxonox::MT_Type::Vector2.

orxonox::MultiType::operator orxonox::Vector3 | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, value_, and orxonox::MT_Type::Vector3.

orxonox::MultiType::operator orxonox::Vector4 | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, value_, and orxonox::MT_Type::Vector4.

orxonox::MultiType::operator short | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::Short, orxonox::MultiType::MT_ValueBase::type_, and value_.

orxonox::MultiType::operator std::string | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MT_Type::String, orxonox::MultiType::MT_ValueBase::type_, and value_.

template<class T>

orxonox::MultiType::operator T * | ( |  | ) | const`[inline]`

Returns the current value, converted to a T* pointer.

orxonox::MultiType::operator unsigned char | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedChar, and value_.

orxonox::MultiType::operator unsigned int | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedInt, and value_.

orxonox::MultiType::operator unsigned long | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedLong, and value_.

orxonox::MultiType::operator unsigned long long | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedLongLong, and value_.

orxonox::MultiType::operator unsigned short | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, orxonox::MT_Type::UnsignedShort, and value_.

orxonox::MultiType::operator void * | ( |  | ) | const

Returns the current value, converted to the requested type.

References orxonox::MultiType::MT_ValueBase::type_, value_, and orxonox::MT_Type::VoidPointer.

uint8_t*& orxonox::MultiType::operator<< | ( | uint8_t *& | mem | ) | `[inline]`

Saves the value of the MT to a bytestream and increases pointer to bytestream by size of MT.

const MultiType& orxonox::MultiType::operator= | ( | MT_Type::Value | type | ) | `[inline]`

Assigns the value of the other MultiType and converts it to the current type of the MultiType.

const MultiType& orxonox::MultiType::operator= | ( | const MultiType & | other | ) | `[inline]`

Assigns a pointer.

template<typename V>

const MultiType& orxonox::MultiType::operator= | ( | V * | value | ) | `[inline]`

Assigns a new value. The value will be converted to the current type of the MultiType.

template<typename V>

const MultiType& orxonox::MultiType::operator= | ( | const V & | value | ) | `[inline]`

void orxonox::MultiType::operator>> | ( | uint8_t *& | mem | ) | const`[inline]`

Loads the value of the MT to a bytestream and increases pointer to bytestream by size of MT.

void orxonox::MultiType::reset | ( |  | ) | `[inline]`

Current content gets deleted. New type is MT_Type::Null.

Referenced by convert().

void orxonox::MultiType::resetValue | ( |  | ) | `[inline]`

Current content gets overridden with default zero value.

void orxonox::MultiType::setType | ( | MT_Type::Value | type | ) | `[inline]`

Resets the value and changes the internal type to the type of the other MultiType.

void orxonox::MultiType::setType | ( | const MultiType & | other | ) | `[inline]`

Resets the value and changes the internal type to T.

References getType().

template<typename T>

void orxonox::MultiType::setType | ( |  | ) | `[inline]`

template<typename T, typename V>

bool orxonox::MultiType::setValue | ( | const V & | value | ) | `[inline]`

Changes the type to T and assigns the new value (which might be of another type than T - it gets converted).

bool orxonox::MultiType::setValue | ( | const MultiType & | other | ) | `[inline]`

Assigns the value of the other MultiType and converts it to the current type.

References orxonox::MultiType::MT_ValueBase::clone(), and value_.

template<typename V>

bool orxonox::MultiType::setValue | ( | V * | value | ) | `[inline]`

Assigns a pointer.

bool orxonox::MultiType::setValue | ( | const char * | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Degree & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Radian & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Quaternion & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::ColourValue & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Vector4 & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Vector3 & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const orxonox::Vector2 & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const std::string & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | void *const & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const bool & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const long double & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const double & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const float & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const unsigned long long & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const long long & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const unsigned long & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const long & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const unsigned int & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const int & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const unsigned short & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const short & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const unsigned char & | value | ) | `[inline]`

Assigns the given value and converts it to the current type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

bool orxonox::MultiType::setValue | ( | const char & | value | ) | `[inline]`

Resets the value and changes the type.

References assignValue(), orxonox::MultiType::MT_ValueBase::setValue(), and value_.

Referenced by orxonox::CommandLineArgument::parse().

## Friends And Related Function Documentation

friend class MT_Value`[friend]`

_UtilExport friend std::ostream& operator<< | ( | std::ostream & | outstream,
|  | const MultiType & | mt |
| ) |  |  | `[friend]`

Puts the MultiType on a stream by using the native << operator of the current type.

## Member Data Documentation

MT_ValueBase* orxonox::MultiType::value_`[private]`

A pointer to the value container.

Referenced by orxonox::MT_Value< T >::assimilate(), copy(), createNewValueContainer(), getTypename(), operator bool(), operator char(), operator double(), operator float(), operator int(), operator long(), operator long double(), operator long long(), operator orxonox::ColourValue(), operator orxonox::Degree(), operator orxonox::Quaternion(), operator orxonox::Radian(), operator orxonox::Vector2(), operator orxonox::Vector3(), operator orxonox::Vector4(), operator short(), operator std::string(), operator unsigned char(), operator unsigned int(), operator unsigned long(), operator unsigned long long(), operator unsigned short(), operator void *(), orxonox::operator<<(), and setValue().

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

- src/util/MultiType.h
- src/util/MultiType.cc