123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- /****************************************************************************
- **
- ** https://www.qxorm.com/
- ** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)
- **
- ** This file is part of the QxOrm library
- **
- ** This software is provided 'as-is', without any express or implied
- ** warranty. In no event will the authors be held liable for any
- ** damages arising from the use of this software
- **
- ** Commercial Usage
- ** Licensees holding valid commercial QxOrm licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Lionel Marty
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file 'license.gpl3.txt' included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met : http://www.gnu.org/copyleft/gpl.html
- **
- ** If you are unsure which license is appropriate for your use, or
- ** if you have questions regarding the use of this file, please contact :
- ** contact@qxorm.com
- **
- ****************************************************************************/
- namespace qx {
- namespace cvt {
- namespace detail {
- template <> struct QxConvert_ToString< qx::trait::no_type > {
- static inline QString toString(const qx::trait::no_type & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return ""; } };
- template <> struct QxConvert_ToString< QString > {
- static inline QString toString(const QString & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t; } };
- template <> struct QxConvert_ToString< QUuid > {
- static inline QString toString(const QUuid & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t.toString(); } };
- template <> struct QxConvert_ToString< QDate > {
- static inline QString toString(const QDate & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return t.toString(format.isEmpty() ? QString(QX_STR_CVT_QDATE_FORMAT) : format); } };
- template <> struct QxConvert_ToString< QTime > {
- static inline QString toString(const QTime & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return t.toString(format.isEmpty() ? QString(QX_STR_CVT_QTIME_FORMAT) : format); } };
- template <> struct QxConvert_ToString< QDateTime > {
- static inline QString toString(const QDateTime & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return t.toString(format.isEmpty() ? QString(QX_STR_CVT_QDATETIME_FORMAT) : format); } };
- template <> struct QxConvert_ToString< QByteArray > {
- static inline QString toString(const QByteArray & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString(t); } };
- template <>
- struct QxConvert_ToString< QVariant >
- {
- static inline QString toString(const QVariant & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- {
- Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx);
- #ifndef _QX_NO_JSON
- if (qx::cvt::detail::helper::checkConvertQVariantToString(t))
- {
- QString type = QString("%1").arg(static_cast<int>(t.type()), 6, 10, QChar('0'));
- QString val = "$$JSON$$" + type + "$$";
- QJsonValue json = QJsonValue::fromVariant(t);
- QJsonDocument doc = (json.isArray() ? QJsonDocument(json.toArray()) : QJsonDocument(json.toObject()));
- return (val + QString::fromUtf8(doc.toJson()));
- }
- #endif // _QX_NO_JSON
- return t.toString();
- }
- };
- template <> struct QxConvert_ToString< qx_bool > {
- static inline QString toString(const qx_bool & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t.toString(); } };
- template <> struct QxConvert_ToString< bool > {
- static inline QString toString(const bool & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return (t ? "1" : "0"); } };
- template <> struct QxConvert_ToString< char > {
- static inline QString toString(const char & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString(t); } };
- template <> struct QxConvert_ToString< short > {
- static inline QString toString(const short & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< int > {
- static inline QString toString(const int & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< long > {
- static inline QString toString(const long & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< long long > {
- static inline QString toString(const long long & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< float > {
- static inline QString toString(const float & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< double > {
- static inline QString toString(const double & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< unsigned short > {
- static inline QString toString(const unsigned short & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< unsigned int > {
- static inline QString toString(const unsigned int & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< unsigned long > {
- static inline QString toString(const unsigned long & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< unsigned long long > {
- static inline QString toString(const unsigned long long & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(index); Q_UNUSED(ctx); return (format.isEmpty() ? QString::number(t) : QString().sprintf(qPrintable(format), t)); } };
- template <> struct QxConvert_ToString< qx::QxDateNeutral > {
- static inline QString toString(const qx::QxDateNeutral & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t.toNeutral(); } };
- template <> struct QxConvert_ToString< qx::QxTimeNeutral > {
- static inline QString toString(const qx::QxTimeNeutral & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t.toNeutral(); } };
- template <> struct QxConvert_ToString< qx::QxDateTimeNeutral > {
- static inline QString toString(const qx::QxDateTimeNeutral & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return t.toNeutral(); } };
- template <> struct QxConvert_ToString< std::string > {
- static inline QString toString(const std::string & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- #ifndef QT_NO_STL
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString::fromStdString(t); } };
- #else // QT_NO_STL
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString::fromLatin1(t.data(), int(t.size())); } };
- #endif // QT_NO_STL
- template <> struct QxConvert_ToString< std::wstring > {
- static inline QString toString(const std::wstring & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- #if ((! defined(QT_NO_STL)) && (! defined(QT_NO_STL_WCHAR)))
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString::fromStdWString(t); } };
- #else // ((! defined(QT_NO_STL)) && (! defined(QT_NO_STL_WCHAR)))
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); Q_UNUSED(t); qAssert(false); /* Need STL compatibility ! */ return QString(); } };
- #endif // ((! defined(QT_NO_STL)) && (! defined(QT_NO_STL_WCHAR)))
- #ifndef _QX_NO_JSON
- template <>
- struct QxConvert_ToString< QJsonValue >
- {
- static inline QString toString(const QJsonValue & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- {
- Q_UNUSED(index); Q_UNUSED(ctx);
- QJsonDocument::JsonFormat jsonFormat = QJsonDocument::Compact;
- if (! format.isEmpty()) { jsonFormat = ((format == "indented") ? QJsonDocument::Indented : jsonFormat); }
- QJsonDocument doc = (t.isArray() ? QJsonDocument(t.toArray()) : QJsonDocument(t.toObject()));
- return QString::fromUtf8(doc.toJson(jsonFormat));
- }
- };
- #endif // _QX_NO_JSON
- #ifdef _QX_ENABLE_BOOST
- template <typename T> struct QxConvert_ToString< boost::optional<T> > {
- static inline QString toString(const boost::optional<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { if (t) { return qx::cvt::to_string((* t), format, index, ctx); }; return QString(); } };
- #endif // _QX_ENABLE_BOOST
- template <typename T1, typename T2> struct QxConvert_ToString< std::pair<T1, T2> > {
- static inline QString toString(const std::pair<T1, T2> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2> struct QxConvert_ToString< QPair<T1, T2> > {
- static inline QString toString(const QPair<T1, T2> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< std::vector<T> > {
- static inline QString toString(const std::vector<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< std::list<T> > {
- static inline QString toString(const std::list<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< std::set<T> > {
- static inline QString toString(const std::set<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #ifdef _QX_ENABLE_BOOST
- template <typename T> struct QxConvert_ToString< boost::unordered_set<T> > {
- static inline QString toString(const boost::unordered_set<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< boost::unordered_multiset<T> > {
- static inline QString toString(const boost::unordered_multiset<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #endif // _QX_ENABLE_BOOST
- template <typename T> struct QxConvert_ToString< std::unordered_set<T> > {
- static inline QString toString(const std::unordered_set<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< std::unordered_multiset<T> > {
- static inline QString toString(const std::unordered_multiset<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< QVector<T> > {
- static inline QString toString(const QVector<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< QList<T> > {
- static inline QString toString(const QList<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< QLinkedList<T> > {
- static inline QString toString(const QLinkedList<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T> struct QxConvert_ToString< QFlags<T> > {
- static inline QString toString(const QFlags<T> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QString::number(static_cast<int>(t)); } };
- template <typename Key, typename Value> struct QxConvert_ToString< std::map<Key, Value> > {
- static inline QString toString(const std::map<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #ifdef _QX_ENABLE_BOOST
- template <typename Key, typename Value> struct QxConvert_ToString< boost::unordered_map<Key, Value> > {
- static inline QString toString(const boost::unordered_map<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< boost::unordered_multimap<Key, Value> > {
- static inline QString toString(const boost::unordered_multimap<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #endif // _QX_ENABLE_BOOST
- template <typename Key, typename Value> struct QxConvert_ToString< std::unordered_map<Key, Value> > {
- static inline QString toString(const std::unordered_map<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< std::unordered_multimap<Key, Value> > {
- static inline QString toString(const std::unordered_multimap<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< QHash<Key, Value> > {
- static inline QString toString(const QHash<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< QMultiHash<Key, Value> > {
- static inline QString toString(const QMultiHash<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< QMap<Key, Value> > {
- static inline QString toString(const QMap<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< QMultiMap<Key, Value> > {
- static inline QString toString(const QMultiMap<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename Key, typename Value> struct QxConvert_ToString< qx::QxCollection<Key, Value> > {
- static inline QString toString(const qx::QxCollection<Key, Value> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #ifdef _QX_ENABLE_BOOST
- template <typename T1> struct QxConvert_ToString< boost::tuple<T1> > {
- static inline QString toString(const boost::tuple<T1> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2> struct QxConvert_ToString< boost::tuple<T1, T2> > {
- static inline QString toString(const boost::tuple<T1, T2> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3> struct QxConvert_ToString< boost::tuple<T1, T2, T3> > {
- static inline QString toString(const boost::tuple<T1, T2, T3> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4, T5> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4, T5> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4, T5, T6> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4, T5, T6> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4, T5, T6, T7> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4, T5, T6, T7> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4, T5, T6, T7, T8> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4, T5, T6, T7, T8> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> struct QxConvert_ToString< boost::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> > {
- static inline QString toString(const boost::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- #endif // _QX_ENABLE_BOOST
- template <typename T1> struct QxConvert_ToString< std::tuple<T1> > {
- static inline QString toString(const std::tuple<T1> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2> struct QxConvert_ToString< std::tuple<T1, T2> > {
- static inline QString toString(const std::tuple<T1, T2> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3> struct QxConvert_ToString< std::tuple<T1, T2, T3> > {
- static inline QString toString(const std::tuple<T1, T2, T3> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4, T5> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4, T5> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4, T5, T6> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4, T5, T6> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4, T5, T6, T7> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4, T5, T6, T7> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> struct QxConvert_ToString< std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> > {
- static inline QString toString(const std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)
- { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } };
- } // namespace detail
- } // namespace cvt
- } // namespace qx
|