[odb-users] odb c++ and data preprocessing before persist

Николай Стороженко aheadgoon at gmail.com
Thu Feb 12 09:15:14 EST 2015

2015-02-12 13:23 GMT+04:00 Boris Kolpackov <boris at codesynthesis.com>:

> Hi Nick,
> Николай Стороженко <aheadgoon at gmail.com> writes:
> > I am checking byte order of binary data that i recieved, and if it
> > need i must run hton/ntoh functions for c struct members and than run
> > persist function. I have no opportunity to convert byte order of data to
> > network byte order before it transmitting to me. Callbacks cant help me,
> > and i cant reload persist or other functions for dynamic byte order
> checks.
> Check out virtual data members (Section 14.4.13, "virtual"). The idea
> is to provide accessors and modifiers that will do the conversion. In
> fact, you probably don't even need the virtual data member. You can
> just specify special accessors/modifiers that (only) ODB should use
> (see Section 14.4.5, "get/set/access").
> Boris

Great! Thank you! Its work for me!
May i ask you a bit more questions? Or it will be better to write in
something other place?

P.S. do you speak russian? =)

More information about the odb-users mailing list