Change request #563

Derive all GammaLib classes from GBase

Added by Knödlseder Jürgen over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:10/13/2012
Priority:HighDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

An interface class GBase should be introduced from which all other GammaLib classes derive. This makes sure that all GammaLib classes implement the required interfaces.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

Here the list of classes for which GBase is not (yet) used:

Not yet used as we may introduce a generic GRegistry base class:
GModelRegistry.hpp (clone & clear missing)
GModelSpatialRegistry.hpp (clone & clear missing)
GModelSpectralRegistry.hpp (clone & clear missing)
GModelTemporalRegistry.hpp (clone & clear missing)
GObservationRegistry.hpp (clone & clear missing)
GWcsRegistry.hpp (clone & clear missing)

The following classes will not derive from GBase:
GException.hpp
GFunction.hpp (to be discussed)
GIntegrand.hpp (to be discussed)
GOptimizerFunction.hpp (to be discussed)
GLog.hpp (to be discussed)
GTestSuite.hpp (to be discussed)

#2 Updated by Knödlseder Jürgen over 11 years ago

In principle, the friend functions used for printing can now be put in the base class. This removes quite a bunch of code !!!

#3 Updated by Knödlseder Jürgen over 11 years ago

To handle printing by the base class, a new base module has been introduced that implements the os and GLog streamers on the GBase level. We can thus proceed now to remove all the streamers from the classes.

#4 Updated by Knödlseder Jürgen over 11 years ago

I removed the ostream and GLog friends from the classes. The ostream and GLog functions are now implement on the level of the base module, and take GBase as a reference argument. Implementation at the class level is not more required.

#5 Updated by Knödlseder Jürgen over 11 years ago

  • % Done changed from 30 to 70

#6 Updated by Knödlseder Jürgen over 11 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100

Almost all GammaLib classes now derive from GBase.

Also available in: Atom PDF