parts_base.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // Copyright (c) 2019 Vinnie Falco ([email protected])
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/url
  8. //
  9. #ifndef BOOST_URL_DETAIL_PARTS_BASE_HPP
  10. #define BOOST_URL_DETAIL_PARTS_BASE_HPP
  11. #include <boost/url/error.hpp>
  12. namespace boost {
  13. namespace urls {
  14. namespace detail {
  15. // mix-in to provide part
  16. // constants and variables
  17. struct parts_base
  18. {
  19. enum
  20. {
  21. id_scheme = -1, // trailing ':'
  22. id_user, // leading "//"
  23. id_pass, // leading ':', trailing '@'
  24. id_host,
  25. id_port, // leading ':'
  26. id_path,
  27. id_query, // leading '?'
  28. id_frag, // leading '#'
  29. id_end // one past the end
  30. };
  31. enum class from : char {
  32. // this belongs to a string
  33. string = 0,
  34. // this belongs to url_base
  35. // segments/params containers point to
  36. // another url
  37. url = 1,
  38. // this belongs to authority_view
  39. // id_user does not have the leading "//"
  40. authority = 2,
  41. };
  42. };
  43. } // detail
  44. } // urls
  45. } // boost
  46. #endif