wavelength 1.0.0
Loading...
Searching...
No Matches
DataString.h
Go to the documentation of this file.
1#pragma once
2
3#include "utl/Data.h"
4
11
18
28const char *DataFindString(const char *str);
29
37const char *DataAddString(const char *str);
38
46inline const char *DataInternString(const char *str) {
47 const char *interned = DataFindString(str);
48 if (interned == NULL) {
49 interned = DataAddString(str);
50 }
51 return interned;
52}
53
61void DataSetMacro(const char *name, DataArray *macro);
62
70DataArray *DataGetMacro(const char *name);
const char * DataAddString(const char *str)
Intern a string that is not interned yet.
void DataStringTerminate()
Release every macro and forget them.
DataArray * DataGetMacro(const char *name)
Look up a macro.
void DataStringInit()
Size the string table and empty its hash table.
void DataSetMacro(const char *name, DataArray *macro)
Define or replace a macro.
const char * DataFindString(const char *str)
Find the interned copy of a string.
const char * DataInternString(const char *str)
Find the interned copy of a string, interning it first when it is not interned yet.
Definition DataString.h:46
Reference-counted array of script data nodes.
Definition dataarray.h:20