#include <val.hpp>
Public Member Functions | |
val () | |
Create an empty val. | |
template<typename ValT> | |
val (ValT *value, ownership_type_nocopy ownership_type) | |
template<typename ValT> | |
val (const ValT *value, ownership_type_nocopy ownership_type) | |
template<typename ValT> | |
val (const boost::shared_ptr< ValT > &value, ownership_type_shared_ptr) | |
template<typename ValT> | |
val (const boost::shared_ptr< const ValT > &value, ownership_type_shared_ptr) | |
template<typename ValT> | |
val (const boost::shared_array< ValT > &value, ownership_type_shared_array) | |
template<typename ValT> | |
val (const boost::shared_array< const ValT > &value, ownership_type_shared_array) | |
template<typename ValT> | |
val (ValT &value, ownership_type_copy) | |
template<typename ValT> | |
val (const ValT &value, ownership_type_copy) | |
val (const val &other) | |
void | swap (val &other) |
val & | operator= (val rhs) |
bool | empty () const |
bool | will_copy_deeply () const |
bool | is_const () const |
large_int | coerce_int () const |
double | coerce_double () const |
std::string | coerce_string () const |
const std::type_info & | type () const |
bool | points_to_same_object_as (const val &rhs) const |
Returns true only if (but not necessarily if) this wraps the same instance as rhs . | |
~val () | |
Private Attributes | |
const storage_base_common * | _store |
Friends | |
template<typename ValT> | |
ValT * | val_cast_ptr_helper (const val &v, const boost::true_type &) |
ValT will be a const type (indicated by 2nd argument). | |
template<typename ValT> | |
ValT * | val_cast_ptr_helper (const val &v, const boost::false_type &) |
ValT will not be a const type (indicated by 2nd argument). |
eval::detail::val::val | ( | ) | [inline] |
Create an empty val.
eval::detail::val::val | ( | ValT * | value, | |
ownership_type_nocopy | ownership_type | |||
) | [inline] |
eval::detail::val::val | ( | const ValT * | value, | |
ownership_type_nocopy | ownership_type | |||
) | [inline] |
eval::detail::val::val | ( | const boost::shared_ptr< ValT > & | value, | |
ownership_type_shared_ptr | ||||
) | [inline] |
eval::detail::val::val | ( | const boost::shared_ptr< const ValT > & | value, | |
ownership_type_shared_ptr | ||||
) | [inline] |
eval::detail::val::val | ( | const boost::shared_array< ValT > & | value, | |
ownership_type_shared_array | ||||
) | [inline] |
eval::detail::val::val | ( | const boost::shared_array< const ValT > & | value, | |
ownership_type_shared_array | ||||
) | [inline] |
eval::detail::val::val | ( | ValT & | value, | |
ownership_type_copy | ||||
) | [inline] |
eval::detail::val::val | ( | const ValT & | value, | |
ownership_type_copy | ||||
) | [inline] |
eval::detail::val::val | ( | const val & | other | ) | [inline] |
Either a shallow or deep copy will be made, depending on the constructor used to create other
.
eval::detail::val::~val | ( | ) | [inline] |
void eval::detail::val::swap | ( | val & | other | ) | [inline] |
Either a shallow or deep copy will be made, depending on the constructor used to create rhs
.
bool eval::detail::val::empty | ( | ) | const [inline] |
bool eval::detail::val::will_copy_deeply | ( | ) | const [inline] |
bool eval::detail::val::is_const | ( | ) | const [inline] |
large_int eval::detail::val::coerce_int | ( | ) | const [inline] |
empty_exception | if this is empty | |
overflow_exception | on underflow or overflow | |
non_numeric_exception | if conversion not possible |
double eval::detail::val::coerce_double | ( | ) | const [inline] |
empty_exception | if this is empty | |
overflow_exception | on underflow or overflow | |
non_numeric_exception | if conversion not possible |
std::string eval::detail::val::coerce_string | ( | ) | const [inline] |
empty_exception | if this is empty | |
non_ostreamable_exception | if conversion not possible |
const std::type_info& eval::detail::val::type | ( | ) | const [inline] |
bool eval::detail::val::points_to_same_object_as | ( | const val & | rhs | ) | const [inline] |
Returns true only if (but not necessarily if) this
wraps the same instance as rhs
.
In the special case that at least one of this
or rhs
are empty(), returns true if and only if both are empty().
this
and rhs
wrap the same instance. So, in other words, it may return false even if this
and rhs
wrap the same instance. For example, this may occur if this
was created using a pointer cast to a base class, whereas rhs
was created using the uncast pointer.
ValT* val_cast_ptr_helper | ( | const val & | v, | |
const boost::true_type & | ||||
) | [friend] |
ValT will be a const type (indicated by 2nd argument).
ValT* val_cast_ptr_helper | ( | const val & | v, | |
const boost::false_type & | ||||
) | [friend] |
ValT will not be a const type (indicated by 2nd argument).
const storage_base_common* eval::detail::val::_store [private] |