sead
Loading...
Searching...
No Matches
sead::SafeStringBase< CharType > Class Template Reference

#include <seadSafeString.h>

Inherited by sead::BufferedSafeStringBase< CharType >.

Classes

class  iterator
class  token_iterator

Public Member Functions

 SafeStringBase ()
 SafeStringBase (const CharType *str)
 SafeStringBase (const SafeStringBase &other)=default
SafeStringBaseoperator= (const SafeStringBase &other)=default
virtual ~SafeStringBase ()
iterator begin () const
iterator end () const
token_iterator tokenBegin (const SafeStringBase< CharType > &delimiter) const
token_iterator tokenEnd (const SafeStringBase< CharType > &delimiter=SafeStringBase< CharType >()) const
const CharType * cstr () const
const CharType & at (s32 idx) const
const CharType & operator[] (s32 idx) const
s32 calcLength () const
const SafeStringBase< CharType > getPart (s32 at) const
const SafeStringBase< CharType > getPart (const iterator &it) const
bool include (const CharType &c) const
bool include (const SafeStringBase< CharType > &str) const
bool isEqual (const SafeStringBase< CharType > &rhs) const
s32 comparen (const SafeStringBase< CharType > &rhs, s32 n) const
s32 compare (const SafeStringBase< CharType > &rhs) const
iterator findIterator (const SafeStringBase< CharType > &token) const
s32 findIndex (const SafeStringBase< CharType > &token) const
iterator rfindIterator (const SafeStringBase< CharType > &token) const
s32 rfindIndex (const SafeStringBase< CharType > &token) const
bool isEmpty () const
const char cNullChar
const char cLineBreakChar
const SafeStringBase< char > cEmptyString ("")
const char16 cNullChar
const char16 cLineBreakChar
const SafeStringBase< char16cEmptyString (cEmptyStringChar16)

Static Public Attributes

static const CharType cNullChar
static const CharType cLineBreakChar
static const SafeStringBase< CharType > cEmptyString
static const s32 cMaximumLength = 256*1024

Protected Member Functions

virtual void assureTerminationImpl_ () const

Protected Attributes

const CharType * mStringTop

Private Member Functions

const CharType & unsafeAt_ (s32 idx) const

Friends

bool operator== (const SafeStringBase< CharType > &lhs, const SafeStringBase< CharType > &rhs)
bool operator!= (const SafeStringBase< CharType > &lhs, const SafeStringBase< CharType > &rhs)
bool operator> (const SafeStringBase< CharType > &lhs, const SafeStringBase< CharType > &rhs)
bool operator< (const SafeStringBase< CharType > &lhs, const SafeStringBase< CharType > &rhs)

Constructor & Destructor Documentation

◆ SafeStringBase() [1/3]

template<typename CharType>
sead::SafeStringBase< CharType >::SafeStringBase ( )
inline

◆ SafeStringBase() [2/3]

template<typename CharType>
sead::SafeStringBase< CharType >::SafeStringBase ( const CharType * str)
inline

◆ SafeStringBase() [3/3]

template<typename CharType>
sead::SafeStringBase< CharType >::SafeStringBase ( const SafeStringBase< CharType > & other)
default

◆ ~SafeStringBase()

template<typename CharType>
virtual sead::SafeStringBase< CharType >::~SafeStringBase ( )
inlinevirtual

Member Function Documentation

◆ operator=()

template<typename CharType>
SafeStringBase & sead::SafeStringBase< CharType >::operator= ( const SafeStringBase< CharType > & other)
default

◆ begin()

template<typename CharType>
iterator sead::SafeStringBase< CharType >::begin ( ) const
inline

◆ end()

template<typename CharType>
iterator sead::SafeStringBase< CharType >::end ( ) const
inline

◆ tokenBegin()

template<typename CharType>
token_iterator sead::SafeStringBase< CharType >::tokenBegin ( const SafeStringBase< CharType > & delimiter) const
inline

◆ tokenEnd()

template<typename CharType>
token_iterator sead::SafeStringBase< CharType >::tokenEnd ( const SafeStringBase< CharType > & delimiter = SafeStringBase<CharType>()) const
inline

◆ cstr()

template<typename CharType>
const CharType * sead::SafeStringBase< CharType >::cstr ( ) const
inline

◆ at()

template<typename CharType>
const CharType & sead::SafeStringBase< CharType >::at ( s32 idx) const
inline

◆ operator[]()

template<typename CharType>
const CharType & sead::SafeStringBase< CharType >::operator[] ( s32 idx) const
inline

◆ calcLength()

template<typename CharType>
s32 sead::SafeStringBase< CharType >::calcLength ( ) const
inline

◆ getPart() [1/2]

template<typename CharType>
const SafeStringBase< CharType > sead::SafeStringBase< CharType >::getPart ( s32 at) const
inline

◆ getPart() [2/2]

template<typename CharType>
const SafeStringBase< CharType > sead::SafeStringBase< CharType >::getPart ( const iterator & it) const
inline

◆ include() [1/2]

template<typename CharType>
bool sead::SafeStringBase< CharType >::include ( const CharType & c) const
inline

◆ include() [2/2]

template<typename CharType>
bool sead::SafeStringBase< CharType >::include ( const SafeStringBase< CharType > & str) const
inline

◆ isEqual()

template<typename CharType>
bool sead::SafeStringBase< CharType >::isEqual ( const SafeStringBase< CharType > & rhs) const
inline

◆ comparen()

template<typename CharType>
s32 sead::SafeStringBase< CharType >::comparen ( const SafeStringBase< CharType > & rhs,
s32 n ) const
inline

◆ compare()

template<typename CharType>
s32 sead::SafeStringBase< CharType >::compare ( const SafeStringBase< CharType > & rhs) const
inline

◆ findIterator()

template<typename CharType>
iterator sead::SafeStringBase< CharType >::findIterator ( const SafeStringBase< CharType > & token) const
inline

◆ findIndex()

template<typename CharType>
s32 sead::SafeStringBase< CharType >::findIndex ( const SafeStringBase< CharType > & token) const
inline

◆ rfindIterator()

template<typename CharType>
iterator sead::SafeStringBase< CharType >::rfindIterator ( const SafeStringBase< CharType > & token) const
inline

◆ rfindIndex()

template<typename CharType>
s32 sead::SafeStringBase< CharType >::rfindIndex ( const SafeStringBase< CharType > & token) const

◆ isEmpty()

template<typename CharType>
bool sead::SafeStringBase< CharType >::isEmpty ( ) const
inline

◆ unsafeAt_()

template<typename CharType>
const CharType & sead::SafeStringBase< CharType >::unsafeAt_ ( s32 idx) const
inlineprivate

◆ assureTerminationImpl_()

template<typename CharType>
virtual void sead::SafeStringBase< CharType >::assureTerminationImpl_ ( ) const
inlineprotectedvirtual

◆ cNullChar() [1/2]

const char sead::SafeStringBase< char >::cNullChar

◆ cLineBreakChar() [1/2]

const char sead::SafeStringBase< char >::cLineBreakChar

◆ cEmptyString() [1/2]

const SafeStringBase< char > sead::SafeStringBase< char >::cEmptyString ( "" )

◆ cNullChar() [2/2]

const char16 sead::SafeStringBase< char16 >::cNullChar

◆ cLineBreakChar() [2/2]

const char16 sead::SafeStringBase< char16 >::cLineBreakChar

◆ cEmptyString() [2/2]

const SafeStringBase< char16 > sead::SafeStringBase< char16 >::cEmptyString ( cEmptyStringChar16 )

◆ operator==

template<typename CharType>
bool operator== ( const SafeStringBase< CharType > & lhs,
const SafeStringBase< CharType > & rhs )
friend

◆ operator!=

template<typename CharType>
bool operator!= ( const SafeStringBase< CharType > & lhs,
const SafeStringBase< CharType > & rhs )
friend

◆ operator>

template<typename CharType>
bool operator> ( const SafeStringBase< CharType > & lhs,
const SafeStringBase< CharType > & rhs )
friend

◆ operator<

template<typename CharType>
bool operator< ( const SafeStringBase< CharType > & lhs,
const SafeStringBase< CharType > & rhs )
friend

Member Data Documentation

◆ cNullChar

template<typename CharType>
const CharType sead::SafeStringBase< CharType >::cNullChar
static

◆ cLineBreakChar

template<typename CharType>
const CharType sead::SafeStringBase< CharType >::cLineBreakChar
static

◆ cEmptyString

template<typename CharType>
const SafeStringBase<CharType> sead::SafeStringBase< CharType >::cEmptyString
static

◆ cMaximumLength

template<typename CharType>
const s32 sead::SafeStringBase< CharType >::cMaximumLength = 256*1024
static

◆ mStringTop

template<typename CharType>
const CharType* sead::SafeStringBase< CharType >::mStringTop
protected