[odb-users] how to check a lazy pointer is null?

不明真相 icewill9999 at vip.qq.com
Tue Apr 14 22:58:40 EDT 2020

Hi there,

The odb defined header file is like below:

#pragma db object class SeismicWavelet{#pragma db inverse(seismicWavelet_)    lazy_weak_ptr<RickerWavelet&gt; rickerWavelet_;}hence the lazy pointer rickerWavelet_ could be null if the child table has no record in it.if i write code like if(_seisWavelet-&gt;RickerWavelet() ==nullptr) or ==NULL, the compiler will give me error.And my question is how to check the lazy pointer is null? I know it sound like a very stupid question, but i have searched the odb manual and the mailing list and found nothing about it, please help!
BTW, i have used ODB for a while, and it's a very great work, i am getting love it more and more, thanks you guys the ODB developers.
Best Regards,

More information about the odb-users mailing list