ClanLib
2.3.7
|
Allocate strings in blocks. More...
#include <string_allocator.h>
Public Member Functions | |
Construction | |
CL_StringAllocator () | |
CL_StringAllocator (const CL_StringAllocator &source) | |
Constructs a StringAllocator. More... | |
~CL_StringAllocator () | |
Operations | |
CL_StringAllocator & | operator= (const CL_StringAllocator &source) |
CL_StringRef8 | alloc (const CL_StringRef8 &str) |
Alloc. More... | |
CL_StringRef8 | alloc (const char *str) |
Alloc. More... | |
CL_StringRef8 | alloc (const char *str, CL_StringRef8::size_type length) |
CL_StringRef16 | alloc (const CL_StringRef16 &str) |
Alloc. More... | |
CL_StringRef16 | alloc (const wchar_t *str) |
Alloc. More... | |
CL_StringRef16 | alloc (const wchar_t *str, CL_StringRef16::size_type length) |
CL_StringRef | alloc (unsigned int length) |
Alloc. More... | |
CL_StringRef8 | alloc8 (unsigned int length) |
Alloc8. More... | |
CL_StringRef16 | alloc16 (unsigned int length) |
Alloc16. More... | |
void | clear () |
Clear. More... | |
Allocate strings in blocks.
This class allows you to efficiently allocate strings. Instead of using the default new operator, this class allocates string data in blocks. The temporary strings returned by the class remain valid as long as the CL_StringAllocator stays valid, or until clear() is called.
CL_StringAllocator::CL_StringAllocator | ( | ) |
CL_StringAllocator::CL_StringAllocator | ( | const CL_StringAllocator & | source) |
Constructs a StringAllocator.
source | = String Allocator |
CL_StringAllocator::~CL_StringAllocator | ( | ) |
CL_StringRef8 CL_StringAllocator::alloc | ( | const CL_StringRef8 & | str) |
Alloc.
str | = String Ref8 |
CL_StringRef8 CL_StringAllocator::alloc | ( | const char * | str) |
Alloc.
str | = char |
CL_StringRef8 CL_StringAllocator::alloc | ( | const char * | str, |
CL_StringRef8::size_type | length | ||
) |
CL_StringRef16 CL_StringAllocator::alloc | ( | const CL_StringRef16 & | str) |
Alloc.
str | = String Ref16 |
CL_StringRef16 CL_StringAllocator::alloc | ( | const wchar_t * | str) |
Alloc.
str | = wchar_t |
CL_StringRef16 CL_StringAllocator::alloc | ( | const wchar_t * | str, |
CL_StringRef16::size_type | length | ||
) |
CL_StringRef CL_StringAllocator::alloc | ( | unsigned int | length) |
Alloc.
length | = value |
CL_StringRef16 CL_StringAllocator::alloc16 | ( | unsigned int | length) |
Alloc16.
length | = value |
CL_StringRef8 CL_StringAllocator::alloc8 | ( | unsigned int | length) |
Alloc8.
length | = value |
void CL_StringAllocator::clear | ( | ) |
Clear.
CL_StringAllocator& CL_StringAllocator::operator= | ( | const CL_StringAllocator & | source) |