PrevUpHomeNext

Struct template basic_rope_view

boost::text::basic_rope_view

Synopsis

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

template<nf Normalization, typename Char, typename String> 
struct basic_rope_view {
  // types
  typedef Char                                           char_type;             
  typedef String                                         string;                
  typedef basic_unencoded_rope_view< char_type, string > unencoded_rope_view;   
  typedef basic_text_view< normalization, char_type >    text_view;             
  typedef basic_text< normalization, char_type, string > text;                  
  typedef unspecified                                    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 unspecified                                    rope_iterator;         
  typedef unspecified                                    const_rope_iterator;   

  // construct/copy/destruct
  basic_rope_view();
  basic_rope_view(text const &);
  basic_rope_view(text &&) = delete;
  basic_rope_view(text_view);
  basic_rope_view(const_rope_iterator, const_rope_iterator);
  basic_rope_view & operator=(text const &);
  basic_rope_view & operator=(text &&) = delete;
  basic_rope_view & operator=(text_view);

  // public member functions
   BOOST_TEXT_STATIC_ASSERT_NORMALIZATION();
  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;
  bool empty() const;
  size_type storage_code_units() const;
  size_type distance() const;
  void swap(basic_rope_view &);

  // friend functions
  std::ostream & operator<<(std::ostream &, basic_rope_view);
  std::wostream & operator<<(std::wostream &, basic_rope_view);

  // public data members
  static constexpr nf normalization;
  static constexpr format utf_format;
};

Description

A reference to a substring of a basic_rope, basic_text, or basic_text_view. The String template parameter refers to the type used in a basic_rope to which this view may refer. It is otherwise unused.

basic_rope_view public types

  1. typedef Char char_type;

    The type of code unit used in the underlying storage to which this view refers.

  2. typedef String string;

    The type of the container used in the underlying storage of basic_rope<Normalization, Char, String>.

  3. typedef basic_unencoded_rope_view< char_type, string > unencoded_rope_view;

    A specialization of basic_unencoded_rope_view with the same char_type and string.

  4. typedef basic_text_view< normalization, char_type > text_view;

    A specialization of basic_text_view with the same normalization, char_type, and string.

  5. typedef basic_text< normalization, char_type, string > text;

    A specialization of basic_text with the same normalization, char_type, and string.

basic_rope_view public construct/copy/destruct

  1. basic_rope_view();

    Default ctor.

  2. basic_rope_view(text const & t);

    Constructs a basic_rope_view from a text.

  3. basic_rope_view(text &&) = delete;

    Disable construction from a temporary text.

  4. basic_rope_view(text_view tv);

    Constructs a basic_rope_view from a text_view.

  5. basic_rope_view(const_rope_iterator first, const_rope_iterator last);

    Constructs a basic_rope_view from a pair of const_rope_iterators.

    Requires:

    boost::text::normalized<normalization>(first.base(), last.base())

  6. basic_rope_view & operator=(text const & t);

    Assignment from a text.

  7. basic_rope_view & operator=(text &&) = delete;

    Disallow assignment from a text rvalue.

  8. basic_rope_view & operator=(text_view tv);

    Assignment from a text_view.

basic_rope_view public member functions

  1.  BOOST_TEXT_STATIC_ASSERT_NORMALIZATION();
  2. const_iterator begin() const;
  3. const_iterator end() const;
  4. const_iterator cbegin() const;
  5. const_iterator cend() const;
  6. const_reverse_iterator rbegin() const;
  7. const_reverse_iterator rend() const;
  8. const_reverse_iterator crbegin() const;
  9. const_reverse_iterator crend() const;
  10. bool empty() const;
  11. size_type storage_code_units() const;

    Returns the number of code units controlled by *this, not including the null terminator.

  12. size_type distance() const;

    Returns the number of graphemes in *this. This operation is O(n).

  13. void swap(basic_rope_view & rhs);

    Swaps *this with rhs.

basic_rope_view friend functions

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

    Stream inserter; performs formatted output, in UTF-8 encoding.

  2. std::wostream & operator<<(std::wostream & os, basic_rope_view rv);

    Stream inserter; performs formatted output, in UTF-16 encoding. Defined on Windows only.

basic_rope_view public public data members

  1. static constexpr nf normalization;

    The normalization form used in this basic_rope_view.

  2. static constexpr format utf_format;

    The UTF format used in the underlying storage.


PrevUpHomeNext