#include <tgCast.h>
|
template<typename T_FROM , typename T_TO > |
static std::vector< T_TO * > | filter (const std::vector< T_FROM * > &v) |
|
template<typename T_FROM , typename T_TO > |
static T_TO * | cast (T_FROM *obj) |
|
template<typename T_FROM , typename T_TO > |
static T_TO * | cast (T_FROM &obj) |
|
template<typename T_FROM , typename T_TO > |
static std::vector< T_TO * > | find (const tgTagSearch &tagSearch, const std::vector< T_FROM * > haystack) |
|
Utility class for typecasting
Definition at line 38 of file tgCast.h.
template<typename T_FROM , typename T_TO >
static T_TO* tgCast::cast |
( |
T_FROM * |
obj | ) |
|
|
inlinestatic |
Attempt a dynamic cast to the provided type. If it fails, return 0
Definition at line 66 of file tgCast.h.
template<typename T_FROM , typename T_TO >
static T_TO* tgCast::cast |
( |
T_FROM & |
obj | ) |
|
|
inlinestatic |
Attempt a dynamic cast to the provided type. If it fails, return 0
Definition at line 80 of file tgCast.h.
template<typename T_FROM , typename T_TO >
static std::vector<T_TO*> tgCast::filter |
( |
const std::vector< T_FROM * > & |
v | ) |
|
|
inlinestatic |
Filter by type, e.g. std::vector<SomeBaseType> myVector; tgCast::filter<SomeBaseType, SomeSubType>(myVector); will return a vector containing only the elements in myVector that are castable to SomeSubType
Definition at line 50 of file tgCast.h.
The documentation for this class was generated from the following file: