Hi,
If you want to serialize/deserialize an object without some attributes defined in your
qx mapping function, you have to use this method :
template <typename V> IxDataMember * data(V T::* pData, const QString & sKey, long lVersion, bool bSerialize);For example :
In the code below, when you serialize/deserialize an object of type
CPerson, attributes
"lastName" and
"sex" are ignored by serialization process.
- Code: Select all
namespace qx {
template <> void register_class(QxClass<qx::test::CPerson> & t)
{
t.id(& qx::test::CPerson::m_lPersonId, "idPerson", 0);
t.data(& qx::test::CPerson::m_sFirstName, "firstName", 0);
t.data(& qx::test::CPerson::m_sLastName, "lastName", 0, false);
t.data(& qx::test::CPerson::m_eSex, "sex", 0, false);
}}