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_view

boost::process::v2::environment::key_view — A view type for a key of an environment.

Synopsis

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


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

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

  // public member functions
  void swap(key_view &) noexcept;
  string_view_type native() const noexcept;
  operator string_view_type() const;
  int compare(const key_view &) const noexcept;
  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;
  const value_type * data() const;
  std::size_t size() const;
};

Description

key_view public construct/copy/destruct

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

key_view public member functions

  1. void swap(key_view & other) noexcept;
  2. string_view_type native() const noexcept;
  3. operator string_view_type() const;
  4. int compare(const key_view & p) const noexcept;
  5. int compare(string_view_type str) const;
  6. int compare(const value_type * s) const;
  7. 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;
  8. std::string string() const;
  9. std::wstring wstring() const;
  10. string_type native_string() const;
  11. bool empty() const;
  12. const value_type * data() const;
  13. std::size_t size() const;

PrevUpHomeNext