6#ifndef ACTIVE_SETTING_VALUE
7#define ACTIVE_SETTING_VALUE
9#include "Active/Utility/Cloner.h"
10#include "Active/Utility/Guid.h"
11#include "Active/Utility/String.h"
12#include "Active/Utility/Time.h"
37 using Unique = std::unique_ptr<Value>;
39 using Shared = std::shared_ptr<Value>;
189 virtual operator bool()
const = 0;
194 virtual operator int32_t()
const = 0;
199 virtual operator uint32_t()
const = 0;
204 virtual operator int64_t()
const = 0;
209 virtual operator double()
const = 0;
259 return (!lhs || !rhs) ? !(!lhs ^ !rhs) : lhs->operator==(*rhs);
269 return !(lhs == rhs);
279 return (!lhs || !rhs) ? (!lhs && rhs) : lhs->operator<(*rhs);
289 return (!lhs || !rhs) ? !(!lhs ^ !rhs) : lhs->operator==(*rhs);
299 return !(lhs == rhs);
309 return (!lhs || !rhs) ? (!lhs && rhs) : lhs->operator<(*rhs);
Status
The value status (defines whether a value has been explicitly set and (if so) if it's meaningful.
Definition Value.h:44
static std::optional< Type > typeFromName(const utility::String &text)
Definition Value.cpp:36
virtual Value & operator=(bool val)=0
Type
Supported value types (broad groups, e.g. int32_t and int64_t are both intType)
Definition Value.h:51
virtual Value & operator=(int64_t val)=0
virtual Value & operator=(const Value &val)=0
virtual Value & operator=(double val)=0
static utility::String nameForType(Type type)
Definition Value.cpp:51
std::unique_ptr< Value > Unique
Unique pointer.
Definition Value.h:37
Value(Status stat=good)
Definition Value.h:85
virtual Type getType() const =0
virtual Value & operator=(const char *val)
Definition Value.h:169
virtual Value & operator=(const active::utility::Guid &val)=0
Status status
The value status.
Definition Value.h:100
std::shared_ptr< Value > Shared
Shared pointer.
Definition Value.h:39
virtual Value & operator=(uint32_t val)=0
virtual Value & operator=(const active::utility::Time &val)=0
virtual Value & operator=(const active::utility::String &val)=0
virtual bool operator<(const Value &ref) const =0
bool operator!=(const Value &ref) const
Definition Value.h:115
virtual Value & operator=(int32_t val)=0
virtual bool operator==(const Value &ref) const =0
virtual bool isGood() const
Definition Value.h:232
virtual Value * clonePtr() const override=0
virtual void setDefault()=0
std::optional< Value > Option
Optional.
Definition Value.h:41
virtual bool isNull() const =0
A Unicode-aware string class.
Definition String.h:51
A class to represent a date/time.
Definition Time.h:19
Definition Transportable.h:13
bool operator==(const Value::Unique &lhs, const Value::Unique &rhs)
Definition Value.h:258
bool operator<(const Value::Unique &lhs, const Value::Unique &rhs)
Definition Value.h:278
bool operator!=(const Value::Unique &lhs, const Value::Unique &rhs)
Definition Value.h:268