[gephex-devel] c++ linktypes

Martin Bayer martin at gephex.org
Tue Nov 23 20:02:17 CET 2004


[Georg Seidel]
> but to keep it simple: serialize can just return 0 to indicate no
> serialization

A default implementation with return 0 is ok for me.

> |  > virtual Link* create(alloc_fun_t gphx_alloc, free_fun_t gphx_free)=0;
> |
> | Do you think it is possible to implement a placement in shared memory
> | with these "functions"?
> 
> Why do you quote those beautiful and regular funcions?

I didn't found a definition of alloc_fun_t and free_fun_t.

It could also be something like thing that:

class alloc_fun_t
{
   public:
     // get some memory ..
     void* operator(size_t size);

   private:
     some memorymanager stuff to remember;	
};

> And why not just use
> 
> ~  virtual Link* create()=0;
> 
> (we probably will never implement this shared memory stuff)

It would be problematic anyway with complex link types and 
syncronization. With binary serialization in a shared memory area 
syncronization is much easier.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.gephex.org/pipermail/gephex-devel/attachments/20041123/88c9e42c/signature.bin


More information about the gephex-devel mailing list