boost::text::basic_rope_view
// 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; };
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
typesThe type of code unit used in the underlying storage to which this view refers.
The type of the container used in the underlying storage of basic_rope<Normalization, Char, String>
.
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
.
typedef basic_text_view< normalization, char_type > text_view;
A specialization of basic_text_view
with the same normalization
, char_type
, and string
.
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/destructbasic_rope_view();
Default ctor.
basic_rope_view(text const & t);
Constructs a
from a basic_rope_view
text
.
basic_rope_view(text &&) = delete;
Disable construction from a temporary text
.
basic_rope_view(text_view tv);
Constructs a
from a basic_rope_view
text_view
.
basic_rope_view(const_rope_iterator first, const_rope_iterator last);
Constructs a
from a pair of basic_rope_view
const_rope_iterators
.
Requires: |
boost::text::normalized<normalization>(first.base(), last.base()) |
basic_rope_view & operator=(text const & t);
Assignment from a text
.
basic_rope_view & operator=(text &&) = delete;
Disallow assignment from a text
rvalue.
basic_rope_view & operator=(text_view tv);
Assignment from a text_view
.
basic_rope_view
public member functionsBOOST_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;
Returns the number of code units controlled by *this
, not including the null terminator.
size_type distance() const;
Returns the number of graphemes in *this
. This operation is O(n).
void swap(basic_rope_view & rhs);
Swaps *this
with rhs
.
basic_rope_view
friend functionsstd::ostream & operator<<(std::ostream & os, basic_rope_view rv);
Stream inserter; performs formatted output, in UTF-8 encoding.
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 membersstatic constexpr nf normalization;
The normalization form used in this basic_rope_view
.
static constexpr format utf_format;
The UTF format used in the underlying storage.