Commit c1e8a27749d54ed9d8209c47d70541ac41b1fbaa
Merge branch 'integration' into devel
Showing
3 changed files
with
36 additions
and
8 deletions
.gitignore
pyext/GApplication.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GApplication.i - GammaLib application base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2015 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2016 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -38,6 +38,9 @@ |
| 38 | 38 | * @class GApplication |
| 39 | 39 | * |
| 40 | 40 | * @brief GammaLib application Python interface definition. |
| 41 | + * | |
| 42 | + * The GApplication class is the base class for all tools and scripts that | |
| 43 | + * will be based on GammaLib. | |
| 41 | 44 | ***************************************************************************/ |
| 42 | 45 | class GApplication : public GBase { |
| 43 | 46 | public: |
| ... | ... | @@ -49,6 +52,31 @@ public: |
| 49 | 52 | GApplication(const GApplication& app); |
| 50 | 53 | ~GApplication(void); |
| 51 | 54 | |
| 55 | + // Ignore base class methods and make methods private in Python by | |
| 56 | + // prepending an underscore | |
| 57 | + %ignore clear(); | |
| 58 | + %ignore clone() const; | |
| 59 | + %ignore classname() const; | |
| 60 | + %rename(_name) name() const; | |
| 61 | + %rename(_version) version() const; | |
| 62 | + %rename(_telapse) telapse() const; | |
| 63 | + %rename(_celapse) celapse() const; | |
| 64 | + %rename(_logFileOpen) logFileOpen(const bool& clobber = true); | |
| 65 | + %rename(_logTerse) logTerse() const; | |
| 66 | + %rename(_logNormal) logNormal() const; | |
| 67 | + %rename(_logExplicit) logExplicit() const; | |
| 68 | + %rename(_logVerbose) logVerbose() const; | |
| 69 | + %rename(_logDebug) logDebug() const; | |
| 70 | + %rename(_clobber) clobber() const; | |
| 71 | + %rename(_has_par) has_par(const std::string& name) const; | |
| 72 | + %rename(_par_filename) par_filename() const; | |
| 73 | + %rename(_log_filename) log_filename() const; | |
| 74 | + %rename(_log_header) log_header(); | |
| 75 | + %rename(_log_trailer) log_trailer(); | |
| 76 | + %rename(_log_parameters) log_parameters(); | |
| 77 | + %rename(_need_help) need_help() const; | |
| 78 | + %rename(_log) log; | |
| 79 | + | |
| 52 | 80 | // Methods |
| 53 | 81 | void clear(void); |
| 54 | 82 | GApplication* clone(void) const; | ... | ... |
pyext/GBase.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GBase.i - GammaLib base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2012-2015 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2012-2016 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -35,10 +35,10 @@ |
| 35 | 35 | * |
| 36 | 36 | * @brief Interface class for all GammaLib classes |
| 37 | 37 | * |
| 38 | - * This class defines the interface for all GammaLib classes. It is an | |
| 39 | - * abstract base class from which all other GammaLib classes will be | |
| 40 | - * derived. The interface class imposes on all GammaLib classes to | |
| 41 | - * implement the following methods: | |
| 38 | + * The GBase class defines the interface for all GammaLib classes. It is an | |
| 39 | + * abstract base class from which most GammaLib classes will be derived. The | |
| 40 | + * interface class imposes on all GammaLib classes the implementation of the | |
| 41 | + * following methods: | |
| 42 | 42 | * |
| 43 | 43 | * clear() Sets the object to a clean initial state |
| 44 | 44 | * |
| ... | ... | @@ -50,7 +50,7 @@ class GBase { |
| 50 | 50 | public: |
| 51 | 51 | // Constructors and destructors |
| 52 | 52 | virtual ~GBase(void); |
| 53 | - | |
| 53 | + | |
| 54 | 54 | // Methods |
| 55 | 55 | virtual void clear(void) = 0; |
| 56 | 56 | virtual GBase* clone(void) const = 0; | ... | ... |