[odb-users] ODB Named pragmas
Emilio Garcia
emilio.garcia at ieec.cat
Mon May 10 07:59:00 EDT 2021
Hi all,
I am checking the ODB Manual and I saw in 14 ODB Pragma Language Chapter
that is possible to make use of #include directive to include the file
with the odb pragma. But, I wondered if it is possible to do the other
way round, to avoid putting odb things in the source header file. Let's
take the example shown in the manual:
// person.hxx
class person
{
...
};
#ifdef ODB_COMPILER
# include "person-pragmas.hxx"
#endif
And I would like to have:
// person.hxx
class person
{
...
};
// person-pragmas.hxx
#include "person.hxx"
#pragma db object(person)
#pragma db member(person::id_) id
I must admit that I did not tried yet, I just wanted to confirm with you
if it is possible and If it would have any side-effect before going into
this approach.
Thanks in advance,
--
Emilio Garcia Quintana
emilio.garcia at ice.csic.es <mailto:emilio.garcia at ice.csic.es>
*Software Engineer*
Tel: +34 93 737 97 88 <tel:0034937379788>
Ext: 933002 <tel:933002>
Campus UAB, Carrer de Can Magrans, s/n
08193 Cerdanyola del Vallés
ICE IEEC CSIC Logos
Institute of Space Science (IEEC-CSIC)
http://www.ice.csic.es <http://www.ice.csic.es>
More information about the odb-users
mailing list