34#ifndef HPP_UTIL_POINTER_HH
35#define HPP_UTIL_POINTER_HH
43using std::const_pointer_cast;
44using std::dynamic_pointer_cast;
45using std::static_pointer_cast;
47using std::make_shared;
59#define HPP_POINTER_DEFS(t) \
60 typedef hpp::weak_ptr<t> t##WkPtr_t; \
61 typedef hpp::weak_ptr<const t> t##ConstWkPtr_t; \
62 struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
67#define HPP_PREDEF_CLASS(t) \
69 HPP_POINTER_DEFS(t); \
70 struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
72#define HPP_STATIC_PTR_CAST(t, x) hpp::static_pointer_cast<t>(x)
73#define HPP_DYNAMIC_PTR_CAST(t, x) hpp::dynamic_pointer_cast<t>(x)
75#define HPP_STATIC_CAST_REF_CHECK(t, x) \
77 dynamic_cast<t&>(x); \
78 } catch (const std::exception& exc) { \
79 assert("Cast in #t failed" && 0); \
82#define HPP_STATIC_CAST_REF_CHECK(t, x)
Definition assertion.hh:45