GammaLib 2.0.0
Loading...
Searching...
No Matches
GEventAtom.cpp
Go to the documentation of this file.
1/***************************************************************************
2 * GEventAtom.cpp - Abstract event atom base class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2009-2013 by Jurgen Knodlseder *
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 GEventAtom.cpp
23 * @brief Abstract event atom base class implementation
24 * @author Juergen Knoedlseder
25 */
26
27/* __ Includes ___________________________________________________________ */
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31#include "GEventAtom.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 class members for clean destruction
55
56 // Return
57 return;
58}
59
60
61/***********************************************************************//**
62 * @brief Copy constructor
63 *
64 * @param[in] atom Event atom.
65 ***************************************************************************/
67{
68 // Initialise class members for clean destruction
70
71 // Copy members
72 copy_members(atom);
73
74 // Return
75 return;
76}
77
78
79/***********************************************************************//**
80 * @brief Destructor
81 ***************************************************************************/
83{
84 // 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] atom Event atom.
102 * @return Event atom.
103 ***************************************************************************/
105{
106 // Execute only if object is not identical
107 if (this != &atom) {
108
109 // Copy base class members
110 this->GEvent::operator=(atom);
111
112 // Free members
113 free_members();
114
115 // Initialise private members for clean destruction
116 init_members();
117
118 // Copy members
119 copy_members(atom);
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] atom Event atom.
154 ***************************************************************************/
156{
157 // Return
158 return;
159}
160
161
162/***********************************************************************//**
163 * @brief Delete class members
164 ***************************************************************************/
166{
167 // Return
168 return;
169}
Abstract event atom base class definition.
Abstract interface for the event atom class.
GEventAtom(void)
Void constructor.
virtual GEventAtom & operator=(const GEventAtom &atom)
Assignment operator.
virtual ~GEventAtom(void)
Destructor.
void copy_members(const GEventAtom &atom)
Copy class members.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
Abstract interface for the event classes.
Definition GEvent.hpp:71
virtual GEvent & operator=(const GEvent &event)
Assignment operator.
Definition GEvent.cpp:105