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

PrevUpHomeNext

Struct key

boost::process::v2::environment::key — A class representing a key within an environment.

Synopsis

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


struct key {
  // types
  typedef char_type                                   value_type;      
  typedef key_char_traits< char_type >                traits_type;     
  typedef std::basic_string< char_type, traits_type > string_type;     
  typedef basic_string_view< char_type, traits_type > string_view_type;

  // public member functions
  key();
  key(const key &) = default;
  key(key &&);
  key(const string_type &);
  key(string_type &&);
  key(const value_type *);
  key(value_type *);
  explicit key(key_view);
  template<typename Source> 
    key(const Source &, decltype(std::declval< Source >().data()) = nullptr, 
        decltype(std::declval< Source >().size()) = 0u);
  key(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type *);
  template<typename InputIt> key(InputIt, InputIt);
  ~key() = default;
  key & operator=(const key &) = default;
  key & operator=(key &&);
  key & operator=(string_type &&);
  template<typename Source> key & operator=(const Source &);
  key & assign(string_type &&);
  template<typename Source> key & assign(const Source &);
  template<typename InputIt> key & assign(InputIt, InputIt);
  void clear();
  void swap(key &) noexcept;
  const value_type * c_str() const noexcept;
  const string_type & native() const noexcept;
  string_view_type native_view() const noexcept;
  operator string_type() const;
  operator string_view_type() const;
  int compare(const key &) 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;
  const string_type & native_string() const;
  bool empty() const;
  const value_type * data() const;
  std::size_t size() const;
};

Description

key public member functions

  1. key();
  2. key(const key & p) = default;
  3. key(key && p);
  4. key(const string_type & source);
  5. key(string_type && source);
  6. key(const value_type * raw);
  7. key(value_type * raw);
  8. explicit key(key_view kv);
  9. template<typename Source> 
      key(const Source & source, 
          decltype(std::declval< Source >().data()) = nullptr, 
          decltype(std::declval< Source >().size()) = 0u);
  10. key(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type * raw);
  11. template<typename InputIt> key(InputIt first, InputIt last);
  12. ~key() = default;
  13. key & operator=(const key & p) = default;
  14. key & operator=(key && p);
  15. key & operator=(string_type && source);
  16. template<typename Source> key & operator=(const Source & source);
  17. key & assign(string_type && source);
  18. template<typename Source> key & assign(const Source & source);
  19. template<typename InputIt> key & assign(InputIt first, InputIt last);
  20. void clear();
  21. void swap(key & other) noexcept;
  22. const value_type * c_str() const noexcept;
  23. const string_type & native() const noexcept;
  24. string_view_type native_view() const noexcept;
  25. operator string_type() const;
  26. operator string_view_type() const;
  27. int compare(const key & p) const noexcept;
  28. int compare(const string_type & str) const;
  29. int compare(string_view_type str) const;
  30. int compare(const value_type * s) const;
  31. 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;
  32. std::string string() const;
  33. std::wstring wstring() const;
  34. const string_type & native_string() const;
  35. bool empty() const;
  36. const value_type * data() const;
  37. std::size_t size() const;

PrevUpHomeNext