6 #ifndef TAPKEE_VALUE_KEEPER_H_
7 #define TAPKEE_VALUE_KEEPER_H_
15 namespace tapkee_internal
65 if (isTypeCorrect<T>())
68 v =
reinterpret_cast<T*
>(vv);
78 return getPolicy<T>() ==
policy;
83 return getPolicy<EmptyType>() !=
policy;
87 inline bool inRange(T lower, T upper)
const
90 throw std::domain_error(
"Wrong range bounds type");
95 inline bool equal(T value)
const
98 throw std::domain_error(
"Wrong equality value type");
102 template <
typename T>
106 throw std::domain_error(
"Wrong non-equality value type");
130 template <
typename T>
134 throw std::domain_error(
"Wrong greater check bound type");
138 template <
typename T>
142 throw std::domain_error(
"Wrong lesser check bound type");
virtual bool isLesser(void *const *, void *) const =0
bool isTypeCorrect() const
CheckerPolicyBase * checker
virtual void free(void **) const =0
virtual void * getValue(void **) const =0
bool isInitialized() const
An exception type that is thrown in case of missed parameter, i.e. when some required parameter is no...
TypePolicyBase * getPolicy()
virtual bool isNegative(void *const *) const =0
An exception type that is thrown in case if wrong parameter value is passed.
bool notEqual(T value) const
ValueKeeper(const T &value)
ValueKeeper(const ValueKeeper &v)
virtual bool isNotEqual(void *const *, void *) const =0
virtual bool isNonPositive(void *const *) const =0
virtual void clone(void *const *, void **) const =0
virtual void copyFromValue(void const *, void **) const =0
virtual bool isNonNegative(void *const *) const =0
virtual bool isPositive(void *const *) const =0
bool lesser(T upper) const
bool inRange(T lower, T upper) const
bool equal(T value) const
ValueKeeper & operator=(const ValueKeeper &v)
virtual bool isInRange(void *const *, void *, void *) const =0
CheckerPolicyBase * getCheckerPolicy()
bool greater(T lower) const
virtual bool isEqual(void *const *, void *) const =0
virtual bool isGreater(void *const *, void *) const =0