long message - double support, notifications, user feedback

John Biddiscombe j.biddiscombe at rl.ac.uk
Wed Apr 26 08:30:22 EDT 2000


>2) Notifications ...
>
>AddNotification(fcn,arg) and a RemoveNotification(fcn,arg) structure. Also 
>I would change the API to be
>
>void fcn(void *theThisPointer, void *theUserPassedArg)
>

No problemo. I'd be worried that a 'wasted' list might be allocated for
every vtkObject, so I'd be tempted to create a small vtkMessageDispatcher
class which would store a single destination for messages, and only
allocate space for a list if multiple AddNotification(fcn,arg) calls were
made. It'd have to be something compact like vtkTimeStamp rather than a
derivative of vtkCollection to make it worthwhile. I don't like to see
calls to malloc or new used if it can be avoided (for heap management
issues rather than performance per se).

On second thoughts, vtkObject already has deletemethods and stuff in it, so
I'll just add a "vtkMessageDispatcher" and hopefully at some point it can
take over from the deletemethod callback...

I shall play around with it right away.


1) double stuff
I'm thinking about this, but won't do anything yet.

3) User Feedback
I'll start on this too.

John B




More information about the vtk-developers mailing list