Smart Pointers

shared_ptr_policy Class Template Reference

#include <smart_ptr.hpp>

List of all members.


Detailed Description

template<class REFERENCE_POLICY = ref_default_policy, class LOCK_POLICY = lock_default_policy, class WEAK_SUPPORT_POLICY = no_weak_support>
class shared_ptr_policy< REFERENCE_POLICY, LOCK_POLICY, WEAK_SUPPORT_POLICY >

This is a shared pointer ownership policy. This policy is similar to the ownership policy used by boost::shared_ptr. However, by default, the shared_ptr_policy uses reference link instead of reference counting logic that is used by boost::shared_ptr. In general, reference link logic is faster than reference counting, so this make shared_ptr_policy with it's default policies faster in general than boost::shared_ptr. For more information on pros and cons of the different reference logic available, see ref_link_policy, ref_count_policy, and ref_intrusive_policy.
Example Usage.

void example_shared_ptr_policy_usage()
{
}

See also:
smart_ptr, copy_on_write_policy, deep_copy_policy, ref_link_policy, ref_count_policy, ref_intrusive_policy, intrusive_lock_policy
Note:
The Ownership policy classes must take the lowest common denominator of arguments for constructor and common functions. Although this policy doesn't need the additional arguments, other policies do, and therefore to keep a standard interface, it must also take the additional arguments. Since shared_ptr_policy does not clone on write, get_non_constant_ptr always returns the input pointer.

Definition at line 827 of file smart_ptr.hpp.

Public Member Functions

 shared_ptr_policy ()
template<class T1, class F1, class T2>
 shared_ptr_policy (REFERENCE_POLICY &src, const T1 &type, const F1 &, const T2 &)
template<class T, class F>
T & get_non_constant_ptr (T &type, const F &)


The documentation for this class 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]