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 a snapshot of the develop branch, built from commit d7c8a7cf0d.
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;

  // construct/copy/destruct
  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 & operator=(const key &) = default;
  key & operator=(key &&);
  key & operator=(string_type &&);
  template<typename Source> key & operator=(const Source &);
  ~key() = default;

  // public member functions
  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 construct/copy/destruct

  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 & operator=(const key & p) = default;
  13. key & operator=(key && p);
  14. key & operator=(string_type && source);
  15. template<typename Source> key & operator=(const Source & source);
  16. ~key() = default;

key public member functions

  1. key & assign(string_type && source);
  2. template<typename Source> key & assign(const Source & source);
  3. template<typename InputIt> key & assign(InputIt first, InputIt last);
  4. void clear();
  5. void swap(key & other) noexcept;
  6. const value_type * c_str() const noexcept;
  7. const string_type & native() const noexcept;
  8. string_view_type native_view() const noexcept;
  9. operator string_type() const;
  10. operator string_view_type() const;
  11. int compare(const key & p) const noexcept;
  12. int compare(const string_type & str) const;
  13. int compare(string_view_type str) const;
  14. int compare(const value_type * s) const;
  15. 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;
  16. std::string string() const;
  17. std::wstring wstring() const;
  18. const string_type & native_string() const;
  19. bool empty() const;
  20. const value_type * data() const;
  21. std::size_t size() const;

PrevUpHomeNext