[Rock-dev] Questions Regarding Typelib

Sylvain Joyeux bir.sylvain at gmail.com
Mon Jun 9 22:10:53 CEST 2014


>
> I don't really like this, as one would rely on the caller to make sure
> that the given memory area is preinitialized properly.
>
This is the only proper way one can design an API like this, as we often
want to be able to pass the same sample object over and over again to avoid
allocation.


> Just out of curiosity, is there a way in typelib, to get a preinitialized
> memory area for a type containing a virtual method ?
>
No. Typelib is strictly limited to non-polymorphic types. Moreover, pocolog
should never assume that the marshalled type has the same layout than the
actual C++ type as we want to be able to read / upgrade old log files. The
compatibility tests are done only when we want to hit a C++ layer (RTT or
Qt)

Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140609/0c994045/attachment.htm 


More information about the Rock-dev mailing list