GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAEdisp.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCTAEdisp.cpp - Abstract CTA energy dispersion base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2012-2013 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GCTAEdisp.hpp
23  * @brief Abstract CTA energy dispersion base class implementation
24  * @author Juergen Knoedlseder
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GCTAEdisp.hpp"
32 
33 /* __ Method name definitions ____________________________________________ */
34 
35 /* __ Macros _____________________________________________________________ */
36 
37 /* __ Coding definitions _________________________________________________ */
38 
39 /* __ Debug definitions __________________________________________________ */
40 
41 /* __ Constants __________________________________________________________ */
42 
43 
44 /*==========================================================================
45  = =
46  = Constructors/destructors =
47  = =
48  ==========================================================================*/
49 
50 /***********************************************************************//**
51  * @brief Void constructor
52  ***************************************************************************/
54 {
55  // Initialise class members
56  init_members();
57 
58  // Return
59  return;
60 }
61 
62 
63 /***********************************************************************//**
64  * @brief Copy constructor
65  *
66  * @param[in] edisp Energy dispersion.
67  ***************************************************************************/
69 {
70  // Initialise class members
71  init_members();
72 
73  // Copy members
74  copy_members(edisp);
75 
76  // Return
77  return;
78 }
79 
80 
81 /***********************************************************************//**
82  * @brief Destructor
83  ***************************************************************************/
85 {
86  // Free members
87  free_members();
88 
89  // Return
90  return;
91 }
92 
93 
94 /*==========================================================================
95  = =
96  = Operators =
97  = =
98  ==========================================================================*/
99 
100 /***********************************************************************//**
101  * @brief Assignment operator
102  *
103  * @param[in] edisp Energy dispersion.
104  * @return Energy dispersion.
105  ***************************************************************************/
107 {
108  // Execute only if object is not identical
109  if (this != &edisp) {
110 
111  // Free members
112  free_members();
113 
114  // Initialise private members
115  init_members();
116 
117  // Copy members
118  copy_members(edisp);
119 
120  } // endif: object was not identical
121 
122  // Return this object
123  return *this;
124 }
125 
126 
127 /*==========================================================================
128  = =
129  = Public methods =
130  = =
131  ==========================================================================*/
132 
133 /*==========================================================================
134  = =
135  = Private methods =
136  = =
137  ==========================================================================*/
138 
139 /***********************************************************************//**
140  * @brief Initialise class members
141  ***************************************************************************/
143 {
144  // Return
145  return;
146 }
147 
148 
149 /***********************************************************************//**
150  * @brief Copy class members
151  *
152  * @param[in] edisp Energy dispersion.
153  ***************************************************************************/
155 {
156  // Return
157  return;
158 }
159 
160 
161 /***********************************************************************//**
162  * @brief Delete class members
163  ***************************************************************************/
165 {
166  // Return
167  return;
168 }
void free_members(void)
Delete class members.
Definition: GCTAEdisp.cpp:164
Abstract base class for the CTA energy dispersion.
Definition: GCTAEdisp.hpp:49
void copy_members(const GCTAEdisp &edisp)
Copy class members.
Definition: GCTAEdisp.cpp:154
virtual ~GCTAEdisp(void)
Destructor.
Definition: GCTAEdisp.cpp:84
Abstract CTA energy dispersion base class definition.
GCTAEdisp & operator=(const GCTAEdisp &edisp)
Assignment operator.
Definition: GCTAEdisp.cpp:106
void init_members(void)
Initialise class members.
Definition: GCTAEdisp.cpp:142
GCTAEdisp(void)
Void constructor.
Definition: GCTAEdisp.cpp:53