GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTACubeSource.cpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCTACubeSource.cpp - Abstract CTA cube analysis source base class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2014-2015 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 GCTACubeSource.cpp
23 * @brief Abstract CTA cube analysis source base class implementation
24 * @author Juergen Knoedlseder
25 */
26
27/* __ Includes ___________________________________________________________ */
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31#include "GCTACubeSource.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
57
58 // Return
59 return;
60}
61
62
63/***********************************************************************//**
64 * @brief Copy constructor
65 *
66 * @param[in] source Cube analysis source.
67 ***************************************************************************/
69{
70 // Initialise class members
72
73 // Copy members
74 copy_members(source);
75
76 // Return
77 return;
78}
79
80
81/***********************************************************************//**
82 * @brief Destructor
83 ***************************************************************************/
85{
86 // 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] source Cube analysis source.
104 * @return Cube analysis source.
105 ***************************************************************************/
107{
108 // Execute only if object is not identical
109 if (this != &source) {
110
111 // Free members
112 free_members();
113
114 // Initialise private members
115 init_members();
116
117 // Copy members
118 copy_members(source);
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 = =
136 = Private methods =
137 = =
138 ==========================================================================*/
139
140/***********************************************************************//**
141 * @brief Initialise class members
142 ***************************************************************************/
144{
145 // Initialise members
146 m_name.clear();
147
148 // Return
149 return;
150}
151
152
153/***********************************************************************//**
154 * @brief Copy class members
155 *
156 * @param[in] source Cube analysis source.
157 ***************************************************************************/
159{
160 // Copy members
161 m_name = source.m_name;
162
163 // Return
164 return;
165}
166
167/***********************************************************************//**
168 * @brief Delete class members
169 ***************************************************************************/
171{
172 // Return
173 return;
174}
Abstract CTA cube analysis source base class definition.
CTA source cube base class.
virtual GCTACubeSource & operator=(const GCTACubeSource &source)
Assignment operator.
std::string m_name
Unique source name.
void copy_members(const GCTACubeSource &source)
Copy class members.
GCTACubeSource(void)
Void constructor.
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
virtual ~GCTACubeSource(void)
Destructor.