SourceForge.net Logo

/home/chris/Projects/eval/val.hpp File Reference

Defines the eval::val class and associated exceptions. More...

Go to the source code of this file.

Namespaces

namespace  eval
namespace  eval::detail
namespace  eval::detail::overload_backups

Classes

class  eval::bad_val_cast
class  eval::non_numeric_exception
class  eval::overflow_exception
class  eval::non_ostreamable_exception
class  eval::empty_exception
class  eval::detail::storage_base_common
class  eval::detail::storage_base_nonconst
class  eval::detail::storage_unmanaged_ptr< ValT >
class  eval::detail::storage_unmanaged_ptr_nonconst< ValT >
class  eval::detail::storage_transfer_ownership< ValT >
class  eval::detail::storage_transfer_ownership_nonconst< ValT >
class  eval::detail::storage_transfer_ownership_array< ValT >
class  eval::detail::storage_transfer_ownership_array_nonconst< ValT >
class  eval::detail::storage_copy_value< ValT >
class  eval::detail::storage_copy_value_nonconst< ValT >
class  eval::detail::val
 A generic class for wrapping any type of object/primitive. More...

Typedefs

typedef boost::intmax_t eval::large_int
 Used as a return value, when trying to convert an eval::val to int.
typedef long double eval::large_double
 Used as a return value when trying to convert an eval::val to double.
typedef detail::val eval::val

Enumerations

enum  eval::ownership_type_nocopy { eval::UNMANAGED_PTR = 1, eval::TRANSFER_OWNERSHIP, eval::TRANSFER_OWNERSHIP_ARRAY }
enum  eval::ownership_type_shared_ptr { eval::SHARED_PTR = 100 }
enum  eval::ownership_type_shared_array { eval::SHARED_ARRAY = 200 }
enum  eval::ownership_type_copy { eval::COPY_VALUE = 300 }

Functions

template<typename FromT, typename ToT>
ToT eval::detail::convert_numeric_helper (const FromT *x, const boost::true_type &)
template<typename FromT, typename ToT>
ToT eval::detail::convert_numeric_helper (const FromT *x, const boost::false_type &)
template<typename FromT, typename ToT>
ToT eval::detail::convert_numeric (const FromT *x, const boost::true_type &)
template<typename FromT, typename ToT>
ToT eval::detail::convert_numeric (const FromT *, const boost::false_type &)
template<typename CharT, typename TraitsT, typename ValT>
std::basic_ostream< CharT,
TraitsT > & 
eval::detail::overload_backups::operator<< (std::basic_ostream< CharT, TraitsT > &, const ValT &)
 A fallback operator<< to ensure stringify() will always compile.
template<typename FromT>
std::string eval::detail::stringify (const FromT &val)
template<typename FromT>
std::string eval::detail::convert_lexical_non_c_str (const FromT *val)
template<typename FromT>
std::string eval::detail::convert_lexical (const FromT *val)
template<>
std::string eval::detail::convert_lexical< char > (const char *val)
 Specialisation to convert const char * to string.
template<typename DesiredT>
void eval::detail::ensure_val_types_match (const val &v)
template<typename DesiredT>
DesiredT * eval::detail::val_cast_ptr_helper (const val &v, const boost::true_type &)
 ValT will be a const type (indicated by 2nd argument).
template<typename DesiredT>
DesiredT * eval::detail::val_cast_ptr_helper (const val &v, const boost::false_type &)
 ValT will not be a const type (indicated by 2nd argument).
template<typename DesiredT>
const DesiredT * eval::val_cast_ptr (const val &v)
template<typename DesiredT>
DesiredT * eval::val_cast_ptr (val &v)


Detailed Description

Defines the eval::val class and associated exceptions.

Note that the eval::val class is defined within namespace eval::detail. A typedef is used to bring it into the eval namespace. (Doing so enables one to define val's friend functions within the eval::detail namespace, which otherwise does not appear to be easy.)


Generated on Sat Sep 20 20:02:34 2008 for eval by  doxygen 1.5.6