activemq-cpp-3.9.5
URIType.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DECAF_INTERNAL_NET_URITYPE_H_
19 #define _DECAF_INTERNAL_NET_URITYPE_H_
20 
21 #include <string>
22 #include <decaf/util/Config.h>
23 
24 namespace decaf {
25 namespace internal {
26 namespace net {
27 
32  private:
33 
34  std::string source;
35  std::string scheme;
36  std::string schemeSpecificPart;
37  std::string authority;
38  std::string userinfo;
39  std::string host;
40  int port;
41  std::string path;
42  std::string query;
43  std::string fragment;
44  bool opaque;
45  bool absolute;
46  bool serverAuthority;
47  bool valid;
48  int hashCode;
49 
50  public:
51 
52  URIType();
53  URIType(const std::string& source);
54 
55  virtual ~URIType();
56 
62  std::string getSource() const {
63  return this->source;
64  }
65 
71  void setSource(const std::string& source) {
72  this->source = source;
73  }
74 
79  std::string getScheme() const {
80  return scheme;
81  }
82 
87  void setScheme(const std::string& scheme) {
88  this->scheme = scheme;
89  }
90 
95  std::string getSchemeSpecificPart() const {
96  return schemeSpecificPart;
97  }
98 
103  void setSchemeSpecificPart(const std::string& schemeSpecificPart) {
104  this->schemeSpecificPart = schemeSpecificPart;
105  }
106 
111  std::string getAuthority() const {
112  return authority;
113  }
114 
119  void setAuthority(const std::string& authority) {
120  this->authority = authority;
121  }
122 
128  std::string getUserInfo() const {
129  return userinfo;
130  }
131 
137  void setUserInfo(const std::string& userinfo) {
138  this->userinfo = userinfo;
139  }
140 
145  std::string getHost() const {
146  return host;
147  }
148 
153  void setHost(const std::string& host) {
154  this->host = host;
155  }
156 
161  int getPort() const {
162  return port;
163  }
164 
169  void setPort(int port) {
170  this->port = port;
171  }
172 
177  std::string getPath() const {
178  return path;
179  }
180 
185  void setPath(const std::string& path) {
186  this->path = path;
187  }
188 
193  std::string getQuery() const {
194  return query;
195  }
196 
201  void setQuery(const std::string& query) {
202  this->query = query;
203  }
204 
209  std::string getFragment() const {
210  return fragment;
211  }
212 
217  void setFragment(const std::string& fragment) {
218  this->fragment = fragment;
219  }
220 
225  bool isOpaque() const {
226  return opaque;
227  }
228 
233  void setOpaque(bool opaque) {
234  this->opaque = opaque;
235  }
236 
241  bool isAbsolute() const {
242  return absolute;
243  }
244 
249  void setAbsolute(bool absolute) {
250  this->absolute = absolute;
251  }
252 
257  bool isServerAuthority() const {
258  return serverAuthority;
259  }
260 
265  void setServerAuthority(bool serverAuthority) {
266  this->serverAuthority = serverAuthority;
267  }
268 
274  bool isValid() const {
275  return valid;
276  }
277 
283  void setValid(bool valid) {
284  this->valid = valid;
285  }
286 
292  int getHashCode() const {
293  return this->hashCode;
294  }
295 
302  void setHashCode(int hashCode) {
303  this->hashCode = hashCode;
304  }
305  };
306 
307 }}}
308 
309 #endif /* _DECAF_INTERNAL_NET_URITYPE_H_ */
void setOpaque(bool opaque)
Sets if the URI is Opaque.
Definition: URIType.h:233
std::string getPath() const
Gets the Path part of the URI.
Definition: URIType.h:177
void setHashCode(int hashCode)
Sets the hash code for this URIType instance.
Definition: URIType.h:302
int getHashCode() const
Gets the computed hashCode for this URIType or return -1 if non is set.
Definition: URIType.h:292
std::string getSchemeSpecificPart() const
Gets the Scheme Specific Part of the URI.
Definition: URIType.h:95
void setPath(const std::string &path)
Sets the Path part of the URI.
Definition: URIType.h:185
std::string getAuthority() const
Gets the Authority of the URI.
Definition: URIType.h:111
void setHost(const std::string &host)
Sets the Host name part of the URI.
Definition: URIType.h:153
void setValid(bool valid)
Sets if the URI is valid, meaning that the source has been set and parsed and all relevant data field...
Definition: URIType.h:283
void setQuery(const std::string &query)
Sets the Query part of the URI.
Definition: URIType.h:201
void setSchemeSpecificPart(const std::string &schemeSpecificPart)
Sets the Scheme Specific Part of the URI.
Definition: URIType.h:103
void setAuthority(const std::string &authority)
Sets the Authority of the URI.
Definition: URIType.h:119
int getPort() const
Gets the port part of the URI.
Definition: URIType.h:161
std::string getQuery() const
Gets the Query part of the URI.
Definition: URIType.h:193
std::string getUserInfo() const
Gets the user info part of the URI, e.g.
Definition: URIType.h:128
bool isAbsolute() const
Gets if the URI is Absolute.
Definition: URIType.h:241
void setPort(int port)
Sets the port part of the URI.
Definition: URIType.h:169
bool isServerAuthority() const
Gets if the URI is a Server Authority.
Definition: URIType.h:257
bool isValid() const
Gets if the URI is valid, meaning that the source has been set and parsed and all relevant data field...
Definition: URIType.h:274
std::string getHost() const
Gets the Host name part of the URI.
Definition: URIType.h:145
bool isOpaque() const
Gets if the URI is Opaque.
Definition: URIType.h:225
std::string getFragment() const
Gets the Fragment part of the URI.
Definition: URIType.h:209
void setUserInfo(const std::string &userinfo)
Sets the user info part of the URI, e.g.
Definition: URIType.h:137
std::string getSource() const
Gets the source URI string that was parsed to obtain this URIType instance and the resulting data...
Definition: URIType.h:62
Basic type object that holds data that composes a given URI.
Definition: URIType.h:31
void setSource(const std::string &source)
Sets the source URI string that was parsed to obtain this URIType instance and the resulting data...
Definition: URIType.h:71
std::string getScheme() const
Gets the Scheme of the URI, e.g.
Definition: URIType.h:79
void setFragment(const std::string &fragment)
Sets the Fragment part of the URI.
Definition: URIType.h:217
#define DECAF_API
Definition: Config.h:29
void setScheme(const std::string &scheme)
Sets the Scheme of the URI, e.g.
Definition: URIType.h:87
void setServerAuthority(bool serverAuthority)
Sets if the URI is a Server Authority.
Definition: URIType.h:265
void setAbsolute(bool absolute)
Sets if the URI is Absolute.
Definition: URIType.h:249