Spinning Topp Logo BlackTopp Studios
inc
Public Types | Static Public Member Functions | List of all members
Mezzanine::ReferenceCountTraits< IntrusiveRefCount > Class Template Reference

An Example ReferenceCountTraits implmentation. More...

#include <countedptr.h>

Public Types

enum  { IsCastable = CastStatic }
 What kind of casting should be done when the target must be down(or side) cast.
 
typedef IntrusiveRefCount RefCountType
 The sample internal reference count needs to indicate that the managed type is the same as the ReferenceCountType, because it will have a counter.
 

Static Public Member Functions

static RefCountTypeConstructionPointer (RefCountType *Target)
 Because The reference count is allocated when the caller created the target this does not need to allocate a Reference count separetaly. More...
 

Detailed Description

template<>
class Mezzanine::ReferenceCountTraits< IntrusiveRefCount >

An Example ReferenceCountTraits implmentation.

Anything with an internal Reference should implement a specialization of this template that defines PtrType to be a pointer to the structure with the reference count interface in to the items defined in the main ReferenceCountTraits documentation.

Definition at line 229 of file countedptr.h.

Member Function Documentation

static RefCountType* Mezzanine::ReferenceCountTraits< IntrusiveRefCount >::ConstructionPointer ( RefCountType Target)
inlinestatic

Because The reference count is allocated when the caller created the target this does not need to allocate a Reference count separetaly.

Parameters
TargetThe already created object to manage.
Returns
This is expected to return a valid reference count, since the reference count is in the target, this returns whatever was passed in,

Definition at line 238 of file countedptr.h.


The documentation for this class was generated from the following file: