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