MIRA
Namespaces | Functions
VoidCast.h File Reference

Provides safe casts for casting from a pointer to void* and vice versa while taking care of polymorphism and multiple inheritance. More...

#include <type_traits>
#include <factory/Object.h>
Include dependency graph for VoidCast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 mira::serialization
 

Functions

template<typename T >
void * void_upcast (T *pointer)
 Safe cast for casting from a pointer upwards to void* while taking care of polymorphism and multiple inheritance. More...
 
template<typename T >
T * void_downcast (void *pointer)
 Safe cast for casting from a void pointer to a derived pointer T* while taking care of polymorphism and multiple inheritance. More...
 

Detailed Description

Provides safe casts for casting from a pointer to void* and vice versa while taking care of polymorphism and multiple inheritance.

Author
Erik Einhorn
Date
2011/06/21