IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::HeapString< CharT > Struct Template Reference

#include <ice/heap_string.hxx>

Inheritance diagram for ice::HeapString< CharT >:
ice::string::ResizableOperations ice::string::MutableOperations ice::string::ReadOnlyOperations

Public Types

using CharType = CharT
using ValueType = CharType
using Iterator = CharType*
using ReverseIterator = std::reverse_iterator<CharType*>
using ConstIterator = CharType const*
using ConstReverseIterator = std::reverse_iterator<CharType const*>
using SizeType = ice::ncount
using StringType = ice::BasicString<CharType>

Public Member Functions

 HeapString (ice::Allocator &allocator) noexcept
 HeapString (ice::Allocator &allocator, ice::BasicString< CharType > string) noexcept
 ~HeapString () noexcept
 HeapString (HeapString &&other) noexcept
 HeapString (HeapString const &other) noexcept
auto operator= (HeapString &&other) noexcept -> HeapString &
auto operator= (HeapString const &other) noexcept -> HeapString &
auto operator= (ice::BasicString< CharType > str) noexcept -> HeapString &
 operator ice::BasicString< CharType > () const noexcept
template<typename Self>
auto data (this Self &self) noexcept -> ValueType *
auto size () const noexcept -> SizeType
void resize (ice::ncount new_size) noexcept
auto capacity () const noexcept -> SizeType
void set_capacity (ice::ncount new_capacity) noexcept
auto data_view () const noexcept -> ice::Data
auto extract_memory () noexcept -> ice::Memory
Public Member Functions inherited from ice::string::ResizableOperations
template<ResizableStringType Self>
void shrink (this Self &self) noexcept
template<ResizableStringType Self>
void reserve (this Self &self, ice::ncount min_capacity) noexcept
template<ResizableStringType Self>
void grow (this Self &self, ice::ncount min_capacity=ncount_none) noexcept
Public Member Functions inherited from ice::string::MutableOperations
template<MutableStringType Self>
void clear (this Self &self) noexcept
template<MutableStringType Self>
void push_back (this Self &self, typename Self::CharType character) noexcept
template<MutableStringType Self>
void push_back (this Self &self, typename Self::CharType const *cstr) noexcept
template<MutableStringType Self>
void push_back (this Self &self, ice::StringType auto const &other) noexcept
template<MutableStringType Self, typename... Args>
constexpr void push_format (this Self &self, fmt::format_string< Args... > format, Args &&... args) noexcept
template<MutableStringType Self>
void pop_back (this Self &self, ice::ncount count=1) noexcept
template<MutableStringType Self>
constexpr auto begin (this Self &self) noexcept -> typename Self::Iterator
template<MutableStringType Self>
constexpr auto end (this Self &self) noexcept -> typename Self::Iterator
template<MutableStringType Self>
constexpr auto rbegin (this Self &self) noexcept -> typename Self::ReverseIterator
template<MutableStringType Self>
constexpr auto rend (this Self &self) noexcept -> typename Self::ReverseIterator
template<MutableStringType Self>
constexpr auto operator[] (this Self &self, ice::nindex index) noexcept -> typename Self::ValueType &
template<MutableStringType Self>
constexpr auto memory_view (this Self &self) noexcept -> ice::Memory
template<StringType Self>
constexpr auto operator[] (this Self const &self, ice::nindex index) noexcept -> typename Self::ValueType
Public Member Functions inherited from ice::string::ReadOnlyOperations
template<StringType Self>
constexpr bool is_empty (this Self const &self) noexcept
template<StringType Self>
constexpr bool not_empty (this Self const &self) noexcept
template<StringType Self>
constexpr auto front (this Self const &self) noexcept -> typename Self::CharType
template<StringType Self>
constexpr auto back (this Self const &self) noexcept -> typename Self::CharType
template<StringType Self>
constexpr auto substr (this Self const &self, ice::nindex pos, ice::ncount len={}) noexcept -> typename Self::StringType
template<StringType Self>
constexpr auto substr (this Self const &self, ice::ref32 ref) noexcept -> typename Self::StringType
template<StringType Self>
constexpr auto starts_with (this Self const &self, StringType auto prefix) noexcept
template<StringType Self>
constexpr auto find_first_of (this Self const &self, typename Self::CharType character_value, ice::nindex start=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_first_of (this Self const &self, typename Self::StringType character_values, ice::nindex start=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_last_of (this Self const &self, typename Self::CharType character_value, ice::nindex start=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_last_of (this Self const &self, typename Self::StringType character_values, ice::nindex start=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_first_not_of (this Self const &self, typename Self::CharType character_value, ice::nindex start_idx=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_first_not_of (this Self const &self, typename Self::StringType character_values, ice::nindex start_idx=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_last_not_of (this Self const &self, typename Self::CharType character_value, ice::nindex start_idx=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto find_last_not_of (this Self const &self, typename Self::StringType character_values, ice::nindex start_idx=0) noexcept -> ice::nindex
template<StringType Self>
constexpr auto cbegin (this Self const &self) noexcept -> typename Self::ConstIterator
template<StringType Self>
constexpr auto cend (this Self const &self) noexcept -> typename Self::ConstIterator
template<StringType Self>
constexpr auto crbegin (this Self const &self) noexcept -> typename Self::ConstReverseIterator
template<StringType Self>
constexpr auto crend (this Self const &self) noexcept -> typename Self::ConstReverseIterator
template<StringType Self>
constexpr auto begin (this Self const &self) noexcept -> typename Self::ConstIterator
template<StringType Self>
constexpr auto end (this Self const &self) noexcept -> typename Self::ConstIterator
template<StringType Self>
constexpr auto rbegin (this Self const &self) noexcept -> typename Self::ConstReverseIterator
template<StringType Self>
constexpr auto rend (this Self const &self) noexcept -> typename Self::ConstReverseIterator
template<StringType Self>
constexpr auto operator[] (this Self const &self, ice::nindex index) noexcept -> typename Self::ValueType
template<StringType Self>
constexpr bool operator== (this Self const &self, typename Self::StringType const &other) noexcept
template<StringType Self>
constexpr auto meminfo (this Self const &self) noexcept -> ice::meminfo

Public Attributes

ice::Allocator_allocator
ice::u32 _capacity
ice::u32 _size
ValueType_data

Member Typedef Documentation

◆ CharType

template<typename CharT = char>
using ice::HeapString< CharT >::CharType = CharT

◆ ConstIterator

template<typename CharT = char>
using ice::HeapString< CharT >::ConstIterator = CharType const*

◆ ConstReverseIterator

template<typename CharT = char>
using ice::HeapString< CharT >::ConstReverseIterator = std::reverse_iterator<CharType const*>

◆ Iterator

template<typename CharT = char>
using ice::HeapString< CharT >::Iterator = CharType*

◆ ReverseIterator

template<typename CharT = char>
using ice::HeapString< CharT >::ReverseIterator = std::reverse_iterator<CharType*>

◆ SizeType

template<typename CharT = char>
using ice::HeapString< CharT >::SizeType = ice::ncount

◆ StringType

template<typename CharT = char>
using ice::HeapString< CharT >::StringType = ice::BasicString<CharType>

◆ ValueType

template<typename CharT = char>
using ice::HeapString< CharT >::ValueType = CharType

Constructor & Destructor Documentation

◆ HeapString() [1/4]

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
ice::HeapString< CharT >::HeapString ( ice::Allocator & allocator)
inlineexplicitnoexcept

◆ HeapString() [2/4]

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
ice::HeapString< CharT >::HeapString ( ice::Allocator & allocator,
ice::BasicString< CharType > string )
inlinenoexcept

◆ ~HeapString()

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
ice::HeapString< CharT >::~HeapString ( )
inlinenoexcept

◆ HeapString() [3/4]

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
ice::HeapString< CharT >::HeapString ( HeapString< CharT > && other)
inlinenoexcept

◆ HeapString() [4/4]

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
ice::HeapString< CharT >::HeapString ( HeapString< CharT > const & other)
inlinenoexcept

Member Function Documentation

◆ capacity()

template<typename CharT = char>
auto ice::HeapString< CharT >::capacity ( ) const -> SizeType
inlinenoexcept

◆ data()

template<typename CharT = char>
template<typename Self>
auto ice::HeapString< CharT >::data ( this Self & self) -> ValueType *
inlinenoexcept

◆ data_view()

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
auto ice::HeapString< CharT >::data_view ( ) const -> ice::Data
inlinenoexcept

◆ extract_memory()

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
auto ice::HeapString< CharT >::extract_memory ( ) -> ice::Memory
inlinenoexcept

◆ operator ice::BasicString< CharType >()

template<typename CharT = char>
ice::HeapString< CharT >::operator ice::BasicString< CharType > ( ) const
inlinenoexcept

◆ operator=() [1/3]

template<typename CharT = char>
auto ice::HeapString< CharT >::operator= ( HeapString< CharT > && other) -> HeapString &
inlinenoexcept

◆ operator=() [2/3]

template<typename CharT = char>
auto ice::HeapString< CharT >::operator= ( HeapString< CharT > const & other) -> HeapString &
inlinenoexcept

◆ operator=() [3/3]

template<typename CharT = char>
auto ice::HeapString< CharT >::operator= ( ice::BasicString< CharType > str) -> HeapString &
inlinenoexcept

◆ resize()

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
void ice::HeapString< CharT >::resize ( ice::ncount new_size)
inlinenoexcept

◆ set_capacity()

template<typename CharT>
requires ice::concepts::SupportedCharType<CharT>
void ice::HeapString< CharT >::set_capacity ( ice::ncount new_capacity)
inlinenoexcept

◆ size()

template<typename CharT = char>
auto ice::HeapString< CharT >::size ( ) const -> SizeType
inlinenoexcept

Member Data Documentation

◆ _allocator

template<typename CharT = char>
ice::Allocator* ice::HeapString< CharT >::_allocator

◆ _capacity

template<typename CharT = char>
ice::u32 ice::HeapString< CharT >::_capacity

◆ _data

template<typename CharT = char>
ValueType* ice::HeapString< CharT >::_data

◆ _size

template<typename CharT = char>
ice::u32 ice::HeapString< CharT >::_size

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