QxOrm
1.5.0
C++ Object Relational Mapping library
|
qx::trait::get_class_name<T>::get() : return class name of type T under const char * format, T must be registered with QX_REGISTER_CLASS_NAME(T) macro More...
Go to the source code of this file.
qx::trait::get_class_name<T>::get() : return class name of type T under const char * format, T must be registered with QX_REGISTER_CLASS_NAME(T) macro
Definition in file get_class_name.h.
#define QX_GET_CLASS_NAME | ( | TYPE | ) | qx::trait::get_class_name< qx::trait::remove_attr< TYPE >::type >::get() |
Definition at line 60 of file get_class_name.h.
#define QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG | ( | ) |
static inline const char * get_xml_tag() \ { \ static std::string result_xml; \ if (! result_xml.empty()) { return result_xml.c_str(); } \ QString tmp = get_class_name::get(); \ tmp.replace(QX_REGISTER_CLASS_NAME_SEP_INF, QX_REGISTER_CLASS_NAME_SEP_INF_XML_TAG); \ tmp.replace(QX_REGISTER_CLASS_NAME_SEP_SUP, QX_REGISTER_CLASS_NAME_SEP_SUP_XML_TAG); \ tmp.replace(QX_REGISTER_CLASS_NAME_SEP_NXT, QX_REGISTER_CLASS_NAME_SEP_NXT_XML_TAG); \ tmp.replace("::", "."); \ tmp.replace(" ", ""); \ result_xml = tmp.toLatin1().constData(); \ return result_xml.c_str(); \ }
Definition at line 84 of file get_class_name.h.
#define QX_GET_CLASS_NAME_STD_STR | ( | TYPE | ) | std::string(qx::trait::get_class_name< qx::trait::remove_attr< TYPE >::type >::get()) |
Definition at line 63 of file get_class_name.h.
#define QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME | ( | TYPE | ) | std::string(qx::trait::get_class_name< typename qx::trait::remove_attr< TYPE >::type >::get()) |
Definition at line 75 of file get_class_name.h.
#define QX_GET_CLASS_NAME_WITH_TYPENAME | ( | TYPE | ) | qx::trait::get_class_name< typename qx::trait::remove_attr< TYPE >::type >::get() |
Definition at line 72 of file get_class_name.h.
#define QX_GET_CLASS_NAME_XML_TAG | ( | TYPE | ) | qx::trait::get_class_name< qx::trait::remove_attr< TYPE >::type >::get_xml_tag() |
Definition at line 66 of file get_class_name.h.
#define QX_GET_CLASS_NAME_XML_TAG_STD_STR | ( | TYPE | ) | std::string(qx::trait::get_class_name< qx::trait::remove_attr< TYPE >::type >::get_xml_tag()) |
Definition at line 69 of file get_class_name.h.
#define QX_GET_CLASS_NAME_XML_TAG_STD_STR_WITH_TYPENAME | ( | TYPE | ) | std::string(qx::trait::get_class_name< typename qx::trait::remove_attr< TYPE >::type >::get_xml_tag()) |
Definition at line 81 of file get_class_name.h.
#define QX_GET_CLASS_NAME_XML_TAG_WITH_TYPENAME | ( | TYPE | ) | qx::trait::get_class_name< typename qx::trait::remove_attr< TYPE >::type >::get_xml_tag() |
Definition at line 78 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME | ( | className | ) |
namespace qx { namespace trait { \ template <> \ struct get_class_name< className > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 142 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_INF "<" |
Definition at line 52 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_INF_XML_TAG "-" |
Definition at line 56 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_NXT ", " |
Definition at line 54 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_NXT_XML_TAG "_" |
Definition at line 58 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_SUP ">" |
Definition at line 53 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_SEP_SUP_XML_TAG "-" |
Definition at line 57 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_1 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T> \ struct get_class_name< className<T> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 156 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_2 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2> \ struct get_class_name< className<T1, T2> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 171 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_3 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3> \ struct get_class_name< className<T1, T2, T3> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 187 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_4 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4> \ struct get_class_name< className<T1, T2, T3, T4> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 204 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_5 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4, typename T5> \ struct get_class_name< className<T1, T2, T3, T4, T5> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T5) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 222 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_6 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> \ struct get_class_name< className<T1, T2, T3, T4, T5, T6> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T5) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T6) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 241 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_7 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> \ struct get_class_name< className<T1, T2, T3, T4, T5, T6, T7> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T5) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T6) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T7) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 261 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_8 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> \ struct get_class_name< className<T1, T2, T3, T4, T5, T6, T7, T8> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T5) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T6) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T7) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T8) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 282 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_9 | ( | className | ) |
namespace qx { namespace trait { \ template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> \ struct get_class_name< className<T1, T2, T3, T4, T5, T6, T7, T8, T9> > \ { \ static inline const char * get() \ { \ QX_REGISTER_CLASS_NAME_TEMPLATE_INIT(className); \ result += QX_REGISTER_CLASS_NAME_SEP_INF + QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T1) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T2) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T3) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T4) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T5) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T6) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T7) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T8) + QX_REGISTER_CLASS_NAME_SEP_NXT; \ result += QX_GET_CLASS_NAME_STD_STR_WITH_TYPENAME(T9) + QX_REGISTER_CLASS_NAME_SEP_SUP; \ return result.c_str(); \ } \ QX_GET_CLASS_NAME_IMPLEMENT_FCT_GET_XML_TAG(); \ }; \ } }
Definition at line 304 of file get_class_name.h.
#define QX_REGISTER_CLASS_NAME_TEMPLATE_INIT | ( | className | ) |
static std::string result; \ if (! result.empty()) { return result.c_str(); } \ result = std::string(#className);
Definition at line 137 of file get_class_name.h.