[PPL-devel] client data for ppl_io_set_variable_output_function?

Basile STARYNKEVITCH basile at starynkevitch.net
Fri Mar 20 14:30:28 CET 2009


Hello Roberto and all,

It would be cute if the routine passed to 
ppl_io_set_variable_output_function could take some client data.

So I suggest an additional variant to the API. In C++,  have inside the 
Parma_Polyhedra_Library::Variable class
  typedef void output_function_with_data_type (std::ostream &s, const 
Variable &v, void* data);
and the static member function
   set_output_function_with_data(output_function_with_data_type* f, void 
*data);
so that when a variable v needs to be output, PPL would call
   f(s,v,data)

And in the C API one would have
   
ppl_io_set_variable_output_with_data_function(ppl_io_variable_output_function_with_data_type 
*f, void*data)

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***




More information about the PPL-devel mailing list