From b15072d40736495cd47f5fde78033eb020ff108b Mon Sep 17 00:00:00 2001 From: knodlseder <> Date: Mon, 7 Jun 2010 21:40:45 +0000 Subject: [PATCH] add isptsource() and remove dep...() methods --- include/GModelSpatial.hpp | 14 ++++++-------- include/GModelSpatialPtsrc.hpp | 4 +--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/GModelSpatial.hpp b/include/GModelSpatial.hpp index fa727d8..7764f4d 100644 --- a/include/GModelSpatial.hpp +++ b/include/GModelSpatial.hpp @@ -29,10 +29,10 @@ * * @brief Abstract interface definition for the spatial model class. * - * This class implements the spatial component of the factorized source - * model. - * The depdir(), depeng(), and deptime() methods specify whether the spatial - * models depends on the srcDir, srcEng, and srcTime parameters. + * This class implements the spatial component of the factorized gamma-ray + * source model. Typical examples of spatial components are a point source + * or an intensity map. The method isptsource() signals of the spatial + * model is indeed a point source. ***************************************************************************/ class GModelSpatial { @@ -41,7 +41,7 @@ class GModelSpatial { public: // Constructors and destructors - GModelSpatial(void); + explicit GModelSpatial(void); GModelSpatial(const GModelSpatial& model); virtual ~GModelSpatial(); @@ -53,9 +53,7 @@ public: virtual GModelPar* par(int index) const = 0; virtual double eval(const GSkyDir& srcDir) = 0; virtual double eval_gradients(const GSkyDir& srcDir) = 0; - virtual bool depdir(void) const = 0; - virtual bool depeng(void) const = 0; - virtual bool deptime(void) const = 0; + virtual bool isptsource(void) const { return false; } protected: // Protected methods diff --git a/include/GModelSpatialPtsrc.hpp b/include/GModelSpatialPtsrc.hpp index 4793345..af58d1f 100644 --- a/include/GModelSpatialPtsrc.hpp +++ b/include/GModelSpatialPtsrc.hpp @@ -54,9 +54,7 @@ public: GModelPar* par(int index) const; double eval(const GSkyDir& srcDir); double eval_gradients(const GSkyDir& srcDir); - bool depdir(void) const { return false; } - bool depeng(void) const { return true; } - bool deptime(void) const { return true; } + bool isptsource(void) const { return true; } double ra(void) const { return m_ra.real_value(); } double dec(void) const { return m_dec.real_value(); } -- libgit2 0.21.4