Commit 2fb4a4d5ad2e37a210d8a7b6d16f5258f6e3cb2b

Authored by Jürgen Knödlseder
1 parent a9fe4e11

Rename class GTPLClass into GTPLBase

dev/codegen.py
... ... @@ -202,10 +202,9 @@ def set_class_tokens(classname, author, what, object):
202 202 year = str(date.today().year)
203 203  
204 204 # Set tokens
205   - tokens = [{'pattern': 'GTPLClass', 'string': classname},
206   - {'pattern': 'GTPLCLASS', 'string': classname.upper()},
  205 + tokens = [{'pattern': 'GTPLBase', 'string': classname},
  206 + {'pattern': 'GTPLBASE', 'string': classname.upper()},
207 207 {'pattern': '[WHAT]', 'string': what},
208   - {'pattern': '[what]', 'string': what.lower()},
209 208 {'pattern': '[AUTHOR]', 'string': author},
210 209 {'pattern': 'TPL_OBJECT', 'string': object.lower()},
211 210 {'pattern': '[YEAR]', 'string': year}]
... ... @@ -668,7 +667,7 @@ def generic_class_menu():
668 667 # If we have an instrument model then add a class to the instrument
669 668 if 'inst/' in dir:
670 669 name = dir[5:8]
671   - add_instrument_class(name, tokens, classname, 'GTPLClass')
  670 + add_instrument_class(name, tokens, classname, 'GTPLBase')
672 671  
673 672 # Otherwise we have a core module
674 673 else:
... ...
src/template/GTPLClass.cpp renamed to src/template/GTPLBase.cpp
1 1 /***************************************************************************
2   - * GTPLClass.cpp - [WHAT] class *
  2 + * GTPLBase.cpp - [WHAT] class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) [YEAR] by [AUTHOR] *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,7 +19,7 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GTPLClass.cpp
  22 + * @file GTPLBase.cpp
23 23 * @brief [WHAT] class implementation
24 24 * @author [AUTHOR]
25 25 */
... ... @@ -28,7 +28,7 @@
28 28 #ifdef HAVE_CONFIG_H
29 29 #include <config.h>
30 30 #endif
31   -#include "GTPLClass.hpp"
  31 +#include "GTPLBase.hpp"
32 32  
33 33 /* __ Method name definitions ____________________________________________ */
34 34  
... ... @@ -49,7 +49,7 @@
49 49 /***********************************************************************//**
50 50 * @brief Void constructor
51 51 ***************************************************************************/
52   -GTPLClass::GTPLClass(void)
  52 +GTPLBase::GTPLBase(void)
53 53 {
54 54 // Initialise class members
55 55 init_members();
... ... @@ -64,7 +64,7 @@ GTPLClass::GTPLClass(void)
64 64 *
65 65 * @param[in] TPL_OBJECT [WHAT].
66 66 ***************************************************************************/
67   -GTPLClass::GTPLClass(const GTPLClass& TPL_OBJECT)
  67 +GTPLBase::GTPLBase(const GTPLBase& TPL_OBJECT)
68 68 {
69 69 // Initialise class members
70 70 init_members();
... ... @@ -80,7 +80,7 @@ GTPLClass::GTPLClass(const GTPLClass&amp; TPL_OBJECT)
80 80 /***********************************************************************//**
81 81 * @brief Destructor
82 82 ***************************************************************************/
83   -GTPLClass::~GTPLClass(void)
  83 +GTPLBase::~GTPLBase(void)
84 84 {
85 85 // Free members
86 86 free_members();
... ... @@ -102,7 +102,7 @@ GTPLClass::~GTPLClass(void)
102 102 * @param[in] TPL_OBJECT [WHAT].
103 103 * @return [WHAT].
104 104 ***************************************************************************/
105   -GTPLClass& GTPLClass::operator=(const GTPLClass& TPL_OBJECT)
  105 +GTPLBase& GTPLBase::operator=(const GTPLBase& TPL_OBJECT)
106 106 {
107 107 // Execute only if object is not identical
108 108 if (this != &TPL_OBJECT) {
... ... @@ -132,7 +132,7 @@ GTPLClass&amp; GTPLClass::operator=(const GTPLClass&amp; TPL_OBJECT)
132 132 /***********************************************************************//**
133 133 * @brief Clear [WHAT]
134 134 ***************************************************************************/
135   -void GTPLClass::clear(void)
  135 +void GTPLBase::clear(void)
136 136 {
137 137 // Free members
138 138 free_members();
... ... @@ -150,9 +150,9 @@ void GTPLClass::clear(void)
150 150 *
151 151 * @return Pointer to deep copy of [WHAT].
152 152 ***************************************************************************/
153   -GTPLClass* GTPLClass::clone(void) const
  153 +GTPLBase* GTPLBase::clone(void) const
154 154 {
155   - return new GTPLClass(*this);
  155 + return new GTPLBase(*this);
156 156 }
157 157  
158 158  
... ... @@ -164,7 +164,7 @@ GTPLClass* GTPLClass::clone(void) const
164 164 *
165 165 * @todo Implement method.
166 166 ***************************************************************************/
167   -std::string GTPLClass::print(const GChatter& chatter) const
  167 +std::string GTPLBase::print(const GChatter& chatter) const
168 168 {
169 169 // Initialise result string
170 170 std::string result;
... ... @@ -173,7 +173,7 @@ std::string GTPLClass::print(const GChatter&amp; chatter) const
173 173 if (chatter != SILENT) {
174 174  
175 175 // Append header
176   - result.append("=== GTPLClass ===");
  176 + result.append("=== GTPLBase ===");
177 177  
178 178 // Append information
179 179 // TODO: Add any relevant information
... ... @@ -194,7 +194,7 @@ std::string GTPLClass::print(const GChatter&amp; chatter) const
194 194 /***********************************************************************//**
195 195 * @brief Initialise class members
196 196 ***************************************************************************/
197   -void GTPLClass::init_members(void)
  197 +void GTPLBase::init_members(void)
198 198 {
199 199 // Initialise members
200 200 // TODO: Initialise all data members
... ... @@ -209,7 +209,7 @@ void GTPLClass::init_members(void)
209 209 *
210 210 * @param[in] TPL_OBJECT [WHAT].
211 211 ***************************************************************************/
212   -void GTPLClass::copy_members(const GTPLClass& TPL_OBJECT)
  212 +void GTPLBase::copy_members(const GTPLBase& TPL_OBJECT)
213 213 {
214 214 // Copy members
215 215 // TODO: Copy all data members
... ... @@ -222,7 +222,7 @@ void GTPLClass::copy_members(const GTPLClass&amp; TPL_OBJECT)
222 222 /***********************************************************************//**
223 223 * @brief Delete class members
224 224 ***************************************************************************/
225   -void GTPLClass::free_members(void)
  225 +void GTPLBase::free_members(void)
226 226 {
227 227 // Return
228 228 return;
... ...
src/template/GTPLClass.hpp renamed to src/template/GTPLBase.hpp
1 1 /***************************************************************************
2   - * GTPLClass.hpp - [WHAT] class *
  2 + * GTPLBase.hpp - [WHAT] class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) [YEAR] by [AUTHOR] *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,13 +19,13 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GTPLClass.hpp
  22 + * @file GTPLBase.hpp
23 23 * @brief [WHAT] class definition
24 24 * @author [AUTHOR]
25 25 */
26 26  
27   -#ifndef GTPLCLASS_HPP
28   -#define GTPLCLASS_HPP
  27 +#ifndef GTPLBASE_HPP
  28 +#define GTPLBASE_HPP
29 29  
30 30 /* __ Includes ___________________________________________________________ */
31 31 #include <string>
... ... @@ -37,26 +37,26 @@
37 37  
38 38  
39 39 /***********************************************************************//**
40   - * @class GTPLClass
  40 + * @class GTPLBase
41 41 *
42 42 * @brief [WHAT] class
43 43 *
44 44 * @todo Add class description.
45 45 ***************************************************************************/
46   -class GTPLClass : public GBase {
  46 +class GTPLBase : public GBase {
47 47  
48 48 public:
49 49 // Constructors and destructors
50   - GTPLClass(void);
51   - GTPLClass(const GTPLClass& TPL_OBJECT);
52   - virtual ~GTPLClass(void);
  50 + GTPLBase(void);
  51 + GTPLBase(const GTPLBase& TPL_OBJECT);
  52 + virtual ~GTPLBase(void);
53 53  
54 54 // Operators
55   - GTPLClass& operator=(const GTPLClass& TPL_OBJECT);
  55 + GTPLBase& operator=(const GTPLBase& TPL_OBJECT);
56 56  
57 57 // Implemented pure virtual base class methods
58 58 virtual void clear(void);
59   - virtual GTPLClass* clone(void) const;
  59 + virtual GTPLBase* clone(void) const;
60 60 virtual std::string classname(void) const;
61 61 virtual std::string print(const GChatter& chatter = NORMAL) const;
62 62  
... ... @@ -66,7 +66,7 @@ public:
66 66 protected:
67 67 // Protected methods
68 68 void init_members(void);
69   - void copy_members(const GTPLClass& TPL_OBJECT);
  69 + void copy_members(const GTPLBase& TPL_OBJECT);
70 70 void free_members(void);
71 71  
72 72 // Protected members
... ... @@ -77,12 +77,12 @@ protected:
77 77 /***********************************************************************//**
78 78 * @brief Return class name
79 79 *
80   - * @return String containing the class name ("GTPLClass").
  80 + * @return String containing the class name ("GTPLBase").
81 81 ***************************************************************************/
82 82 inline
83   -std::string GTPLClass::classname(void) const
  83 +std::string GTPLBase::classname(void) const
84 84 {
85   - return ("GTPLClass");
  85 + return ("GTPLBase");
86 86 }
87 87  
88   -#endif /* GTPLCLASS_HPP */
  88 +#endif /* GTPLBASE_HPP */
... ...
src/template/GTPLClass.i renamed to src/template/GTPLBase.i
1 1 /***************************************************************************
2   - * GTPLClass.i - [WHAT] class *
  2 + * GTPLBase.i - [WHAT] class *
3 3 * ----------------------------------------------------------------------- *
4 4 * copyright (C) [YEAR] by [AUTHOR] *
5 5 * ----------------------------------------------------------------------- *
... ... @@ -19,43 +19,43 @@
19 19 * *
20 20 ***************************************************************************/
21 21 /**
22   - * @file GTPLClass.i
  22 + * @file GTPLBase.i
23 23 * @brief [WHAT] class definition
24 24 * @author [AUTHOR]
25 25 */
26 26 %{
27 27 /* Put headers and other declarations here that are needed for compilation */
28   -#include "GTPLClass.hpp"
  28 +#include "GTPLBase.hpp"
29 29 %}
30 30  
31 31  
32 32 /***********************************************************************//**
33   - * @class GTPLClass
  33 + * @class GTPLBase
34 34 *
35 35 * @brief [WHAT] class
36 36 ***************************************************************************/
37   -class GTPLClass : public GBase {
  37 +class GTPLBase : public GBase {
38 38  
39 39 public:
40 40 // Constructors and destructors
41   - GTPLClass(void);
42   - GTPLClass(const GTPLClass& TPL_OBJECT);
43   - virtual ~GTPLClass(void);
  41 + GTPLBase(void);
  42 + GTPLBase(const GTPLBase& TPL_OBJECT);
  43 + virtual ~GTPLBase(void);
44 44  
45 45 // Implemented pure virtual base class methods
46 46 virtual void clear(void);
47   - virtual GTPLClass* clone(void) const;
  47 + virtual GTPLBase* clone(void) const;
48 48  
49 49 // Other methods
50   - // TODO: Copy methods from GTPLClass.hpp file
  50 + // TODO: Copy methods from GTPLBase.hpp file
51 51 };
52 52  
53 53  
54 54 /***********************************************************************//**
55   - * @brief GTPLClass class extension
  55 + * @brief GTPLBase class extension
56 56 ***************************************************************************/
57   -%extend GTPLClass {
58   - GTPLClass copy() {
  57 +%extend GTPLBase {
  58 + GTPLBase copy() {
59 59 return (*self);
60 60 }
61 61 };
... ...