OSSIA
Open Scenario System for Interactive Application
opp::value Class Reference

The value class holds all ossia parameters typed values. More...

Detailed Description

The value class holds all ossia parameters typed values.

See also
ossia::value

The value class holds all ossia parameters typed values

See also
ossia::value

Classes

struct  impulse
 
struct  vec2f
 container for a vector of 2 floats More...
 
struct  vec3f
 container for a vector of 3 floats More...
 
struct  vec4f
 container for a vector of 4 floats More...
 

Public Member Functions

 value ()
 Value default constructors - creates an empty value.
 
 ~value ()
 Value destructor.
 
 value (const value &v)
 Copy constructor of a value. More...
 
 value (char v)
 Create a value of type char. More...
 
 value (int v)
 Create a value of type int. More...
 
 value (bool v)
 Create a value of type bool. More...
 
 value (float v)
 Create a value of type float. More...
 
 value (double v)
 Create a value of type double. More...
 
 value (const vec2f)
 Create a value of type vec2f. More...
 
 value (const vec3f)
 Create a value of type vec3f. More...
 
 value (const vec4f)
 Create a value of type vec4f. More...
 
 value (std::vector< opp::value > v)
 Create a value of type list (vector of values) More...
 
 value (std::string v)
 Create a value of type std::string. More...
 
 value (const char *v)
 Create a value of type string (char*) More...
 
 value (impulse p)
 Create a value of type impulse. More...
 
bool is_impulse () const
 Is the value of type impulse ? More...
 
bool is_int () const
 Is the value of type int ? More...
 
bool is_float () const
 Is the value of type float? More...
 
bool is_bool () const
 Is the value of type boolean ? More...
 
bool is_vec2f () const
 Is the value of type vec2f ? More...
 
bool is_vec3f () const
 Is the value of type vec3f ? More...
 
bool is_vec4f () const
 Is the value of type vec4f ? More...
 
bool is_list () const
 Is the value of type list? More...
 
bool is_string () const
 Is the value of type string? More...
 
char to_char () const
 converts the value to a 8-bit character More...
 
int to_int () const
 converts the value to an int More...
 
float to_float () const
 converts the value to a float More...
 
bool to_bool () const
 converts the value to a boolean More...
 
vec2f to_vec2f () const
 converts the value to a vec2f More...
 
vec3f to_vec3f () const
 converts the value to a vec3f More...
 
vec4f to_vec4f () const
 converts the value to a vec4f More...
 
std::vector< opp::valueto_list () const
 converts the value to a list (vector of opp::value) More...
 
std::string to_string () const
 converts the value to a string More...
 
valueoperator= (const value &v)
 operator = assigns with another opp::value More...
 
valueoperator= (char v)
 operator = assigns with a character More...
 
valueoperator= (int v)
 operator = assigns with an integer More...
 
valueoperator= (float v)
 operator = assigns with a float More...
 
valueoperator= (bool v)
 operator = assigns with a bool More...
 
valueoperator= (vec2f v)
 operator = assigns with a vec2f More...
 
valueoperator= (vec3f v)
 operator = assigns with a vec3f More...
 
valueoperator= (vec4f v)
 operator = assigns with a vec4f More...
 
valueoperator= (std::vector< opp::value > v)
 operator = assigns with a vector of values (aka list) More...
 
valueoperator= (std::string v)
 operator = assigns with a string More...
 
bool operator== (const opp::value &v) const
 operator == compare two opp::value More...
 
bool operator!= (const opp::value &v) const
 operator != compare two opp::value More...
 
void set_impulse ()
 sets the value as an impulse (a value-less signal)
 
void set_int (int v)
 sets the value as an int More...
 
void set_float (float v)
 sets the value as a float More...
 
void set_bool (bool v)
 sets the value as a bool More...
 
void set_vec2f (vec2f v)
 sets the value as a vec2f More...
 
void set_vec3f (vec3f v)
 sets the value as a vec3f More...
 
void set_vec4f (vec4f v)
 sets the value as a vec4f More...
 
void set_list (std::vector< opp::value > v)
 sets the value as a vector of opp::values More...
 
void set_string (std::string v)
 sets the value as a string More...
 
ossia::valueget_raw_value_pointer ()
 Get the raw value pointer. More...
 

Constructor & Destructor Documentation

◆ value() [1/13]

opp::value::value ( const value v)

Copy constructor of a value.

Parameters
referenceto another value

◆ value() [2/13]

opp::value::value ( char  v)

Create a value of type char.

Parameters
achar
See also
ossia::value

◆ value() [3/13]

opp::value::value ( int  v)

Create a value of type int.

Parameters
anint
See also
ossia::value

◆ value() [4/13]

opp::value::value ( bool  v)

Create a value of type bool.

See also
ossia::value

◆ value() [5/13]

opp::value::value ( float  v)

Create a value of type float.

See also
ossia::value

◆ value() [6/13]

opp::value::value ( double  v)

Create a value of type double.

See also
ossia::value

◆ value() [7/13]

opp::value::value ( const vec2f  v)

Create a value of type vec2f.

See also
ossia::value

◆ value() [8/13]

opp::value::value ( const vec3f  v)

Create a value of type vec3f.

See also
ossia::value

◆ value() [9/13]

opp::value::value ( const vec4f  v)

Create a value of type vec4f.

See also
ossia::value

◆ value() [10/13]

opp::value::value ( std::vector< opp::value v)

Create a value of type list (vector of values)

See also
ossia::value

◆ value() [11/13]

opp::value::value ( std::string  v)

Create a value of type std::string.

See also
ossia::value

◆ value() [12/13]

opp::value::value ( const char *  v)

Create a value of type string (char*)

See also
ossia::value

◆ value() [13/13]

opp::value::value ( impulse  p)

Create a value of type impulse.

See also
ossia::value

Member Function Documentation

◆ is_impulse()

bool opp::value::is_impulse ( ) const

Is the value of type impulse ?

Returns
True if the value is an impulse, false, otherwise

◆ is_int()

bool opp::value::is_int ( ) const

Is the value of type int ?

Returns
True if the value is an int, false, otherwise

◆ is_float()

bool opp::value::is_float ( ) const

Is the value of type float?

Returns
True if the value is a float, false, otherwise

◆ is_bool()

bool opp::value::is_bool ( ) const

Is the value of type boolean ?

Returns
True if the value is a boolean, false, otherwise

◆ is_vec2f()

bool opp::value::is_vec2f ( ) const

Is the value of type vec2f ?

Returns
True if the value is a vec2f, false, otherwise

◆ is_vec3f()

bool opp::value::is_vec3f ( ) const

Is the value of type vec3f ?

Returns
True if the value is a vec3f, false, otherwise

◆ is_vec4f()

bool opp::value::is_vec4f ( ) const

Is the value of type vec4f ?

Returns
True if the value is a vec4f, false, otherwise

◆ is_list()

bool opp::value::is_list ( ) const

Is the value of type list?

Returns
True if the value is a list, false, otherwise

◆ is_string()

bool opp::value::is_string ( ) const

Is the value of type string?

Returns
True if the value is a string, false, otherwise

◆ to_char()

char opp::value::to_char ( ) const

converts the value to a 8-bit character

Returns
value converted to char

◆ to_int()

int opp::value::to_int ( ) const

converts the value to an int

Returns
value converted to int

◆ to_float()

float opp::value::to_float ( ) const

converts the value to a float

Returns
value converted to float

◆ to_bool()

bool opp::value::to_bool ( ) const

converts the value to a boolean

Returns
value converted to boolean

◆ to_vec2f()

value::vec2f opp::value::to_vec2f ( ) const

converts the value to a vec2f

Returns
value converted to vec2f

◆ to_vec3f()

value::vec3f opp::value::to_vec3f ( ) const

converts the value to a vec3f

Returns
value converted to vec3f

◆ to_vec4f()

value::vec4f opp::value::to_vec4f ( ) const

converts the value to a vec4f

Returns
value converted to vec4f

◆ to_list()

std::vector< value > opp::value::to_list ( ) const

converts the value to a list (vector of opp::value)

Returns
value converted to list (vector of opp::value)

◆ to_string()

std::string opp::value::to_string ( ) const

converts the value to a string

Returns
value converted to std::string

◆ operator=() [1/10]

value & opp::value::operator= ( const value v)

operator = assigns with another opp::value

Parameters
v: an opp::value
Returns
the reference to this value object

◆ operator=() [2/10]

value & opp::value::operator= ( char  v)

operator = assigns with a character

Parameters
v: a char
Returns
the reference to this value object

◆ operator=() [3/10]

value & opp::value::operator= ( int  v)

operator = assigns with an integer

Parameters
v: an int
Returns
the reference to this value object

◆ operator=() [4/10]

value & opp::value::operator= ( float  v)

operator = assigns with a float

Parameters
v: a float
Returns
the reference to this value object

◆ operator=() [5/10]

value & opp::value::operator= ( bool  v)

operator = assigns with a bool

Parameters
v: a bool
Returns
the reference to this value object

◆ operator=() [6/10]

value & opp::value::operator= ( vec2f  v)

operator = assigns with a vec2f

Parameters
v: a vec2f
Returns
the reference to this value object

◆ operator=() [7/10]

value & opp::value::operator= ( vec3f  v)

operator = assigns with a vec3f

Parameters
v: a vec3f
Returns
the reference to this value object

◆ operator=() [8/10]

value & opp::value::operator= ( vec4f  v)

operator = assigns with a vec4f

Parameters
v: a vec4f
Returns
the reference to this value object

◆ operator=() [9/10]

value & opp::value::operator= ( std::vector< opp::value v)

operator = assigns with a vector of values (aka list)

Parameters
v: a vector of values (aka list)
Returns
the reference to this value object

◆ operator=() [10/10]

value & opp::value::operator= ( std::string  v)

operator = assigns with a string

Parameters
v: a string
Returns
the reference to this value object

◆ operator==()

bool opp::value::operator== ( const opp::value v) const

operator == compare two opp::value

Parameters
v: another opp::value
Returns
bool if both are same type and equal (or each member pair is equal)

◆ operator!=()

bool opp::value::operator!= ( const opp::value v) const

operator != compare two opp::value

Parameters
v: another opp::value
Returns
bool if both are same type and equal (or each member pair is equal)

◆ set_int()

void opp::value::set_int ( int  v)

sets the value as an int

Parameters
vint is moved into the value object

◆ set_float()

void opp::value::set_float ( float  v)

sets the value as a float

Parameters
vfloat is moved into the value object

◆ set_bool()

void opp::value::set_bool ( bool  v)

sets the value as a bool

Parameters
vbool is moved into the value object

◆ set_vec2f()

void opp::value::set_vec2f ( vec2f  v)

sets the value as a vec2f

Parameters
vvec2f is moved into the value object

◆ set_vec3f()

void opp::value::set_vec3f ( vec3f  v)

sets the value as a vec3f

Parameters
vvec3f is moved into the value object

◆ set_vec4f()

void opp::value::set_vec4f ( vec4f  v)

sets the value as a vec4f

Parameters
vvec4f is moved into the value object

◆ set_list()

void opp::value::set_list ( std::vector< opp::value v)

sets the value as a vector of opp::values

Parameters
vvector of opp::values is moved into the value object

◆ set_string()

void opp::value::set_string ( std::string  v)

sets the value as a string

Parameters
vstring is moved into the value object

◆ get_raw_value_pointer()

ossia::value* opp::value::get_raw_value_pointer ( )
inline

Get the raw value pointer.

Be careful, this gives you great power and with great power comes... It's useful to make use of ossia feature that are not available in opp:: namespace (but requires some more computer skill)