LMMS
Loading...
Searching...
No Matches
water::StringHolder Class Reference

Public Types

typedef CharPointer_UTF8::CharType CharType

Public Member Functions

 StringHolder () WATER_DELETED_FUNCTION

Static Public Member Functions

static CharPointer_UTF8 createUninitialisedBytes (size_t numBytes)
template<class CharPointer>
static CharPointer_UTF8 createFromCharPointer (const CharPointer text)
template<class CharPointer>
static CharPointer_UTF8 createFromCharPointer (const CharPointer text, size_t maxChars)
template<class CharPointer>
static CharPointer_UTF8 createFromCharPointer (const CharPointer start, const CharPointer end)
static CharPointer_UTF8 createFromCharPointer (const CharPointer_UTF8 start, const CharPointer_UTF8 end)
static CharPointer_UTF8 createFromFixedLength (const char *const src, const size_t numChars)
static void retain (const CharPointer_UTF8 text) noexcept
static void release (StringHolder *const b) noexcept
static void release (const CharPointer_UTF8 text) noexcept
static int getReferenceCount (const CharPointer_UTF8 text) noexcept
static CharPointer_UTF8 makeUniqueWithByteSize (const CharPointer_UTF8 text, size_t numBytes)
static size_t getAllocatedNumBytes (const CharPointer_UTF8 text) noexcept

Public Attributes

Atomic< intrefCount
size_t allocatedNumBytes
CharType text [1]

Static Private Member Functions

static StringHolderbufferFromText (const CharPointer_UTF8 text) noexcept

Member Typedef Documentation

◆ CharType

Constructor & Destructor Documentation

◆ StringHolder()

water::StringHolder::StringHolder ( )

Member Function Documentation

◆ bufferFromText()

StringHolder * water::StringHolder::bufferFromText ( const CharPointer_UTF8 text)
inlinestaticprivatenoexcept

◆ createFromCharPointer() [1/4]

template<class CharPointer>
CharPointer_UTF8 water::StringHolder::createFromCharPointer ( const CharPointer start,
const CharPointer end )
inlinestatic

◆ createFromCharPointer() [2/4]

template<class CharPointer>
CharPointer_UTF8 water::StringHolder::createFromCharPointer ( const CharPointer text)
inlinestatic

◆ createFromCharPointer() [3/4]

template<class CharPointer>
CharPointer_UTF8 water::StringHolder::createFromCharPointer ( const CharPointer text,
size_t maxChars )
inlinestatic

◆ createFromCharPointer() [4/4]

CharPointer_UTF8 water::StringHolder::createFromCharPointer ( const CharPointer_UTF8 start,
const CharPointer_UTF8 end )
inlinestatic

◆ createFromFixedLength()

CharPointer_UTF8 water::StringHolder::createFromFixedLength ( const char *const src,
const size_t numChars )
inlinestatic

◆ createUninitialisedBytes()

CharPointer_UTF8 water::StringHolder::createUninitialisedBytes ( size_t numBytes)
inlinestatic

◆ getAllocatedNumBytes()

size_t water::StringHolder::getAllocatedNumBytes ( const CharPointer_UTF8 text)
inlinestaticnoexcept

◆ getReferenceCount()

int water::StringHolder::getReferenceCount ( const CharPointer_UTF8 text)
inlinestaticnoexcept

◆ makeUniqueWithByteSize()

CharPointer_UTF8 water::StringHolder::makeUniqueWithByteSize ( const CharPointer_UTF8 text,
size_t numBytes )
inlinestatic

◆ release() [1/2]

void water::StringHolder::release ( const CharPointer_UTF8 text)
inlinestaticnoexcept

◆ release() [2/2]

void water::StringHolder::release ( StringHolder *const b)
inlinestaticnoexcept

◆ retain()

void water::StringHolder::retain ( const CharPointer_UTF8 text)
inlinestaticnoexcept

Member Data Documentation

◆ allocatedNumBytes

size_t water::StringHolder::allocatedNumBytes

◆ refCount

Atomic<int> water::StringHolder::refCount

◆ text

CharType water::StringHolder::text[1]

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