Proton  1.1.1
Make porting easy from Python to C++11
ref.hpp File Reference

the core header for reference support. More...

#include <memory>
#include <utility>
#include <tuple>
#include <type_traits>
#include <proton/pool.hpp>
#include <initializer_list>

Go to the source code of this file.


struct  proton::ref_< objT, allocator >
 The core reference support template. More...
struct  proton::key_hash< T >
 general key_hash for refs. More...
struct  proton::subkey_hash< T, key_seq >
 general subkey_hash for refs. More...


namespace  proton
 The main proton namespace.
namespace  proton::detail
 The implementation namespace of proton.


#define PROTON_COPY_DECL(type)
 declare copy_to().
#define PROTON_COPY_DECL_NV(type)
 declare copy_to() without virtual.
#define PROTON_KEY_DECL(type)
 general operator< & operator== for objects.


template<typename refT >
bool proton::is_null (const refT &x)
 test a ref null or not.
template<typename refT >
bool proton::is_valid (const refT &x)
 test a ref valid or not.
template<typename refT >
refT proton::copy (const refT &x)
 Generate a copy of object.
template<typename refT >
void proton::reset (refT &x)
 reset a ref to release its object if any.
template<typename refT >
long proton::ref_count (const refT &x)
 get the reference count of the object.
template<typename T , typename refT >
proton::cast (const refT &x)
 cast from a ref type to another.
template<typename T >
std::ostream & proton::operator<< (typename T::proton_ostream_t &s, const T &y)
 general output for refs.


init_alloc proton::alloc
 explicitly demand to initialize an object.

Detailed Description

the core header for reference support.

Definition in file ref.hpp.