Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::Runtime::Internal::StringStorage Class Reference

#include <string_storage.h>

Public Member Functions

 StringStorage (void *user_context=nullptr, uint32_t capacity=0, const SystemMemoryAllocatorFns &sma=default_allocator())
 
 StringStorage (const StringStorage &other)=default
 
 ~StringStorage ()
 
void initialize (void *user_context, uint32_t capacity=0, const SystemMemoryAllocatorFns &sma=default_allocator())
 
void destroy (void *user_context)
 
StringStorageoperator= (const StringStorage &other)
 
bool operator== (const StringStorage &other) const
 
bool operator!= (const StringStorage &other) const
 
bool contains (const char *str) const
 
bool contains (const StringStorage &other) const
 
void reserve (void *user_context, size_t length)
 
void assign (void *user_context, char ch)
 
void assign (void *user_context, const char *str, size_t length=0)
 
void append (void *user_context, char ch)
 
void append (void *user_context, const char *str, size_t length=0)
 
void prepend (void *user_context, char ch)
 
void prepend (void *user_context, const char *str, size_t length=0)
 
void clear (void *user_context)
 
void terminate (void *user_context, size_t length)
 
size_t length () const
 
const char * data () const
 
const SystemMemoryAllocatorFnscurrent_allocator () const
 

Static Public Member Functions

static StringStoragecreate (void *user_context, const SystemMemoryAllocatorFns &ma)
 
static void destroy (void *user_context, StringStorage *string_storage)
 
static const SystemMemoryAllocatorFnsdefault_allocator ()
 

Detailed Description

Definition at line 84 of file string_storage.h.

Constructor & Destructor Documentation

◆ StringStorage() [1/2]

Halide::Runtime::Internal::StringStorage::StringStorage ( void * user_context = nullptr,
uint32_t capacity = 0,
const SystemMemoryAllocatorFns & sma = default_allocator() )
explicit

Definition at line 124 of file string_storage.h.

◆ StringStorage() [2/2]

Halide::Runtime::Internal::StringStorage::StringStorage ( const StringStorage & other)
default

◆ ~StringStorage()

Halide::Runtime::Internal::StringStorage::~StringStorage ( )

Definition at line 131 of file string_storage.h.

References destroy().

Member Function Documentation

◆ create()

◆ destroy() [1/2]

void Halide::Runtime::Internal::StringStorage::destroy ( void * user_context,
StringStorage * string_storage )
static

◆ initialize()

void Halide::Runtime::Internal::StringStorage::initialize ( void * user_context,
uint32_t capacity = 0,
const SystemMemoryAllocatorFns & sma = default_allocator() )

Definition at line 280 of file string_storage.h.

References Halide::Runtime::Internal::BlockStorage::initialize(), reserve(), and terminate().

Referenced by create().

◆ destroy() [2/2]

void Halide::Runtime::Internal::StringStorage::destroy ( void * user_context)

◆ operator=()

StringStorage & Halide::Runtime::Internal::StringStorage::operator= ( const StringStorage & other)

Definition at line 157 of file string_storage.h.

References assign(), data(), and length().

◆ operator==()

bool Halide::Runtime::Internal::StringStorage::operator== ( const StringStorage & other) const

◆ operator!=()

bool Halide::Runtime::Internal::StringStorage::operator!= ( const StringStorage & other) const

Definition at line 193 of file string_storage.h.

◆ contains() [1/2]

◆ contains() [2/2]

◆ reserve()

void Halide::Runtime::Internal::StringStorage::reserve ( void * user_context,
size_t length )

◆ assign() [1/2]

◆ assign() [2/2]

void Halide::Runtime::Internal::StringStorage::assign ( void * user_context,
const char * str,
size_t length = 0 )

◆ append() [1/2]

void Halide::Runtime::Internal::StringStorage::append ( void * user_context,
char ch )

◆ append() [2/2]

◆ prepend() [1/2]

void Halide::Runtime::Internal::StringStorage::prepend ( void * user_context,
char ch )

◆ prepend() [2/2]

◆ clear()

void Halide::Runtime::Internal::StringStorage::clear ( void * user_context)

◆ terminate()

void Halide::Runtime::Internal::StringStorage::terminate ( void * user_context,
size_t length )

◆ length()

size_t Halide::Runtime::Internal::StringStorage::length ( ) const

◆ data()

◆ current_allocator()

const SystemMemoryAllocatorFns & Halide::Runtime::Internal::StringStorage::current_allocator ( ) const

Definition at line 299 of file string_storage.h.

References Halide::Runtime::Internal::BlockStorage::current_allocator().

Referenced by destroy().

◆ default_allocator()

const SystemMemoryAllocatorFns & Halide::Runtime::Internal::StringStorage::default_allocator ( )
static

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