WebCFace 2.9.0
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
TStringView< CharT > Class Template Reference

webcfaceで管理されている文字列を参照するstring_view More...

#include <webcface/common/encoding.h>

Inheritance diagram for TStringView< CharT >:
[legend]
Collaboration diagram for TStringView< CharT >:
[legend]

Public Member Functions

 TStringView ()
 
 TStringView (const CharT *data, std::size_t size, std::shared_ptr< const internal::SharedStringData > s_data)
 
const CharT * c_str () const
 null終端の文字列ポインタを返す
 
 operator const CharT * () const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator== (const T &other) const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator!= (const T &other) const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator<= (const T &other) const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator>= (const T &other) const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator< (const T &other) const
 
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator> (const T &other) const
 

Detailed Description

template<typename CharT>
class webcface::TStringView< CharT >

webcfaceで管理されている文字列を参照するstring_view

Since
ver2.10
  • null終端であることが保証されており、 インタフェースとしては std::string_view に c_str() メンバ関数を追加したもの。
  • 文字列本体へのshared_ptrを保持しているため、参照が切れることはない。
  • std::string_view へキャストした場合、参照はこのStringViewの寿命までは有効

Constructor & Destructor Documentation

◆ TStringView() [1/2]

template<typename CharT >
TStringView ( )
inline

◆ TStringView() [2/2]

template<typename CharT >
TStringView ( const CharT *  data,
std::size_t  size,
std::shared_ptr< const internal::SharedStringData s_data 
)
inline

Member Function Documentation

◆ c_str()

template<typename CharT >
const CharT * c_str ( ) const
inline

null終端の文字列ポインタを返す

◆ operator const CharT *()

template<typename CharT >
operator const CharT * ( ) const
inline

◆ operator!=()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator!= ( const T &  other) const
inline

◆ operator<()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator< ( const T &  other) const
inline

◆ operator<=()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator<= ( const T &  other) const
inline

◆ operator==()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator== ( const T &  other) const
inline

◆ operator>()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator> ( const T &  other) const
inline

◆ operator>=()

template<typename CharT >
template<typename T , std::enable_if_t< std::is_convertible_v< T, std::basic_string_view< CharT > >, std::nullptr_t > = nullptr>
bool operator>= ( const T &  other) const
inline

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