Property

class Property

This class holds the data used in properties by the Atom and the Frame classes. A property can have various types: bool, double, string or Vector3D.

Public Types

enum Kind

Possible types holded by a property.

Values:

BOOL = 0
DOUBLE = 1
STRING = 2
VECTOR3D = 3

Public Functions

Property(bool value)

Create a property holding a boolean value.

Property(double value)

Create a property holding a double value.

Property(Vector3D value)

Create a property holding a Vector3D value.

Property(std::string value)

Create a property holding a string value.

Property(const char *value)

Create a property holding a string value from a const char*.

Property(int value)

Create a property holding a double value from an int.

Property(long value)

Create a property holding a double value from a long.

Property(long long value)

Create a property holding a double value from a long long.

Property(unsigned value)

Create a property holding a double value from an unsigned.

Property(unsigned long value)

Create a property holding a double value from an unsigned long.

Property(unsigned long long value)

Create a property holding a double value from an unsigned long long.

Kind kind() const

Get the kind of property, i.e. the type of the holded value

bool as_bool() const

Get the boolean value stored in this Property

Exceptions

double as_double() const

Get the double value stored in this Property

Exceptions

Vector3D as_vector3d() const

Get the Vector3D value stored in this Property

Exceptions

const std::string &as_string() const

Get the string value stored in this Property

Exceptions

Public Static Functions

static std::string kind_as_string(Kind kind)

Get the given kind name as a string.