Rosetta 3.3
Classes | Namespaces
src/utility/pointer/ReferenceCount.hh File Reference

Base class for reference-counted single inheritance polymorphic classes. More...

#include <platform/types.hh>
#include <utility/pointer/ReferenceCount.fwd.hh>
#include <cassert>
#include <cstddef>

Classes

class  utility::pointer::ReferenceCount
 Base class for reference-counted polymorphic classes. More...

Namespaces

namespace  utility
 

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.


namespace  utility::pointer

Detailed Description

Base class for reference-counted single inheritance polymorphic classes.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Remarks:
  • Intended for use as a base class of polymorphic classes: A template-based approach without virtual destructor is preferred for non-polymorphic classes for efficiency.
  • Count value made mutable and reference add/subtract functions made const so that const objects can be held by shared ownership smart pointers.
  • Prefer to ReferenceCountMI if single inheritance is being used and a pure interface is not needed at the top of the hierarchy since the counter update functions are non-virtual here.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines