#include <memory>
Go to the source code of this file.
◆ HPP_DYNAMIC_PTR_CAST
#define HPP_DYNAMIC_PTR_CAST |
( |
|
t, |
|
|
|
x |
|
) |
| hpp::dynamic_pointer_cast<t>(x) |
◆ HPP_POINTER_DEFS
#define HPP_POINTER_DEFS |
( |
|
t | ) |
|
Value:
struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
Class to ease exception creation.
Definition exception-factory.hh:73
Defines the four types of smart pointers associated with type t
. If t
is CMyClass
then
- the type of a shared pointer to
t
is CMyClassShPtr
- the type of a weak pointer to
t
is CMyClassWkPtr_t
- the type of a shared pointer to
t const
is CMyClassConstShPtr
- the type of a weak pointer to
t const
is CMyClassConstWkPtr_t
◆ HPP_PREDEF_CLASS
#define HPP_PREDEF_CLASS |
( |
|
t | ) |
|
Value: class t; \
HPP_POINTER_DEFS(t); \
struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
Makes a forward declaration of class t
and of the four types of shared pointers associated with it.
◆ HPP_STATIC_CAST_REF_CHECK
#define HPP_STATIC_CAST_REF_CHECK |
( |
|
t, |
|
|
|
x |
|
) |
| |
Value: try { \
dynamic_cast<t&>(x); \
} catch (const std::exception& exc) { \
assert("Cast in #t failed" && 0); \
}
◆ HPP_STATIC_PTR_CAST
#define HPP_STATIC_PTR_CAST |
( |
|
t, |
|
|
|
x |
|
) |
| hpp::static_pointer_cast<t>(x) |