libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::FixedCapStrBase< CharType > Class Template Reference

#include <FixedCapStr.h>

Inheritance diagram for daisy::FixedCapStrBase< CharType >:
daisy::FixedCapStr< capacity, CharType >

Public Member Functions

constexpr FixedCapStrBase (CharType *buffer, size_t capacity)
 
constexpr FixedCapStrBase (const FixedCapStrBase &other)=delete
 
constexpr FixedCapStrBaseoperator= (const FixedCapStrBase &str)
 
constexpr FixedCapStrBaseoperator= (const CharType *str)
 
constexpr operator const CharType * () const noexcept
 
constexpr const CharTypeCstr () const noexcept
 
constexpr const CharTypeData () const noexcept
 
constexpr CharTypeData () noexcept
 
constexpr auto Size () const noexcept
 
constexpr auto UpdateSize () noexcept
 
constexpr auto Capacity () const noexcept
 
constexpr auto Empty () const noexcept
 
constexpr void Clear () noexcept
 
constexpr void Reset (const CharType *str)
 
constexpr void Reset (const CharType *str, std::size_t length)
 
constexpr void ResetAt (const CharType *str, std::size_t writePosition)
 
constexpr void Append (const CharType singleChar)
 
constexpr void Append (const CharType *str)
 
constexpr void Append (const CharType *str, std::size_t length)
 
template<typename IntType >
constexpr void AppendInt (IntType value, bool alwaysIncludeSign=false)
 
constexpr void AppendFloat (float value, int maxNumDigits=2, bool omitTrailingZeros=false, bool alwaysIncludeSign=false)
 
constexpr bool StartsWith (const CharType *pattern) const noexcept
 
constexpr bool StartsWithIgnoringCase (const CharType *pattern) const noexcept
 
constexpr bool EndsWith (const CharType *pattern) const noexcept
 
constexpr bool EndsWithIgnoringCase (const CharType *pattern) const noexcept
 
constexpr void RemovePrefix (std::size_t length)
 
constexpr void RemoveSuffix (std::size_t length) noexcept
 
constexpr void ReverseSection (std::size_t firstIdx, std::size_t lastIdx)
 
constexpr bool operator== (const CharType *rhs) const
 
constexpr bool operator!= (const CharType *rhs) const
 
constexpr bool operator< (const CharType *other) const
 
constexpr bool operator<= (const CharType *other) const
 
constexpr bool operator> (const CharType *other) const
 
constexpr bool operator>= (const CharType *other) const
 
constexpr void Swap (FixedCapStrBase &rhs) noexcept
 

Protected Member Functions

constexpr void Reset_ (const CharType *str, std::size_t length)
 
constexpr void ResetAt_ (const CharType *str, std::size_t strLen, std::size_t writePosition)
 
constexpr void Append_ (const CharType *str, std::size_t to_copy)
 
std::size_t clamp (std::size_t val, std::size_t min, std::size_t max)
 

Static Protected Member Functions

static constexpr std::size_t strlen (const CharType *string)
 
static constexpr void Copy_ (const CharType *src, const CharType *srcEnd, CharType *dest)
 
static constexpr void Swap_ (CharType *a, CharType *b, size_t length)
 
static constexpr char ToUpper_ (char c) noexcept
 

Protected Attributes

std::size_t size_ {0}
 
const size_t capacity_
 
CharTypebuffer_
 

Constructor & Destructor Documentation

◆ FixedCapStrBase() [1/2]

template<class CharType = char>
constexpr daisy::FixedCapStrBase< CharType >::FixedCapStrBase ( CharType buffer,
size_t  capacity 
)
inlineconstexpr

◆ FixedCapStrBase() [2/2]

template<class CharType = char>
constexpr daisy::FixedCapStrBase< CharType >::FixedCapStrBase ( const FixedCapStrBase< CharType > &  other)
constexprdelete

Member Function Documentation

◆ Append() [1/3]

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Append ( const CharType str)
inlineconstexpr

◆ Append() [2/3]

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Append ( const CharType str,
std::size_t  length 
)
inlineconstexpr

◆ Append() [3/3]

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Append ( const CharType  singleChar)
inlineconstexpr

◆ Append_()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Append_ ( const CharType str,
std::size_t  to_copy 
)
inlineconstexprprotected

◆ AppendFloat()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::AppendFloat ( float  value,
int  maxNumDigits = 2,
bool  omitTrailingZeros = false,
bool  alwaysIncludeSign = false 
)
inlineconstexpr

◆ AppendInt()

template<class CharType = char>
template<typename IntType >
constexpr void daisy::FixedCapStrBase< CharType >::AppendInt ( IntType  value,
bool  alwaysIncludeSign = false 
)
inlineconstexpr

◆ Capacity()

template<class CharType = char>
constexpr auto daisy::FixedCapStrBase< CharType >::Capacity ( ) const
inlineconstexprnoexcept

◆ clamp()

template<class CharType = char>
std::size_t daisy::FixedCapStrBase< CharType >::clamp ( std::size_t  val,
std::size_t  min,
std::size_t  max 
)
inlineprotected

◆ Clear()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Clear ( )
inlineconstexprnoexcept

◆ Copy_()

template<class CharType = char>
static constexpr void daisy::FixedCapStrBase< CharType >::Copy_ ( const CharType src,
const CharType srcEnd,
CharType dest 
)
inlinestaticconstexprprotected

◆ Cstr()

template<class CharType = char>
constexpr const CharType * daisy::FixedCapStrBase< CharType >::Cstr ( ) const
inlineconstexprnoexcept

◆ Data() [1/2]

template<class CharType = char>
constexpr const CharType * daisy::FixedCapStrBase< CharType >::Data ( ) const
inlineconstexprnoexcept

◆ Data() [2/2]

template<class CharType = char>
constexpr CharType * daisy::FixedCapStrBase< CharType >::Data ( )
inlineconstexprnoexcept

◆ Empty()

template<class CharType = char>
constexpr auto daisy::FixedCapStrBase< CharType >::Empty ( ) const
inlineconstexprnoexcept

◆ EndsWith()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::EndsWith ( const CharType pattern) const
inlineconstexprnoexcept

◆ EndsWithIgnoringCase()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::EndsWithIgnoringCase ( const CharType pattern) const
inlineconstexprnoexcept

◆ operator const CharType *()

template<class CharType = char>
constexpr daisy::FixedCapStrBase< CharType >::operator const CharType * ( ) const
inlineconstexprnoexcept

◆ operator!=()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator!= ( const CharType rhs) const
inlineconstexpr

◆ operator<()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator< ( const CharType other) const
inlineconstexpr

◆ operator<=()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator<= ( const CharType other) const
inlineconstexpr

◆ operator=() [1/2]

template<class CharType = char>
constexpr FixedCapStrBase & daisy::FixedCapStrBase< CharType >::operator= ( const CharType str)
inlineconstexpr

◆ operator=() [2/2]

template<class CharType = char>
constexpr FixedCapStrBase & daisy::FixedCapStrBase< CharType >::operator= ( const FixedCapStrBase< CharType > &  str)
inlineconstexpr

◆ operator==()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator== ( const CharType rhs) const
inlineconstexpr

◆ operator>()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator> ( const CharType other) const
inlineconstexpr

◆ operator>=()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::operator>= ( const CharType other) const
inlineconstexpr

◆ RemovePrefix()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::RemovePrefix ( std::size_t  length)
inlineconstexpr

◆ RemoveSuffix()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::RemoveSuffix ( std::size_t  length)
inlineconstexprnoexcept

◆ Reset() [1/2]

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Reset ( const CharType str)
inlineconstexpr

◆ Reset() [2/2]

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Reset ( const CharType str,
std::size_t  length 
)
inlineconstexpr

◆ Reset_()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Reset_ ( const CharType str,
std::size_t  length 
)
inlineconstexprprotected

◆ ResetAt()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::ResetAt ( const CharType str,
std::size_t  writePosition 
)
inlineconstexpr

◆ ResetAt_()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::ResetAt_ ( const CharType str,
std::size_t  strLen,
std::size_t  writePosition 
)
inlineconstexprprotected

◆ ReverseSection()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::ReverseSection ( std::size_t  firstIdx,
std::size_t  lastIdx 
)
inlineconstexpr

◆ Size()

template<class CharType = char>
constexpr auto daisy::FixedCapStrBase< CharType >::Size ( ) const
inlineconstexprnoexcept

◆ StartsWith()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::StartsWith ( const CharType pattern) const
inlineconstexprnoexcept

◆ StartsWithIgnoringCase()

template<class CharType = char>
constexpr bool daisy::FixedCapStrBase< CharType >::StartsWithIgnoringCase ( const CharType pattern) const
inlineconstexprnoexcept

◆ strlen()

template<class CharType = char>
static constexpr std::size_t daisy::FixedCapStrBase< CharType >::strlen ( const CharType string)
inlinestaticconstexprprotected

◆ Swap()

template<class CharType = char>
constexpr void daisy::FixedCapStrBase< CharType >::Swap ( FixedCapStrBase< CharType > &  rhs)
inlineconstexprnoexcept

◆ Swap_()

template<class CharType = char>
static constexpr void daisy::FixedCapStrBase< CharType >::Swap_ ( CharType a,
CharType b,
size_t  length 
)
inlinestaticconstexprprotected

◆ ToUpper_()

template<class CharType = char>
static constexpr char daisy::FixedCapStrBase< CharType >::ToUpper_ ( char  c)
inlinestaticconstexprprotectednoexcept

◆ UpdateSize()

template<class CharType = char>
constexpr auto daisy::FixedCapStrBase< CharType >::UpdateSize ( )
inlineconstexprnoexcept

Member Data Documentation

◆ buffer_

template<class CharType = char>
CharType* daisy::FixedCapStrBase< CharType >::buffer_
protected

◆ capacity_

template<class CharType = char>
const size_t daisy::FixedCapStrBase< CharType >::capacity_
protected

◆ size_

template<class CharType = char>
std::size_t daisy::FixedCapStrBase< CharType >::size_ {0}
protected

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