GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GRegistry.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GRegistry.cpp - Interface class for registries *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 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 GRegistry.cpp
23  * @brief Interface class implementation for registries
24  * @author Juergen Knoedlseder
25  */
26 
27 /* __ Includes ___________________________________________________________ */
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 #include "GRegistry.hpp"
32 #include "GLog.hpp"
33 
34 /* __ Method name definitions ____________________________________________ */
35 
36 /* __ Macros _____________________________________________________________ */
37 
38 /* __ Coding definitions _________________________________________________ */
39 
40 /* __ Debug definitions __________________________________________________ */
41 
42 
43 /*==========================================================================
44  = =
45  = Friends =
46  = =
47  ==========================================================================*/
48 
49 /***********************************************************************//**
50  * @brief Output operator
51  *
52  * @param[in] os Output stream.
53  * @param[in] registry Registry.
54  ***************************************************************************/
55 std::ostream& operator<<(std::ostream& os, const GRegistry& registry)
56 {
57  // Write registry content in output stream
58  os << registry.print();
59 
60  // Return output stream
61  return os;
62 }
63 
64 
65 /***********************************************************************//**
66  * @brief Log operator
67  *
68  * @param[in] log Logger.
69  * @param[in] registry Registry.
70  ***************************************************************************/
71 GLog& operator<<(GLog& log, const GRegistry& registry)
72 {
73  // Write registry content into logger
74  log << registry.print();
75 
76  // Return logger
77  return log;
78 }
Interface class for registries.
Definition: GRegistry.hpp:101
Information logger interface definition.
Definition: GLog.hpp:62
GVector log(const GVector &vector)
Computes natural logarithm of vector elements.
Definition: GVector.cpp:1184
std::ostream & operator<<(std::ostream &os, const GBase &base)
Output operator.
Definition: GBase.cpp:57
Information logger class definition.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
Interface class definition for registries.