[odb-users] odb-epilogue conclusions

Boris Kolpackov boris at codesynthesis.com
Tue Dec 16 08:23:03 EST 2014


Hi Christian,

Christian Sell <christian at gsvitec.com> writes:

> I dont remember reading anything about them, [...]

The various options, including the --odb-epilogue approach, are
covered at the beginning of Chapter 14, "ODB Pragma Language".


> so I'll quickly write down my findings:

Thanks, that's appreciated.


> when writing an epilogue header, you have to put in #include statements for
> the mapped class AND for the epilogue headers of all persistent classes
> referenced in the mapped class.
>
> [...]
> 
> #include "person.h"
> 
> #include "address_epilogue.h"

For those wondering why we need to include person.h here (seeing that
this file is included by the --odb-epilogue option after person.h),
it is for the case where person_epilogue.h is itself #included into
another *_epilogue.h file (like address_epilogue.h above).


> This leads me to the conclusion that it might be best to lump all pragmas
> for the whole project into one file, and pass that as epilogue to odb for
> each input file..

Yes, that would work if you don't have too many persistent classes.

Boris



More information about the odb-users mailing list