[PPL-devel] Unneeded asymmetries between Constraint/Generator public interfaces.

Enea Zaffanella zaffanella at cs.unipr.it
Tue Mar 12 11:08:13 CET 2002


Reasoning on the user interface.

I noted that the enumeration Type and the corresponding accessor method 
type() are declared:

   - public in Generator.defs.hh
   - PPL_INTERNAL (hence, private for the end-user) in Constraint.defs.hh

Also, for the class Constraint we do provide boolean tests is_equality() 
and is_inequality, while similar tests are not provided for Generator: 
we only have is_line() is declared as PPL_INTERNAL; we don't have 
methods is_ray() and is_vertex().
NOTE: the method is_ray_or_vertex() is PPL_INTERNAL, as it should be.

In order to have a more uniform interface, I suggest the following:

- let the enums Type and methods type() be public, so that the user has 
a uniform way to investigate the type of constraints/generators.

- let the boolean tests, including the yet to be written is_ray() and 
is_vertex(), but excluding is_ray_or_vertex(), be either all public or 
all PPL_INTERNAL.

What do you think ? Should I go on and implement this change ?

Ciao,
Enea.




More information about the PPL-devel mailing list