Smart Pointers

ref_link_policy Struct Reference

#include <smart_ptr.hpp>

List of all members.


Detailed Description

Use this policy to create a reference linking smart pointer. In general, this policy is faster than the ref_count_policy, but takes a little more memory. It's not as easy to implement in synchronized code compare to ref_count_policy. It is more generic than ref_intrusive_policy, since it does not require that the target type have intrusive functions. Use ref_link_policy, when speed is the primary factor, there is no synchronized referencing requirements, and there's no desire to implement intrusive functions on the target type.
Example Usage.

void example_ref_link_policy_usage()
{
}

Note:
The ref_link_policy can still be used in synchronized code, if intrusive_lock_policy is used.
See also:
smart_ptr, ref_count_policy, ref_intrusive_policy

Definition at line 413 of file smart_ptr.hpp.

Public Member Functions

 ref_link_policy ()
template<class T1>
 ref_link_policy (ref_link_policy &src, T1 &)
template<class T, class F, class LCK>
void release (T &type, F clone_fct, LCK &lck_policy)
template<class T1, class F1, class T2, class F2, class LCK>
void assign (T1 &type1, F1 &clone_fct1, T2 type2, const F2 clone_fct2, ref_link_policy &src_policy, LCK &lck_policy)

Protected Member Functions

template<class T>
bool is_referenced (T &) const


The documentation for this struct was generated from the following file:
Generated on Wed Mar 29 21:58:59 2006 for Smart Pointers by  doxygen 1.4.6.Axter [Axter-Extended-Version]