class Core::Portable::Value

Container type for different types of values.

#include <corevalues.h>

class Value
{
public:
    // enums

    enum Type;

    // unions

    union Data;

    // construction

    Value();
    Value(bool value);
    Value(int value);
    Value(float value);
    Value(const Value& other);

    // methods

    Type getType() const;
    bool asBool() const;
    int asInt() const;
    float asFloat() const;
    Value& operator = (const Value& rhs);
    Value& operator = (bool value);
    Value& operator = (int value);
    Value& operator = (float value);
    bool operator == (const Value& rhs) const;
    bool operator != (const Value& rhs) const;
};