GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GInstDir.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GInstDir.hpp - Abstract instrument direction base class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2010-2020 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.hpp
23  * @brief Abstract instrument direction base class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GINSTDIR_HPP
28 #define GINSTDIR_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include <sys/types.h>
33 #if defined(__sun) && (defined(__svr4__) || defined(__SVR4)) // SOLARIS
34  typedef uint64_t u_int64_t;
35 #endif // SOLARIS
36 #include "GBase.hpp"
37 
38 
39 /***********************************************************************//**
40  * @class GInstDir
41  *
42  * @brief Abstract instrument direction base class
43  *
44  * The instrument direction of an event is the equivalent of the sky
45  * direction (implemented by GSkyDir) but in the instrument data space.
46  * The instrument direction may be any kind of position or direction
47  * information encoded in the data space, such as incident event
48  * reconstructions for imaging devices or detector numbers etc. for
49  * non-imaging devices.
50  ***************************************************************************/
51 class GInstDir : public GBase {
52 
53 public:
54  // Constructors and destructors
55  GInstDir(void);
56  GInstDir(const GInstDir& dir);
57  virtual ~GInstDir(void);
58 
59  // Operators
60  virtual GInstDir& operator=(const GInstDir& dir);
61 
62  // Pure virtual methods
63  virtual void clear(void) = 0;
64  virtual GInstDir* clone(void) const = 0;
65  virtual std::string classname(void) const = 0;
66  virtual u_int64_t hash(void) const = 0;
67  virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
68 
69 protected:
70  // Protected methods
71  void init_members(void);
72  void copy_members(const GInstDir& dir);
73  void free_members(void);
74 };
75 
76 #endif /* GINSTDIR_HPP */
virtual void clear(void)=0
Clear object.
Definition of interface for all GammaLib classes.
virtual GInstDir & operator=(const GInstDir &dir)
Assignment operator.
Definition: GInstDir.cpp:105
void free_members(void)
Delete class members.
Definition: GInstDir.cpp:163
virtual GInstDir * clone(void) const =0
Clones object.
Abstract instrument direction base class.
Definition: GInstDir.hpp:51
virtual u_int64_t hash(void) const =0
Interface class for all GammaLib classes.
Definition: GBase.hpp:52
GChatter
Definition: GTypemaps.hpp:33
virtual ~GInstDir(void)
Destructor.
Definition: GInstDir.cpp:83
void init_members(void)
Initialise class members.
Definition: GInstDir.cpp:141
virtual std::string classname(void) const =0
Return class name.
GInstDir(void)
Void constructor.
Definition: GInstDir.cpp:52
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
void copy_members(const GInstDir &dir)
Copy class members.
Definition: GInstDir.cpp:153