[saga-rg] object hierarchy for task factories...

Andre Merzky andre at merzky.net
Tue Aug 30 04:31:28 CDT 2005


Hi all, 

during implementing SAGA in C++, we came upon a naming
issue.  Currently, the task factories are individual 
object types in the saga name space, so we have a 
saga::file_task_factory, saga::logical_file_task_factory
etc.

A better way to structure that might be (proposal), to have
the task factories in the respective name spaces, i.e.
saga::file::task_factory and sga::logical_file::task_factory
etc.

That would not change the look and feel of the API really,
its basically about naming.  However, the implementation is
cleaner.  One advantage is the following:  If an enum gets
defined in a class (as the flags for file opening), they
have to be either redefined in the task factory with the
same values (ugh), or need to be fully qualified in the
task_factory (e.g.: my_task_factory.open (url,
task::Create).  Also Ugh.

Having the task factory in the name space of the respective
objects would resolve that.  I am not sure about SIDL, but
it might actually be an unclean point in the specification
right now as well.

As a side note, related to yesterdays question about what
object should have the task model implemented: it might be
best to include a marker interface, and to tag those objects
in the spec.  Thats the most explicit way I can think of
right now.

Comments, as usually, welcome...  Very much so actually...

Andre.

-- 
+-----------------------------------------------------------------+
| Andre Merzky                      | phon: +31 - 20 - 598 - 7759 |
| Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
| Dept. of Computer Science         | mail: merzky at cs.vu.nl       |
| De Boelelaan 1083a                | www:  http://www.merzky.net |
| 1081 HV Amsterdam, Netherlands    |                             |
+-----------------------------------------------------------------+





More information about the saga-rg mailing list