SST/macro
|
#include <sprockit/errors.h>
#include <sprockit/refcount_ptr.h>
#include <sprockit/spkt_config.h>
#include <typeinfo>
Go to the source code of this file.
Classes | |
class | sprockit::ptr_type |
class | sprockit::printable_ptr_type |
Namespaces | |
sprockit | |
Macros | |
#define | ptr_safe_cast(type, ...) ::sprockit::__safe_ptr_cast__<type>(#type, __FILE__, __LINE__, __VA_ARGS__) |
First entry in VA_ARGS is the obj Second entry is optional being an error msg. More... | |
#define | ptr_interface_cast(type, obj) dynamic_cast<type*>(obj.get()) |
#define | ptr_static_cast(type, obj) static_cast<type*>(obj.get()) |
#define | ptr_test_cast(type, obj) dynamic_cast<type*>(obj.get()) |
#define | ptr_known_cast(type, ...) ptr_safe_cast(type, __VA_ARGS__) |
Functions | |
template<class Out , class In > | |
sprockit::refcount_ptr< Out > | sprockit::__safe_ptr_cast__ (const char *objname, const char *file, int line, const sprockit::refcount_ptr< In > &in, const char *error_msg="error") |
#define ptr_interface_cast | ( | type, | |
obj | |||
) | dynamic_cast<type*>(obj.get()) |
Definition at line 88 of file ptr_type.h.
#define ptr_known_cast | ( | type, | |
... | |||
) | ptr_safe_cast(type, __VA_ARGS__) |
Definition at line 97 of file ptr_type.h.
#define ptr_safe_cast | ( | type, | |
... | |||
) | ::sprockit::__safe_ptr_cast__<type>(#type, __FILE__, __LINE__, __VA_ARGS__) |
First entry in VA_ARGS is the obj Second entry is optional being an error msg.
Definition at line 85 of file ptr_type.h.
Referenced by sstmac::pair_payload< T1, T2 >::add(), sstmac::vector1_payload< Type, VectorType >::add(), sstmac::pairpayloadvector< T1, T2 >::add(), sstmac::pair_payload< T1, T2 >::equals(), sstmac::vector1_payload< Type, VectorType >::equals(), sstmac::pairpayloadvector< T1, T2 >::equals(), sstmac::vector1_payload< Type, VectorType >::logical_and(), sstmac::vector1_payload< Type, VectorType >::logical_or(), sstmac::vector1_payload< Type, VectorType >::logical_xor(), sstmac::pair_payload< T1, T2 >::max(), sstmac::vector1_payload< Type, VectorType >::max(), sstmac::pair_payload< T1, T2 >::min(), sstmac::vector1_payload< Type, VectorType >::min(), and sstmac::vector1_payload< Type, VectorType >::prod().
#define ptr_static_cast | ( | type, | |
obj | |||
) | static_cast<type*>(obj.get()) |
Definition at line 91 of file ptr_type.h.
#define ptr_test_cast | ( | type, | |
obj | |||
) | dynamic_cast<type*>(obj.get()) |
Definition at line 94 of file ptr_type.h.