00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef uripp_domain_name_h
00023 #define uripp_domain_name_h
00024 #include "apidefs.h"
00025 #include <string>
00026 #include <iostream>
00027 namespace uripp {
00035 class URIPP_API domain_name {
00036 public:
00037 domain_name();
00038
00039
00040
00041
00042 domain_name(const std::string& v);
00043 bool is_null() const {return string_.empty();}
00044 const std::string& string() const {return string_;}
00045
00046 domain_name operator +(const domain_name& rhs) const {
00047 domain_name result = *this;
00048 return result += rhs;
00049 }
00051 domain_name& operator +=(const domain_name& rhs);
00052 static const char SEPARATOR_CHAR;
00053 static const char char_class[256];
00054 private:
00055 friend bool URIPP_API parse(std::string::const_iterator& first, std::string::const_iterator last, domain_name& v);
00056 std::string string_;
00057 };
00059 inline std::ostream& operator <<(std::ostream& os, const domain_name& v) {return os << v.string();}
00063 bool URIPP_API parse(std::string::const_iterator& first, std::string::const_iterator last, domain_name& v);
00064 }
00065 #endif