Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
PtrCast.h File Reference
#include "cDebugAssert.h"

Go to the source code of this file.

Namespaces

 Gray
 < The main namespace for all Core functions.
 

Macros

#define DYNPTR_CAST(t, p)   (static_cast <t*>(p))
 
#define IS_TYPE_OF(t, p)   true
 
#define CHECKPTR_CAST(t, p)   (::Gray::check_cast<t>(p))
 

Functions

template<class _TYPE_TO , class _TYPE_FROM >
bool Gray::is_valid_cast (_TYPE_FROM *p)
 
template<class _TYPE_TO , class _TYPE_FROM >
_TYPE_TO * Gray::check_cast (_TYPE_FROM *p)
 

Detailed Description

A pointer to some struct or class. Not used for pointers to basic/intrinsic types.

Macro Definition Documentation

◆ CHECKPTR_CAST

#define CHECKPTR_CAST (   t,
 
)    (::Gray::check_cast<t>(p))

◆ DYNPTR_CAST

#define DYNPTR_CAST (   t,
 
)    (static_cast <t*>(p))

◆ IS_TYPE_OF

#define IS_TYPE_OF (   t,
 
)    true