libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
url.hpp
Go to the documentation of this file.
1 #pragma once
2 /*
3 ** Copyright (C) 2012 Aldebaran Robotics
4 ** See COPYING for the license
5 */
6 
7 #ifndef _QI_MESSAGING_URL_HPP_
8 #define _QI_MESSAGING_URL_HPP_
9 
10 #include <string>
11 #include <vector>
12 
13 #include <qi/api.hpp>
14 
15 namespace qi {
16  class UrlPrivate;
17 
33  class QI_API Url
34  {
35  public:
38  Url();
39 
44  Url(const std::string &url);
45 
52  Url(const std::string &url, unsigned short defaultPort);
53 
60  Url(const std::string &url, const std::string &defaultProtocol);
61 
70  Url(const std::string &url, const std::string &defaultProtocol, unsigned short defaultPort);
71 
75  Url(const char *url);
80  virtual ~Url();
81 
85  Url(const qi::Url& url);
86  Url& operator= (const Url& rhs);
87  bool operator< (const Url& rhs) const;
95  bool isValid() const;
96 
102  const std::string& str() const;
103 
108  const std::string& protocol() const;
109 
114  const std::string& host() const;
115 
119  unsigned short port() const;
120 
121  private:
122  UrlPrivate* _p;
123  };
124 
127  QI_API bool operator==(const Url& lhs, const Url& rhs);
130  QI_API inline bool operator!=(const Url& lhs, const Url& rhs)
131  { return !(lhs == rhs); }
132 
133  typedef std::vector<Url> UrlVector;
134 
135 }
136 
137 #endif // _QIMESSAGING_URL_HPP_
#define QI_API
Definition: api.hpp:34
std::vector< Url > UrlVector
Definition: url.hpp:133
dll import/export and compiler message
bool operator==(const Signature &lhs, const Signature &rhs)
Definition: url.hpp:33
bool operator<(const AnyReference &a, const AnyReference &b)
bool operator!=(const Signature &lhs, const Signature &rhs)
Definition: signature.hpp:154