Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
globalstringatomtable.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
16
#include "
util/stringatomtablebase.h
"
17
#include "
core/singleton.h
"
18
#include "
threading/criticalsection.h
"
19
#include "
util/stringbuffer.h
"
20
21
//------------------------------------------------------------------------------
22
namespace
Util
23
{
24
class
GlobalStringAtomTable
:
public
StringAtomTableBase
25
{
26
__DeclareInterfaceSingleton
(
GlobalStringAtomTable
);
27
public
:
29
GlobalStringAtomTable
();
31
~GlobalStringAtomTable
();
32
34
StringBuffer
*
GetGlobalStringBuffer
()
const
;
35
37
struct
DebugInfo
38
{
39
Util::Array<const char*>
strings
;
40
size_t
chunkSize
;
41
size_t
numChunks
;
42
size_t
allocSize
;
43
size_t
usedSize
;
44
bool
growthEnabled
;
45
};
46
48
DebugInfo
GetDebugInfo
()
const
;
49
50
private
:
51
friend
class
StringAtom
;
52
54
void
Lock
();
56
const
char
*
Add
(
const
char
* str);
58
void
Unlock
();
59
60
Threading::CriticalSection
critSect
;
61
StringBuffer
stringBuffer
;
62
};
63
64
}
// namespace Util
65
//------------------------------------------------------------------------------
66
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
Util::GlobalStringAtomTable::~GlobalStringAtomTable
~GlobalStringAtomTable()
destructor
Definition
globalstringatomtable.cc:27
Util::GlobalStringAtomTable::Add
const char * Add(const char *str)
add a string pointer to the atom table and string buffer (must be called inside Lock())
Definition
globalstringatomtable.cc:61
Util::GlobalStringAtomTable::Lock
void Lock()
take the critical section
Definition
globalstringatomtable.cc:39
Util::GlobalStringAtomTable::critSect
Threading::CriticalSection critSect
Definition
globalstringatomtable.h:60
Util::GlobalStringAtomTable::GetDebugInfo
DebugInfo GetDebugInfo() const
debug functionality: get copy of the string atom table
Definition
globalstringatomtable.cc:74
Util::GlobalStringAtomTable::StringAtom
friend class StringAtom
Definition
globalstringatomtable.h:51
Util::GlobalStringAtomTable::Unlock
void Unlock()
release the critical section
Definition
globalstringatomtable.cc:48
Util::GlobalStringAtomTable::__DeclareInterfaceSingleton
__DeclareInterfaceSingleton(GlobalStringAtomTable)
Util::GlobalStringAtomTable::stringBuffer
StringBuffer stringBuffer
Definition
globalstringatomtable.h:61
Util::GlobalStringAtomTable::GlobalStringAtomTable
GlobalStringAtomTable()
constructor
Definition
globalstringatomtable.cc:16
Util::GlobalStringAtomTable::GetGlobalStringBuffer
StringBuffer * GetGlobalStringBuffer() const
get pointer to global string buffer
Util::StringAtomTableBase::StringAtomTableBase
StringAtomTableBase()
constructor
Definition
stringatomtablebase.cc:17
Util::StringBuffer
Global string buffer for the StringAtom system.
Definition
stringbuffer.h:31
criticalsection.h
Util
A quad tree designed to return regions of free 2D space.
Definition
String.cs:6
singleton.h
stringatomtablebase.h
stringbuffer.h
Util::GlobalStringAtomTable::DebugInfo
debug functionality: DebugInfo struct
Definition
globalstringatomtable.h:38
Util::GlobalStringAtomTable::DebugInfo::numChunks
size_t numChunks
Definition
globalstringatomtable.h:41
Util::GlobalStringAtomTable::DebugInfo::chunkSize
size_t chunkSize
Definition
globalstringatomtable.h:40
Util::GlobalStringAtomTable::DebugInfo::allocSize
size_t allocSize
Definition
globalstringatomtable.h:42
Util::GlobalStringAtomTable::DebugInfo::usedSize
size_t usedSize
Definition
globalstringatomtable.h:43
Util::GlobalStringAtomTable::DebugInfo::strings
Util::Array< const char * > strings
Definition
globalstringatomtable.h:39
Util::GlobalStringAtomTable::DebugInfo::growthEnabled
bool growthEnabled
Definition
globalstringatomtable.h:44
code
foundation
util
globalstringatomtable.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.