Spinning Topp Logo BlackTopp Studios
inc
Static Public Member Functions | List of all members
Mezzanine::CountedPtrCastImpl< ReturnPointer, OriginalPointer, CountedPointerCastingState > Class Template Reference

This is used as to determine how a CountedPtr performs castin between pointer types internally. More...

#include <countedptr.h>

Static Public Member Functions

static ReturnPointer Cast (OriginalPointer)
 Do not cast, rather fail. More...
 

Detailed Description

template<typename ReturnPointer, typename OriginalPointer, CountedPointerCastingState>
class Mezzanine::CountedPtrCastImpl< ReturnPointer, OriginalPointer, CountedPointerCastingState >

This is used as to determine how a CountedPtr performs castin between pointer types internally.

The default implementation for internal casting in the CountedPtr Simply throws an exception.

This Should never actually get called. Though it is the default template instance the default ReferenceCountTraits uses the CastNoneError specialization of this template.

The ReferenceCountTraits for the CountedPtr<Type> should declare what kind castint should be used by declaring an enumeration called 'IsCastable' and assigning the desired casting type.

enum { IsCastable = CastStaticVirtual };
Template Parameters
ReturnPointerThe type of pointer that the functions on the CountedPtr must return
OriginalPointerThe actual type the CountedPtr is maintaining as a target.
CountedPointerCastingStateAny value in the CountedPointerCastingState to indicate kind of casting.

For any case that uses CastNoneError including the default.

Definition at line 78 of file countedptr.h.

Member Function Documentation

template<typename ReturnPointer , typename OriginalPointer , CountedPointerCastingState >
static ReturnPointer Mezzanine::CountedPtrCastImpl< ReturnPointer, OriginalPointer, CountedPointerCastingState >::Cast ( OriginalPointer  )
inlinestatic

Do not cast, rather fail.

Returns
Always fails by throwing
Exceptions
Alwaysthrows a 0
Todo:
make this conditionally fail to compile.

Definition at line 523 of file countedptr.h.


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