PrevUpHomeNext

Struct template basic_unencoded_rope_view

boost::text::basic_unencoded_rope_view

Synopsis

// In header: <boost/text/unencoded_rope_view.hpp>

template<typename Char, typename String> 
struct basic_unencoded_rope_view : public stl_interfaces::view_interface< basic_unencoded_rope_view< Char, String > >
{
  // types
  typedef Char                                         value_type;            
  typedef std::size_t                                  size_type;             
  typedef unspecified                                  iterator;              
  typedef iterator                                     const_iterator;        
  typedef stl_interfaces::reverse_iterator< iterator > reverse_iterator;      
  typedef reverse_iterator                             const_reverse_iterator;
  typedef String                                       string;                
  typedef boost::text::basic_string_view< Char >       string_view;           

  // construct/copy/destruct
  basic_unencoded_rope_view();
  basic_unencoded_rope_view(basic_unencoded_rope_view const &);
  basic_unencoded_rope_view(basic_unencoded_rope< Char, String > const &, 
                            size_type, size_type);
  basic_unencoded_rope_view(string const &);
  basic_unencoded_rope_view(string &&) = delete;
  basic_unencoded_rope_view(string const &, size_type, size_type);
  basic_unencoded_rope_view(value_type const *);
  basic_unencoded_rope_view(string_view);
  template<std::ranges::contiguous_range R> 
    explicit basic_unencoded_rope_view(R const &);
  basic_unencoded_rope_view & operator=(basic_unencoded_rope_view const &);
  basic_unencoded_rope_view & 
  operator=(basic_unencoded_rope< Char, String > const &);
  basic_unencoded_rope_view & operator=(string const &);
  basic_unencoded_rope_view & 
  operator=(basic_unencoded_rope< Char, String > &&) = delete;
  basic_unencoded_rope_view & operator=(string &&) = delete;
  basic_unencoded_rope_view & operator=(value_type const *);
  basic_unencoded_rope_view & operator=(string_view);
  template<std::ranges::contiguous_range R> 
    basic_unencoded_rope_view & operator=(R const &);

  // public member functions
  const_iterator begin() const;
  const_iterator end() const;
  const_iterator cbegin() const;
  const_iterator cend() const;
  const_reverse_iterator rbegin() const;
  const_reverse_iterator rend() const;
  const_reverse_iterator crbegin() const;
  const_reverse_iterator crend() const;
  basic_unencoded_rope_view operator()(std::ptrdiff_t, std::ptrdiff_t) const;
  int compare(basic_unencoded_rope_view) const;

  // friend functions
  std::ostream & operator<<(std::ostream &, basic_unencoded_rope_view);
};

Description

A reference to a substring of a basic_unencoded_rope, std::string<Char>, or std::string_view<Char>. The String template parameter refers to the type used in a basic_unencoded_rope to which this view may refer. It is otherwise unused.

basic_unencoded_rope_view public construct/copy/destruct

  1. basic_unencoded_rope_view();

    Default ctor.

    Postconditions:

    size() == 0 && begin() == end()

  2. basic_unencoded_rope_view(basic_unencoded_rope_view const & other);
  3. basic_unencoded_rope_view(basic_unencoded_rope< Char, String > const & r, 
                              size_type lo, size_type hi);

    Constructs a substring of r, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.

    These preconditions apply to the values used after size() is added to any negative arguments.

    Requires:

    0 <= lo && lo <= r.size()

    Requires:

    0 <= hi && lhi <= r.size()

    Requires:

    lo <= hi

    Postconditions:

    size() == r.size() && begin() == r.begin() + lo && end() == r.begin() + hi

  4. basic_unencoded_rope_view(string const & s);

    Constructs a basic_unencoded_rope_view covering the entire given string.

  5. basic_unencoded_rope_view(string && r) = delete;

    Forbid construction from a temporary string.

  6. basic_unencoded_rope_view(string const & s, size_type lo, size_type hi);

    Constructs a substring of s, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.

    These preconditions apply to the values used after size() is added to any negative arguments.

    Requires:

    0 <= lo && lo <= s.size()

    Requires:

    0 <= hi && lhi <= s.size()

    Requires:

    lo <= hi

    Postconditions:

    size() == s.size() && begin() == s.begin() + lo && end() == s.begin() + hi

  7. basic_unencoded_rope_view(value_type const * c_str);

    Constructs a basic_unencoded_rope_view from a null-terminated C string.

  8. basic_unencoded_rope_view(string_view sv);

    Constructs a basic_unencoded_rope_view covering the entire given string_view.

  9. template<std::ranges::contiguous_range R> 
      explicit basic_unencoded_rope_view(R const & r);

    Constructs a basic_unencoded_rope_view from a range of value_type.

  10. basic_unencoded_rope_view & operator=(basic_unencoded_rope_view const & other);
  11. basic_unencoded_rope_view & 
    operator=(basic_unencoded_rope< Char, String > const & r);

    Assignment from a basic_unencoded_rope.

  12. basic_unencoded_rope_view & operator=(string const & s);

    Assignment from a string.

  13. basic_unencoded_rope_view & 
    operator=(basic_unencoded_rope< Char, String > && r) = delete;

    Forbid assignment from a basic_unencoded_rope.

  14. basic_unencoded_rope_view & operator=(string && s) = delete;

    Forbid assignment from a string.

  15. basic_unencoded_rope_view & operator=(value_type const * c_str);

    Assignment from a null-terminated C string.

  16. basic_unencoded_rope_view & operator=(string_view sv);

    Assignment from a string_view.

  17. template<std::ranges::contiguous_range R> 
      basic_unencoded_rope_view & operator=(R const & r);

    Assignment from a contiguous range of value_type elements.

basic_unencoded_rope_view public member functions

  1. const_iterator begin() const;
  2. const_iterator end() const;
  3. const_iterator cbegin() const;
  4. const_iterator cend() const;
  5. const_reverse_iterator rbegin() const;
  6. const_reverse_iterator rend() const;
  7. const_reverse_iterator crbegin() const;
  8. const_reverse_iterator crend() const;
  9. basic_unencoded_rope_view 
    operator()(std::ptrdiff_t lo, std::ptrdiff_t hi) const;

    Returns a substring of *this, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.

    These preconditions apply to the values used after size() is added to any negative arguments.

    Requires:

    0 <= lo && lo <= size()

    Requires:

    0 <= hi && lhi <= size()

    Requires:

    lo <= hi

  10. int compare(basic_unencoded_rope_view rhs) const;

    Lexicographical compare. Returns a value < 0 when *this is lexicographically less than rhs, 0 if *this == rhs, and a value > 0 if *this is lexicographically greater than rhs.

basic_unencoded_rope_view friend functions

  1. std::ostream & operator<<(std::ostream & os, basic_unencoded_rope_view rv);

    Stream inserter; performs unformatted output.


PrevUpHomeNext