48#define QX_TYPE_ID(T) typeid(T)
52#define QX_TYPE_ID(T) std::string(qx::trait::get_class_name< T >::get())
57#define QX_ANY_FORCE_HIDDEN_VISIBILITY __attribute__ ((visibility("hidden")))
61#ifndef QX_ANY_FORCE_HIDDEN_VISIBILITY
62#define QX_ANY_FORCE_HIDDEN_VISIBILITY
68template <
typename ValueType> ValueType *
any_cast(any *);
89 template <
typename ValueType>
94 template <
typename ValueType>
111 template <
typename ValueType>
114 holder(
const ValueType & value) : held(value) { ; }
130{
virtual const char *
what()
const throw() {
return "qx::bad_any_cast : failed conversion using qx::any_cast"; } };
132template <
typename ValueType>
136template <
typename ValueType>
140template <
typename ValueType>
143 typedef typename std::remove_reference<ValueType>::type nonref;
146 return static_cast<ValueType
>(* result);
149template <
typename ValueType>
152 typedef typename std::remove_reference<ValueType>::type nonref;
156template <
typename ValueType>
160template <
typename ValueType>
#define QX_ANY_FORCE_HIDDEN_VISIBILITY
const std::type_info & type_check
any(const ValueType &value)
any & operator=(any other)
any & operator=(const ValueType &other)
qx::trait::get_class_name<T>::get() : return class name of type T under const char * format,...
Register all primitive and useful types of stl, boost and Qt libraries using QX_REGISTER_CLASS_NAME(T...
std::shared_ptr< T > clone(const T &obj)
qx::clone(const T & obj) : return a boost smart-pointer (std::shared_ptr<T>) of a new instance of typ...
Root namespace for all QxOrm library features.
void swap(any &lhs, any &other)
ValueType * any_cast(any *)
ValueType * unsafe_any_cast(any *)
virtual type_check type() const
holder(const ValueType &value)
virtual placeholder * clone() const
holder & operator=(const holder &)
virtual placeholder * clone() const =0
virtual type_check type() const =0
virtual const char * what() const