yapf/countedptr.hpp
changeset 4549 106ed18a7675
parent 4434 a08cb4b5c179
child 5094 6f4c15b49da0
equal deleted inserted replaced
4548:6165e12570bf 4549:106ed18a7675
     4 #define COUNTEDPTR_HPP
     4 #define COUNTEDPTR_HPP
     5 
     5 
     6 /** @file CCountedPtr - smart pointer implementation */
     6 /** @file CCountedPtr - smart pointer implementation */
     7 
     7 
     8 /** CCountedPtr - simple reference counting smart pointer.
     8 /** CCountedPtr - simple reference counting smart pointer.
     9 *
     9  *
    10 *     One of the standard ways how to maintain object's lifetime.
    10  *     One of the standard ways how to maintain object's lifetime.
    11 *
    11  *
    12 *     See http://ootips.org/yonat/4dev/smart-pointers.html for more
    12  *     See http://ootips.org/yonat/4dev/smart-pointers.html for more
    13 *   general info about smart pointers.
    13  *   general info about smart pointers.
    14 *
    14  *
    15 *     This class implements ref-counted pointer for objects/interfaces that
    15  *     This class implements ref-counted pointer for objects/interfaces that
    16 *   support AddRef() and Release() methods.
    16  *   support AddRef() and Release() methods.
    17 */
    17  */
    18 template <class Tcls_>
    18 template <class Tcls_>
    19 class CCountedPtr {
    19 class CCountedPtr {
    20 	/** redefine the template argument to make it visible for derived classes */
    20 	/** redefine the template argument to make it visible for derived classes */
    21 public:
    21 public:
    22 	typedef Tcls_ Tcls;
    22 	typedef Tcls_ Tcls;