GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GEventCube.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GEventCube.cpp - Abstract event bin container class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2009-2011 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 GEventCube.cpp
23  * @brief Abstract event bin container class implementation
24  * @author Juergen Knoedlseder
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GEventCube.hpp"
32 
33 /* __ Method name definitions ____________________________________________ */
34 
35 /* __ Macros _____________________________________________________________ */
36 
37 /* __ Coding definitions _________________________________________________ */
38 
39 /* __ Debug definitions __________________________________________________ */
40 
41 
42 /*==========================================================================
43  = =
44  = Constructors/destructors =
45  = =
46  ==========================================================================*/
47 
48 /***********************************************************************//**
49  * @brief Void constructor
50  ***************************************************************************/
52 {
53  // Initialise members
54  init_members();
55 
56  // Return
57  return;
58 }
59 
60 
61 /***********************************************************************//**
62  * @brief Copy constructor
63  *
64  * @param[in] cube Event cube.
65  ***************************************************************************/
67 {
68  // Initialise members
69  init_members();
70 
71  // Copy members
72  copy_members(cube);
73 
74  // Return
75  return;
76 }
77 
78 
79 /***********************************************************************//**
80  * @brief Destructor
81  ***************************************************************************/
83 {
84  // Free members
85  free_members();
86 
87  // Return
88  return;
89 }
90 
91 
92 /*==========================================================================
93  = =
94  = Operators =
95  = =
96  ==========================================================================*/
97 
98 /***********************************************************************//**
99  * @brief Assignment operator
100  *
101  * @param[in] cube Event cube.
102  * @return Event cube.
103  ***************************************************************************/
105 {
106  // Execute only if object is not identical
107  if (this != &cube) {
108 
109  // Copy base class members
110  this->GEvents::operator=(cube);
111 
112  // Free members
113  free_members();
114 
115  // Initialise members
116  init_members();
117 
118  // Copy members
119  copy_members(cube);
120 
121  } // endif: object was not identical
122 
123  // Return this object
124  return *this;
125 }
126 
127 
128 /*==========================================================================
129  = =
130  = Public methods =
131  = =
132  ==========================================================================*/
133 
134 /*==========================================================================
135  = =
136  = Private methods =
137  = =
138  ==========================================================================*/
139 
140 /***********************************************************************//**
141  * @brief Initialise class members
142  ***************************************************************************/
144 {
145  // Return
146  return;
147 }
148 
149 
150 /***********************************************************************//**
151  * @brief Copy class members
152  *
153  * @param[in] cube Event cube.
154  ***************************************************************************/
156 {
157  // Return
158  return;
159 }
160 
161 
162 /***********************************************************************//**
163  * @brief Delete class members
164  ***************************************************************************/
166 {
167  // Return
168  return;
169 }
void init_members(void)
Initialise class members.
Definition: GEventCube.cpp:143
void free_members(void)
Delete class members.
Definition: GEventCube.cpp:165
virtual GEventCube & operator=(const GEventCube &cube)
Assignment operator.
Definition: GEventCube.cpp:104
Abstract event bin container class interface definition.
virtual GEvents & operator=(const GEvents &events)
Assignment operator.
Definition: GEvents.cpp:104
virtual ~GEventCube(void)
Destructor.
Definition: GEventCube.cpp:82
Abstract event container class.
Definition: GEvents.hpp:66
GEventCube(void)
Void constructor.
Definition: GEventCube.cpp:51
Abstract event bin container class.
Definition: GEventCube.hpp:46
void copy_members(const GEventCube &cube)
Copy class members.
Definition: GEventCube.cpp:155