GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GInstDir.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GInstDir.cpp - Abstract instrument direction base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2010-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 GInstDir.cpp
23  * @brief Abstract instrument direction class implementation
24  * @author Juergen Knoedlseder
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GInstDir.hpp"
32 
33 /* __ Method name definitions ____________________________________________ */
34 
35 /* __ Macros _____________________________________________________________ */
36 
37 /* __ Coding definitions _________________________________________________ */
38 
39 /* __ Debug definitions __________________________________________________ */
40 
41 /* __ Prototypes _________________________________________________________ */
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] dir Instrument direction.
66  ***************************************************************************/
68 {
69  // Initialise class members
70  init_members();
71 
72  // Copy members
73  copy_members(dir);
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] dir Instrument direction.
103  * @return Instrument direction.
104  ***************************************************************************/
106 {
107  // Execute only if object is not identical
108  if (this != &dir) {
109 
110  // Free members
111  free_members();
112 
113  // Initialise members
114  init_members();
115 
116  // Copy members
117  copy_members(dir);
118 
119  } // endif: object was not identical
120 
121  // Return this object
122  return *this;
123 }
124 
125 
126 /*==========================================================================
127  = =
128  = Public methods =
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] dir Instrument direction.
152  ***************************************************************************/
154 {
155  // Return
156  return;
157 }
158 
159 
160 /***********************************************************************//**
161  * @brief Delete class members
162  ***************************************************************************/
164 {
165  // Return
166  return;
167 }
Abstract instrument direction base class definition.
virtual GInstDir & operator=(const GInstDir &dir)
Assignment operator.
Definition: GInstDir.cpp:105
void free_members(void)
Delete class members.
Definition: GInstDir.cpp:163
Abstract instrument direction base class.
Definition: GInstDir.hpp:51
virtual ~GInstDir(void)
Destructor.
Definition: GInstDir.cpp:83
void init_members(void)
Initialise class members.
Definition: GInstDir.cpp:141
GInstDir(void)
Void constructor.
Definition: GInstDir.cpp:52
void copy_members(const GInstDir &dir)
Copy class members.
Definition: GInstDir.cpp:153