QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches

Provide global functions to convert any kind of objects to/from QString and QVariant format. More...

Namespaces

namespace  detail
 Internal helper tools for qx::cvt namespace.
 

Classes

struct  context
 

Functions

template<typename T >
QString to_string (const T &t, const QString &format=QString(), int index=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
 
template<typename T >
qx_bool from_string (const QString &s, T &t, const QString &format=QString(), int index=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
 
template<typename T >
QVariant to_variant (const T &t, const QString &format=QString(), int index=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
 
template<typename T >
qx_bool from_variant (const QVariant &v, T &t, const QString &format=QString(), int index=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
 
template<typename T >
QJsonValue to_json (const T &t, const QString &format=QString())
 
template<typename T >
qx_bool from_json (const QJsonValue &j, T &t, const QString &format=QString())
 

Detailed Description

Provide global functions to convert any kind of objects to/from QString and QVariant format.

Function Documentation

◆ from_json()

template<typename T >
qx_bool qx::cvt::from_json ( const QJsonValue & j,
T & t,
const QString & format = QString() )
inline

Definition at line 84 of file QxConvert.h.

◆ from_string()

template<typename T >
qx_bool qx::cvt::from_string ( const QString & s,
T & t,
const QString & format = QString(),
int index = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context )
inline

Definition at line 78 of file QxConvert.h.

◆ from_variant()

template<typename T >
qx_bool qx::cvt::from_variant ( const QVariant & v,
T & t,
const QString & format = QString(),
int index = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context )
inline

Definition at line 80 of file QxConvert.h.

◆ to_json()

template<typename T >
QJsonValue qx::cvt::to_json ( const T & t,
const QString & format = QString() )
inline

Definition at line 83 of file QxConvert.h.

◆ to_string()

template<typename T >
QString qx::cvt::to_string ( const T & t,
const QString & format = QString(),
int index = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context )
inline

Definition at line 77 of file QxConvert.h.

◆ to_variant()

template<typename T >
QVariant qx::cvt::to_variant ( const T & t,
const QString & format = QString(),
int index = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context )
inline

Definition at line 79 of file QxConvert.h.