28 #include "../error/exceptions.hpp"
29 #include "../types/types.hpp"
30 #include "value_holder.hpp"
95 return get_value<T,S>(get_holder_ptr<ref_type<S>>(
_ptr));
117 return set_value<S,T>(get_holder_ptr<ref_type<S>>(
_ptr),v);
207 operator value ()
const;
225 template<
typename T> T
as()
const;
268 "The reference points to an object of unkown type!");
301 "The reference points to an object of unknown type!");
32Bit IEEE floating point
exception record
Definition: exceptions.hpp:90
#define EXCEPTION_RECORD
macro creating an instance of ExceptionRecord
Definition: exceptions.hpp:48
T _get() const
return value
Definition: value_ref.hpp:93
data type error
Definition: exceptions.hpp:544
void _set(const T &v) const
set value
Definition: value_ref.hpp:115
128Bit IEEE floating point complex
64Bit IEEE floating point
std::unique_ptr< value_holder_interface > pointer_type
internal pointer type used to hold the reference instance
Definition: value_ref.hpp:47
Definition: add_op.hpp:29
void _check_pointer(const exception_record &r) const
throw exception
implementation of the holder interface
Definition: value_holder.hpp:174
32Bit IEEE floating point complex
128Bit IEEE floating point
value_ref(std::reference_wrapper< T > v)
template constructor from value
Definition: value_ref.hpp:144
pointer_type _ptr
pointer holding the value stored
Definition: value_ref.hpp:121
type_id_t type_id() const
get type id
type_id_t
type codes for PNI data types
Definition: types/types.hpp:148
value_ref & operator=(const T &v)
assign value to the variable
Definition: value_ref.hpp:274
64Bit IEEE floating point complex
type erasure for references to POD data
Definition: value_ref.hpp:43
type erasure for POD data
Definition: value.hpp:46
void _check_type(type_id_t tid, const exception_record &r) const
check type
value_ref()
default constructor
value to_value(const value_ref &v)
conversion function to value
T as() const
get the referenced value
Definition: value_ref.hpp:241