asmjit::ZoneString< N > Class Template Reference
template<size_t N>
class asmjit::ZoneString< N >

A string template that can be zone allocated.

Helps with creating strings that can be either statically allocated if they are small, or externally allocated in case their size exceeds the limit. The N represents the size of the whole ZoneString structure, based on that size the maximum size of the internal buffer is determined.

Public Members

Members

Public Types

Constants

Member Functions

Construction & Destruction
Accessors

Member Function Documentation

template<size_t N>
bool ZoneString<N>::empty() constnoexcept◆ 

Tests whether the string is empty.

template<size_t N>
const char* ZoneString<N>::data() constnoexcept◆ 

Returns the string data.

template<size_t N>
uint32_t ZoneString<N>::size() constnoexcept◆ 

Returns the string size.

template<size_t N>
bool ZoneString<N>::isEmbedded() constnoexcept◆ 

Tests whether the string is embedded (e.g. no dynamically allocated).

template<size_t N>
Error ZoneString<N>::setData(Zone* zone, const char* data, size_t size)noexcept◆ 

Copies a new data of the given size to the string.

If the size exceeds the internal buffer the given zone will be used to duplicate the data, otherwise the internal buffer will be used as a storage.