Skip to content

Class daisy::FixedCapStrBase

template <class CharType>

ClassList > daisy > FixedCapStrBase

Inherited by the following classes: daisy::FixedCapStr

Public Functions

Type Name
constexpr void Append (const CharType singleChar)
constexpr void Append (const CharType * str)
constexpr void Append (const CharType * str, std::size_t length)
constexpr void AppendFloat (float value, int maxNumDigits=2, bool omitTrailingZeros=false, bool alwaysIncludeSign=false)
constexpr void AppendInt (IntType value, bool alwaysIncludeSign=false)
constexpr auto Capacity () noexcept const
constexpr void Clear () noexcept
constexpr const CharType * Cstr () noexcept const
constexpr const CharType * Data () noexcept const
constexpr CharType * Data () noexcept
constexpr auto Empty () noexcept const
constexpr bool EndsWith (const CharType * pattern) noexcept const
constexpr bool EndsWithIgnoringCase (const CharType * pattern) noexcept const
constexpr FixedCapStrBase (CharType * buffer, size_t capacity)
constexpr FixedCapStrBase (const FixedCapStrBase & other) = delete
constexpr void RemovePrefix (std::size_t length)
constexpr void RemoveSuffix (std::size_t length) 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 ReverseSection (std::size_t firstIdx, std::size_t lastIdx)
constexpr auto Size () noexcept const
constexpr bool StartsWith (const CharType * pattern) noexcept const
constexpr bool StartsWithIgnoringCase (const CharType * pattern) noexcept const
constexpr void Swap (FixedCapStrBase & rhs) noexcept
constexpr auto UpdateSize () noexcept
constexpr operator const CharType * () noexcept const
constexpr bool operator!= (const CharType * rhs) const
constexpr bool operator< (const CharType * other) const
constexpr bool operator<= (const CharType * other) const
constexpr FixedCapStrBase & operator= (const FixedCapStrBase & str)
constexpr FixedCapStrBase & operator= (const CharType * str)
constexpr bool operator== (const CharType * rhs) const
constexpr bool operator> (const CharType * other) const
constexpr bool operator>= (const CharType * other) const

Protected Attributes

Type Name
CharType * buffer_
const size_t capacity_
std::size_t size_ = {0}

Protected Functions

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

Protected Static Functions

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

Public Functions Documentation

function Append [⅓]

inline constexpr  void daisy::FixedCapStrBase::Append (
    const  CharType singleChar
) 

function Append [⅔]

inline constexpr  void daisy::FixedCapStrBase::Append (
    const  CharType * str
) 

function Append [3/3]

inline constexpr  void daisy::FixedCapStrBase::Append (
    const  CharType * str,
    std::size_t length
) 

function AppendFloat

inline constexpr  void daisy::FixedCapStrBase::AppendFloat (
    float value,
    int maxNumDigits=2,
    bool omitTrailingZeros=false,
    bool alwaysIncludeSign=false
) 

function AppendInt

template<typename  IntType>
inline constexpr  void daisy::FixedCapStrBase::AppendInt (
    IntType value,
    bool alwaysIncludeSign=false
) 

function Capacity

inline constexpr  auto daisy::FixedCapStrBase::Capacity () noexcept const

function Clear

inline constexpr  void daisy::FixedCapStrBase::Clear () noexcept

function Cstr

inline constexpr  const  CharType * daisy::FixedCapStrBase::Cstr () noexcept const

function Data [½]

inline constexpr  const  CharType * daisy::FixedCapStrBase::Data () noexcept const

function Data [2/2]

inline constexpr  CharType * daisy::FixedCapStrBase::Data () noexcept

function Empty

inline constexpr  auto daisy::FixedCapStrBase::Empty () noexcept const

function EndsWith

inline constexpr  bool daisy::FixedCapStrBase::EndsWith (
    const  CharType * pattern
) noexcept const

function EndsWithIgnoringCase

inline constexpr  bool daisy::FixedCapStrBase::EndsWithIgnoringCase (
    const  CharType * pattern
) noexcept const

function FixedCapStrBase [½]

inline constexpr daisy::FixedCapStrBase::FixedCapStrBase (
    CharType * buffer,
    size_t capacity
) 

function FixedCapStrBase [2/2]

constexpr daisy::FixedCapStrBase::FixedCapStrBase (
    const  FixedCapStrBase & other
) = delete

function RemovePrefix

inline constexpr  void daisy::FixedCapStrBase::RemovePrefix (
    std::size_t length
) 

function RemoveSuffix

inline constexpr  void daisy::FixedCapStrBase::RemoveSuffix (
    std::size_t length
) noexcept

function Reset [½]

inline constexpr  void daisy::FixedCapStrBase::Reset (
    const  CharType * str
) 

function Reset [2/2]

inline constexpr  void daisy::FixedCapStrBase::Reset (
    const  CharType * str,
    std::size_t length
) 

function ResetAt

inline constexpr  void daisy::FixedCapStrBase::ResetAt (
    const  CharType * str,
    std::size_t writePosition
) 

function ReverseSection

inline constexpr  void daisy::FixedCapStrBase::ReverseSection (
    std::size_t firstIdx,
    std::size_t lastIdx
) 

function Size

inline constexpr  auto daisy::FixedCapStrBase::Size () noexcept const

function StartsWith

inline constexpr  bool daisy::FixedCapStrBase::StartsWith (
    const  CharType * pattern
) noexcept const

function StartsWithIgnoringCase

inline constexpr  bool daisy::FixedCapStrBase::StartsWithIgnoringCase (
    const  CharType * pattern
) noexcept const

function Swap

inline constexpr  void daisy::FixedCapStrBase::Swap (
    FixedCapStrBase & rhs
) noexcept

function UpdateSize

inline constexpr  auto daisy::FixedCapStrBase::UpdateSize () noexcept

function operator const CharType *

inline constexpr daisy::FixedCapStrBase::operator const CharType * () noexcept const

function operator!=

inline constexpr  bool daisy::FixedCapStrBase::operator!= (
    const  CharType * rhs
) const

function operator<

inline constexpr  bool daisy::FixedCapStrBase::operator< (
    const  CharType * other
) const

function operator<=

inline constexpr  bool daisy::FixedCapStrBase::operator<= (
    const  CharType * other
) const

function operator=

inline constexpr  FixedCapStrBase & daisy::FixedCapStrBase::operator= (
    const  FixedCapStrBase & str
) 

function operator=

inline constexpr  FixedCapStrBase & daisy::FixedCapStrBase::operator= (
    const  CharType * str
) 

function operator==

inline constexpr  bool daisy::FixedCapStrBase::operator== (
    const  CharType * rhs
) const

function operator>

inline constexpr  bool daisy::FixedCapStrBase::operator> (
    const  CharType * other
) const

function operator>=

inline constexpr  bool daisy::FixedCapStrBase::operator>= (
    const  CharType * other
) const

Protected Attributes Documentation

variable buffer_

CharType* daisy::FixedCapStrBase< CharType >::buffer_;

variable capacity_

const size_t daisy::FixedCapStrBase< CharType >::capacity_;

variable size_

std::size_t daisy::FixedCapStrBase< CharType >::size_;

Protected Functions Documentation

function Append_

inline constexpr  void daisy::FixedCapStrBase::Append_ (
    const  CharType * str,
    std::size_t to_copy
) 

function ResetAt_

inline constexpr  void daisy::FixedCapStrBase::ResetAt_ (
    const  CharType * str,
    std::size_t strLen,
    std::size_t writePosition
) 

function Reset_

inline constexpr  void daisy::FixedCapStrBase::Reset_ (
    const  CharType * str,
    std::size_t length
) 

function clamp

inline std::size_t daisy::FixedCapStrBase::clamp (
    std::size_t val,
    std::size_t min,
    std::size_t max
) 

Protected Static Functions Documentation

function Copy_

static inline constexpr  void daisy::FixedCapStrBase::Copy_ (
    const  CharType * src,
    const  CharType * srcEnd,
    CharType * dest
) 

function Swap_

static inline constexpr  void daisy::FixedCapStrBase::Swap_ (
    CharType * a,
    CharType * b,
    size_t length
) 

function ToUpper_

static inline constexpr  char daisy::FixedCapStrBase::ToUpper_ (
    char c
) noexcept

function strlen

static inline constexpr std::size_t daisy::FixedCapStrBase::strlen (
    const  CharType * string
) 


The documentation for this class was generated from the following file external-docs/libDaisy/src/util/FixedCapStr.h