Commit a4521c676572c5d94fa07805585cff763698a6c1
1 parent
1e0d119b
GApplicationPar::filename() methods now handle GFilename objects instead of std::string.
Showing
5 changed files
with
16 additions
and
13 deletions
ChangeLog
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | * Version 1.1.0 released |
| 4 | 4 | ========================= |
| 5 | 5 | |
| 6 | + The GApplicationPar::filename() methods now take and return GFilename (#1671) | |
| 6 | 7 | Add GFilename methods and remove equivalents from GTools (#1666) |
| 7 | 8 | Use column names for CTA response table access (#1656) |
| 8 | 9 | Add non-const GObservation::events() method (#1664) | ... | ... |
NEWS
| ... | ... | @@ -41,6 +41,7 @@ The following methods have been renamed: |
| 41 | 41 | |
| 42 | 42 | The following classes now use GFilename for filenames arguments instead |
| 43 | 43 | of std::string: |
| 44 | +- GApplicationPar | |
| 44 | 45 | - GApplicationPars |
| 45 | 46 | - GArf |
| 46 | 47 | - GCsv |
| ... | ... | @@ -84,7 +85,8 @@ None |
| 84 | 85 | |
| 85 | 86 | 4. Application module |
| 86 | 87 | --------------------- |
| 87 | -None | |
| 88 | +The GApplicationPar::filename() methods now take and return GFilename objects | |
| 89 | +instead of std::string objects (#1671). | |
| 88 | 90 | |
| 89 | 91 | |
| 90 | 92 | 5. Base module | ... | ... |
include/GApplicationPar.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GApplicationPar.hpp - Application parameter 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 * |
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | /* __ Includes ___________________________________________________________ */ |
| 31 | 31 | #include <string> |
| 32 | 32 | #include "GBase.hpp" |
| 33 | +#include "GFilename.hpp" | |
| 33 | 34 | |
| 34 | 35 | |
| 35 | 36 | /***********************************************************************//** |
| ... | ... | @@ -64,7 +65,7 @@ public: |
| 64 | 65 | void mode(const std::string& mode); |
| 65 | 66 | void value(const std::string& value); |
| 66 | 67 | void string(const std::string& value); |
| 67 | - void filename(const std::string& value); | |
| 68 | + void filename(const GFilename& value); | |
| 68 | 69 | void boolean(const bool& value); |
| 69 | 70 | void integer(const int& value); |
| 70 | 71 | void real(const double& value); |
| ... | ... | @@ -73,7 +74,7 @@ public: |
| 73 | 74 | const std::string& mode(void) const; |
| 74 | 75 | std::string value(void); |
| 75 | 76 | std::string string(void); |
| 76 | - std::string filename(void); | |
| 77 | + GFilename filename(void); | |
| 77 | 78 | bool boolean(void); |
| 78 | 79 | int integer(void); |
| 79 | 80 | double real(void); | ... | ... |
pyext/GApplicationPar.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GApplicationPar.i - Application parameter 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 * |
| ... | ... | @@ -26,7 +26,6 @@ |
| 26 | 26 | %{ |
| 27 | 27 | /* Put headers and other declarations here that are needed for compilation */ |
| 28 | 28 | #include "GApplicationPar.hpp" |
| 29 | -#include "GTools.hpp" | |
| 30 | 29 | %} |
| 31 | 30 | |
| 32 | 31 | |
| ... | ... | @@ -54,7 +53,7 @@ public: |
| 54 | 53 | void mode(const std::string& mode); |
| 55 | 54 | void value(const std::string& value); |
| 56 | 55 | void string(const std::string& value); |
| 57 | - void filename(const std::string& value); | |
| 56 | + void filename(const GFilename& value); | |
| 58 | 57 | void boolean(const bool& value); |
| 59 | 58 | void integer(const int& value); |
| 60 | 59 | void real(const double& value); |
| ... | ... | @@ -63,7 +62,7 @@ public: |
| 63 | 62 | const std::string& mode(void) const; |
| 64 | 63 | std::string value(void); |
| 65 | 64 | std::string string(void); |
| 66 | - std::string filename(void); | |
| 65 | + GFilename filename(void); | |
| 67 | 66 | bool boolean(void); |
| 68 | 67 | int integer(void); |
| 69 | 68 | double real(void); | ... | ... |
src/app/GApplicationPar.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GApplicationPar.cpp - Application parameter * |
| 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 * |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | |
| 40 | 40 | /* __ Method name definitions ____________________________________________ */ |
| 41 | 41 | #define G_STRING_SET "GApplicationPar::string(std::string&)" |
| 42 | -#define G_FILENAME_SET "GApplicationPar::filename(std::string&)" | |
| 42 | +#define G_FILENAME_SET "GApplicationPar::filename(GFilename&)" | |
| 43 | 43 | #define G_BOOLEAN_SET "GApplicationPar::boolean(bool&)" |
| 44 | 44 | #define G_INTEGER_SET "GApplicationPar::integer(int&)" |
| 45 | 45 | #define G_REAL_SET "GApplicationPar::real(double&)" |
| ... | ... | @@ -315,7 +315,7 @@ void GApplicationPar::string(const std::string& value) |
| 315 | 315 | * This method sets a filename parameter. The method only applies to filename |
| 316 | 316 | * parameters. Other parameter types will produce an exception. |
| 317 | 317 | ***************************************************************************/ |
| 318 | -void GApplicationPar::filename(const std::string& value) | |
| 318 | +void GApplicationPar::filename(const GFilename& value) | |
| 319 | 319 | { |
| 320 | 320 | // Check if parameter is a filename parameter |
| 321 | 321 | if (!is_filename()) { |
| ... | ... | @@ -497,7 +497,7 @@ std::string GApplicationPar::string(void) |
| 497 | 497 | * exception. Any environment variables that are encountered within the |
| 498 | 498 | * filename are expanded automatically. |
| 499 | 499 | ***************************************************************************/ |
| 500 | -std::string GApplicationPar::filename(void) | |
| 500 | +GFilename GApplicationPar::filename(void) | |
| 501 | 501 | { |
| 502 | 502 | // Check if parameter is a filename parameter |
| 503 | 503 | if (!is_filename()) { |
| ... | ... | @@ -518,7 +518,7 @@ std::string GApplicationPar::filename(void) |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | // Return value |
| 521 | - return (gammalib::expand_env(m_value)); | |
| 521 | + return (GFilename(m_value)); | |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | ... | ... |