Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct key_value_pair_view

boost::process::v2::environment::key_value_pair_view — A view for a key value pair in an environment.

Synopsis

// In header: <boost/process/v2/environment.hpp>


struct key_value_pair_view {
  // types
  typedef char_type                      value_type;      
  typedef std::basic_string< char_type > string_type;     
  typedef basic_cstring_ref< char_type > string_view_type;
  typedef std::char_traits< char_type >  traits_type;     

  // construct/copy/destruct
  key_value_pair_view();
  key_value_pair_view(const key_value_pair_view &) = default;
  key_value_pair_view(key_value_pair_view &&);
  template<typename Source, 
           typename  = typename std::enable_if<is_constructible<string_view_type, Source>::value>::type> 
    key_value_pair_view(const Source &);
  key_value_pair_view(const char_type *);
  key_value_pair_view(char_type *);
  key_value_pair_view & operator=(const key_value_pair_view &) = default;
  key_value_pair_view & operator=(key_value_pair_view &&);
  ~key_value_pair_view();

  // public member functions
  void swap(key_value_pair_view &) noexcept;
  string_view_type native() const noexcept;
  operator string_view_type() const;
  operator typename string_view_type::string_view_type() const;
  int compare(key_value_pair_view) const noexcept;
  int compare(const string_type &) const;
  int compare(string_view_type) const;
  int compare(const value_type *) const;
  template<typename CharT, typename Traits = std::char_traits<CharT>, 
           typename Alloc = std::allocator<CharT> > 
    std::basic_string< CharT, Traits, Alloc > 
    basic_string(const Alloc & = Alloc()) const;
  std::string string() const;
  std::wstring wstring() const;
  string_type native_string() const;
  bool empty() const;
  key_view key() const;
  value_view value() const;
  template<std::size_t Idx> virtual auto get() const = 0;
  const value_type * c_str() const noexcept;
  const value_type * data() const;
  std::size_t size() const;
  template<> key_view get() const;
  template<> value_view get() const;
};

Description

key_value_pair_view public construct/copy/destruct

  1. key_value_pair_view();
  2. key_value_pair_view(const key_value_pair_view & p) = default;
  3. key_value_pair_view(key_value_pair_view && p);
  4. template<typename Source, 
             typename  = typename std::enable_if<is_constructible<string_view_type, Source>::value>::type> 
      key_value_pair_view(const Source & source);
  5. key_value_pair_view(const char_type * p);
  6. key_value_pair_view(char_type * p);
  7. key_value_pair_view & operator=(const key_value_pair_view & p) = default;
  8. key_value_pair_view & operator=(key_value_pair_view && p);
  9. ~key_value_pair_view();

key_value_pair_view public member functions

  1. void swap(key_value_pair_view & other) noexcept;
  2. string_view_type native() const noexcept;
  3. operator string_view_type() const;
  4. operator typename string_view_type::string_view_type() const;
  5. int compare(key_value_pair_view p) const noexcept;
  6. int compare(const string_type & str) const;
  7. int compare(string_view_type str) const;
  8. int compare(const value_type * s) const;
  9. template<typename CharT, typename Traits = std::char_traits<CharT>, 
             typename Alloc = std::allocator<CharT> > 
      std::basic_string< CharT, Traits, Alloc > 
      basic_string(const Alloc & alloc = Alloc()) const;
  10. std::string string() const;
  11. std::wstring wstring() const;
  12. string_type native_string() const;
  13. bool empty() const;
  14. key_view key() const;
  15. value_view value() const;
  16. template<std::size_t Idx> virtual auto get() const = 0;
  17. const value_type * c_str() const noexcept;
  18. const value_type * data() const;
  19. std::size_t size() const;
  20. template<> key_view get() const;
  21. template<> value_view get() const;

PrevUpHomeNext