28 #include "../types/types.hpp"
29 #include "../types/convert.hpp"
30 #include "../types/type_conversion.hpp"
31 #include "../types/traits.hpp"
32 #include "value_holder.hpp"
59 bool convertible=
false
77 static target_type
convert(
const source_type &)
120 static target_type
convert(
const source_type &v)
122 return pni::core::convert<target_type>(v);
131 using strategy = value_converter<TT,ST,convertible<ST,TT>::value>;
142 template<
typename T>
using ref_type = std::reference_wrapper<T>;
169 return dynamic_cast<holder_type*
>(ptr.get());
void set_value(PTR holder_ptr, const T &v)
set value to holder
Definition: utils.hpp:226
#define EXCEPTION_RECORD
macro creating an instance of ExceptionRecord
Definition: exceptions.hpp:48
data type error
Definition: exceptions.hpp:544
ST source_type
source type alias
Definition: utils.hpp:106
TT target_type
target type alias
Definition: utils.hpp:64
static target_type convert(const source_type &)
static conversion function
Definition: utils.hpp:77
Definition: add_op.hpp:29
TT target_type
target type alias
Definition: utils.hpp:104
implementation of the holder interface
Definition: value_holder.hpp:174
T get_value(PTR holder_ptr)
get value from holder
Definition: utils.hpp:196
T convert(const S &source)
type conversion function template
Definition: convert.hpp:272
static target_type convert(const source_type &v)
conversion function
Definition: utils.hpp:120
converter class
Definition: utils.hpp:61
value_holder< T > * get_holder_ptr(PTR &ptr)
get pointer to value holder
Definition: utils.hpp:165
ST source_type
source type alias
Definition: utils.hpp:66