xo-expression2: + DUniqueString, use in StringTable
This commit is contained in:
parent
d87caecce8
commit
87ddccd717
2 changed files with 48 additions and 5 deletions
|
|
@ -73,11 +73,18 @@ namespace xo {
|
|||
const char * cstr);
|
||||
|
||||
/** create string containing a copy of @p sv.
|
||||
* Use memory from allocator @p mm
|
||||
* Use memory from allocator @p mm.
|
||||
**/
|
||||
static DString * from_view(obj<AAllocator> mm,
|
||||
std::string_view sv);
|
||||
|
||||
/** create string containing a copy of @p sv.
|
||||
* Use memory from allocator @p mm via sub_alloc.
|
||||
* (load-bearing for StringTable)
|
||||
**/
|
||||
static DString * from_view_suballoc(obj<AAllocator> mm,
|
||||
std::string_view sv);
|
||||
|
||||
/** clone existing string **/
|
||||
static DString * clone(obj<AAllocator> mm,
|
||||
const DString * src);
|
||||
|
|
@ -244,6 +251,20 @@ namespace xo {
|
|||
|
||||
///@}
|
||||
|
||||
private:
|
||||
/** @defgroup dstring-impl-methods implementation methods **/
|
||||
///@{
|
||||
|
||||
/** create instance from view @p sv, using memory from @p mm.
|
||||
* @p suballoc_flag chooses whether to use alloc() or suballoc().
|
||||
* Load-bearing for StringTable
|
||||
**/
|
||||
static DString * _from_view_aux(obj<AAllocator> mm,
|
||||
std::string_view sv,
|
||||
bool suballoc_flag);
|
||||
|
||||
///@}
|
||||
|
||||
private:
|
||||
/** @defgroup dstring-instance-variables instance variables **/
|
||||
///@{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue