BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::StringRefData< CHAR_TYPE > Class Template Reference

#include <bslstl_stringrefdata.h>

Inheritance diagram for bslstl::StringRefData< CHAR_TYPE >:
bsl::basic_string_view< CHAR_TYPE, CHAR_TRAITS > bslstl::StringRefImp< CHAR_TYPE >

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (StringRefData, bsl::is_trivially_copyable)
 
 StringRefData ()
 
 StringRefData (const CHAR_TYPE *begin, const CHAR_TYPE *end)
 
 StringRefData (const bsl::basic_string_view< CHAR_TYPE > &view)
 Create a StringRefData object from the specified view.
 
 StringRefData (const StringRefData &)=default
 
 ~StringRefData ()=default
 
StringRefDataoperator= (const StringRefData &)=default
 
- Public Member Functions inherited from bsl::basic_string_view< CHAR_TYPE, CHAR_TRAITS >
 BSLMF_NESTED_TRAIT_DECLARATION (basic_string_view, bsl::is_trivially_copyable)
 
BSLS_KEYWORD_CONSTEXPR basic_string_view () BSLS_KEYWORD_NOEXCEPT
 Create an empty view.
 
 basic_string_view (const basic_string_view &original)=default
 
BSLS_KEYWORD_CONSTEXPR_CPP17 basic_string_view (const CHAR_TYPE *characterString)
 
BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view (const CHAR_TYPE *characterString, size_type numChars)
 
template<class CONTG_ITER , class SENTINEL >
BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view (CONTG_ITER first, SENTINEL last, typename bsl::enable_if< BasicStringView_IsCompatibleIterator< CHAR_TYPE, CONTG_ITER >::value &&BasicStringView_IsCompatibleSentinel< SENTINEL >::value >::type *=0)
 
template<class ALLOCATOR >
 basic_string_view (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
 Create a view of the specified string.
 
 ~basic_string_view ()=default
 Destroy this object.
 
basic_string_viewoperator= (const basic_string_view &rhs)=default
 
template<class ALLOCATOR >
BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_viewoperator= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &rhs) BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 void remove_prefix (size_type numChars)
 
BSLS_KEYWORD_CONSTEXPR_CPP14 void remove_suffix (size_type numChars)
 
void swap (basic_string_view &other) BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR const_iterator begin () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR const_iterator cbegin () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR const_iterator end () const BSLS_KEYWORD_NOEXCEPT
 Return the past-the-end iterator for this view.
 
BSLS_KEYWORD_CONSTEXPR const_iterator cend () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP17 const_reverse_iterator rbegin () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP17 const_reverse_iterator crbegin () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP17 const_reverse_iterator rend () const BSLS_KEYWORD_NOEXCEPT
 Return the past-the-end reverse iterator for this view.
 
BSLS_KEYWORD_CONSTEXPR_CPP17 const_reverse_iterator crend () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR size_type size () const BSLS_KEYWORD_NOEXCEPT
 Return the length of this view.
 
BSLS_KEYWORD_CONSTEXPR size_type length () const BSLS_KEYWORD_NOEXCEPT
 Return the length of this view.
 
BSLS_KEYWORD_CONSTEXPR size_type max_size () const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR bool empty () const BSLS_KEYWORD_NOEXCEPT
 Return true if this view has length 0, and false otherwise.
 
BSLS_KEYWORD_CONSTEXPR_CPP14 const_reference operator[] (size_type position) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 const_reference at (size_type position) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 const_reference front () const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 const_reference back () const
 
BSLS_KEYWORD_CONSTEXPR const_pointer data () const BSLS_KEYWORD_NOEXCEPT
 
size_type copy (CHAR_TYPE *characterString, size_type numChars, size_type position=0) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view substr (size_type position=0, size_type numChars=npos) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 int compare (basic_string_view other) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 int compare (size_type position, size_type numChars, basic_string_view other) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 int compare (size_type lhsPosition, size_type lhsNumChars, basic_string_view other, size_type otherPosition, size_type otherNumChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 int compare (const CHAR_TYPE *other) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 int compare (size_type lhsPosition, size_type lhsNumChars, const CHAR_TYPE *other) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 int compare (size_type lhsPosition, size_type lhsNumChars, const CHAR_TYPE *other, size_type otherNumChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 bool starts_with (basic_string_view subview) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR bool starts_with (CHAR_TYPE character) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP17 bool starts_with (const CHAR_TYPE *characterString) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 bool ends_with (basic_string_view subview) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR bool ends_with (CHAR_TYPE character) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP17 bool ends_with (const CHAR_TYPE *characterString) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find (basic_string_view subview, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 size_type find (const CHAR_TYPE *characterString, size_type position=0) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find (CHAR_TYPE character, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type rfind (basic_string_view subview, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type rfind (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type rfind (const CHAR_TYPE *characterString, size_type position=npos) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type rfind (CHAR_TYPE character, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_of (basic_string_view subview, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 size_type find_first_of (const CHAR_TYPE *characterString, size_type position=0) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_of (CHAR_TYPE character, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_of (basic_string_view subview, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 size_type find_last_of (const CHAR_TYPE *characterString, size_type position=npos) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_of (CHAR_TYPE character, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_not_of (basic_string_view subview, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_not_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 size_type find_first_not_of (const CHAR_TYPE *characterString, size_type position=0) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_first_not_of (CHAR_TYPE character, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_not_of (basic_string_view subview, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_not_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
 
BSLS_KEYWORD_CONSTEXPR_CPP17 size_type find_last_not_of (const CHAR_TYPE *characterString, size_type position=npos) const
 
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find_last_not_of (CHAR_TYPE character, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
 
template<class ALLOCATOR >
BSLS_KEYWORD_EXPLICIT operator std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > () const
 
template<class CONTG_ITER , class SENTINEL >
BSLS_PLATFORM_AGGRESSIVE_INLINE BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view (CONTG_ITER first, SENTINEL last, typename bsl::enable_if< BasicStringView_IsCompatibleIterator< CHAR_TYPE, CONTG_ITER >::value &&BasicStringView_IsCompatibleSentinel< SENTINEL >::value >::type *)
 
template<class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string_view (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
 
template<class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view< CHAR_TYPE, CHAR_TRAITS > & operator= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &rhs) BSLS_KEYWORD_NOEXCEPT
 

Static Public Member Functions

static std::size_t cStringLength (const CHAR_TYPE *data)
 

Additional Inherited Members

- Public Types inherited from bsl::basic_string_view< CHAR_TYPE, CHAR_TRAITS >
typedef CHAR_TRAITS traits_type
 
typedef CHAR_TYPE value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef const value_typeconst_iterator
 
typedef const_iterator iterator
 
typedef bsl::reverse_iterator< iteratorreverse_iterator
 
typedef bsl::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
- Static Public Attributes inherited from bsl::basic_string_view< CHAR_TYPE, CHAR_TRAITS >
static const size_type npos = ~size_type(0)
 

Detailed Description

template<class CHAR_TYPE>
class bslstl::StringRefData< CHAR_TYPE >

This class is an intermediate link between bslstl::StringRef used in BDE and bsl::string_view and is kept only for compatibility with legacy code.

See bslstl_stringrefdata

Constructor & Destructor Documentation

◆ StringRefData() [1/4]

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::StringRefData ( )
inline

Create a StringRefData object having default attribute values:

begin() == 0
end() == 0
BSLS_KEYWORD_CONSTEXPR const_iterator end() const BSLS_KEYWORD_NOEXCEPT
Return the past-the-end iterator for this view.
Definition bslstl_stringview.h:1620
BSLS_KEYWORD_CONSTEXPR const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1602

◆ StringRefData() [2/4]

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::StringRefData ( const CHAR_TYPE *  begin,
const CHAR_TYPE *  end 
)
inline

Create a StringRefData object the specified begin and end attribute values. The behavior is undefined unless begin <= end and !begin == !end.

◆ StringRefData() [3/4]

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::StringRefData ( const bsl::basic_string_view< CHAR_TYPE > &  view)
inlineexplicit

◆ StringRefData() [4/4]

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::StringRefData ( const StringRefData< CHAR_TYPE > &  )
default

◆ ~StringRefData()

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::~StringRefData ( )
default

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

template<class CHAR_TYPE >
bslstl::StringRefData< CHAR_TYPE >::BSLMF_NESTED_TRAIT_DECLARATION ( StringRefData< CHAR_TYPE >  ,
bsl::is_trivially_copyable   
)

◆ cStringLength()

template<class CHAR_TYPE >
std::size_t bslstl::StringRefData< CHAR_TYPE >::cStringLength ( const CHAR_TYPE *  data)
inlinestatic

Return the number of CHAR_TYPE characters in the specified null-terminated data string, up to but not including the terminal null value.

◆ operator=()

template<class CHAR_TYPE >
StringRefData & bslstl::StringRefData< CHAR_TYPE >::operator= ( const StringRefData< CHAR_TYPE > &  )
default

The documentation for this class was generated from the following file: