GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GModelSpatialDiffuse.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GModelSpatialDiffuse.cpp - Abstract diffuse spatial model base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 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 GModelSpatialDiffuse.cpp
23  * @brief Abstract diffuse spatial model base class implementation
24  * @author Juergen Knoedlseder
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GException.hpp"
32 #include "GModelSpatialDiffuse.hpp"
33 
34 /* __ Method name definitions ____________________________________________ */
35 
36 /* __ Macros _____________________________________________________________ */
37 
38 /* __ Coding definitions _________________________________________________ */
39 
40 /* __ Debug definitions __________________________________________________ */
41 
42 
43 /*==========================================================================
44  = =
45  = Constructors/destructors =
46  = =
47  ==========================================================================*/
48 
49 /***********************************************************************//**
50  * @brief Void constructor
51  ***************************************************************************/
53 {
54  // Initialise members
55  init_members();
56 
57  // Return
58  return;
59 }
60 
61 
62 /***********************************************************************//**
63  * @brief Copy constructor
64  *
65  * @param[in] model Diffuse spatial model.
66  ***************************************************************************/
68  GModelSpatial(model)
69 {
70  // Initialise members
71  init_members();
72 
73  // Copy members
74  copy_members(model);
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] model Diffuse spatial model.
104  * @return Diffuse spatial model.
105  ***************************************************************************/
107 {
108  // Execute only if object is not identical
109  if (this != &model) {
110 
111  // Copy base class members
112  this->GModelSpatial::operator=(model);
113 
114  // Free members
115  free_members();
116 
117  // Initialise members
118  init_members();
119 
120  // Copy members
121  copy_members(model);
122 
123  } // endif: object was not identical
124 
125  // Return
126  return *this;
127 }
128 
129 
130 /*==========================================================================
131  = =
132  = Public methods =
133  = =
134  ==========================================================================*/
135 
136 
137 /*==========================================================================
138  = =
139  = Private methods =
140  = =
141  ==========================================================================*/
142 
143 /***********************************************************************//**
144  * @brief Initialise class members
145  ***************************************************************************/
147 {
148  // Return
149  return;
150 }
151 
152 
153 /***********************************************************************//**
154  * @brief Copy class members
155  *
156  * @param[in] model Diffuse spatial model.
157  ***************************************************************************/
159 {
160  // Return
161  return;
162 }
163 
164 
165 /***********************************************************************//**
166  * @brief Delete class members
167  ***************************************************************************/
169 {
170  // Return
171  return;
172 }
GModelSpatialDiffuse(void)
Void constructor.
virtual GModelSpatial & operator=(const GModelSpatial &model)
Assignment operator.
void copy_members(const GModelSpatialDiffuse &model)
Copy class members.
void init_members(void)
Initialise class members.
virtual GModelSpatialDiffuse & operator=(const GModelSpatialDiffuse &model)
Assignment operator.
Abstract diffuse spatial model base class interface definition.
void free_members(void)
Delete class members.
Exception handler interface definition.
Abstract spatial model base class.
Abstract diffuse spatial model base class.
virtual ~GModelSpatialDiffuse(void)
Destructor.