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