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