OpenClonk
C4String Class Reference

#include <C4StringTable.h>

Inheritance diagram for C4String:
[legend]
Collaboration diagram for C4String:
[legend]

Public Member Functions

 ~C4String () override
 
const char * GetCStr () const
 
StdStrBuf GetData () const
 
void IncRef ()
 
void DecRef ()
 

Public Attributes

unsigned int Hash
 

Protected Attributes

unsigned int RefCnt {0}
 

Friends

class C4StringTable
 

Detailed Description

Definition at line 34 of file C4StringTable.h.

Constructor & Destructor Documentation

◆ ~C4String()

C4String::~C4String ( )
override

Definition at line 53 of file C4StringTable.cpp.

54 {
55  // unreg
56 #ifdef _DEBUG
57  static bool remove = false;
58  assert(!remove); (void)remove;
59  remove = true;
60 #endif
61  Strings.Set.Remove(this);
62 #ifdef _DEBUG
63  remove = false;
64 #endif
65 }
C4StringTable Strings
Definition: C4Globals.cpp:42
void Remove(H e)

References C4Set< T >::Remove(), and Strings.

Here is the call graph for this function:

Member Function Documentation

◆ DecRef()

void C4RefCnt::DecRef ( )
inlineinherited

Definition at line 28 of file C4StringTable.h.

28 { if (!--RefCnt) delete this; }
unsigned int RefCnt
Definition: C4StringTable.h:31

References C4RefCnt::RefCnt.

Referenced by C4Command::Clear(), C4Command::CompileFunc(), C4Property::CompileFunc(), C4Def::GetActionByName(), C4Property::operator=(), C4Object::SetActionByName(), C4AulScriptFunc::SetOverloaded(), C4ScriptHost::UnlinkOwnedFunctions(), C4AulScriptFunc::~C4AulScriptFunc(), C4Property::~C4Property(), C4ScriptGuiWindow::~C4ScriptGuiWindow(), and C4ScriptGuiWindowAction::~C4ScriptGuiWindowAction().

Here is the caller graph for this function:

◆ GetCStr()

const char* C4String::GetCStr ( ) const
inline

◆ GetData()

StdStrBuf C4String::GetData ( ) const
inline

Definition at line 50 of file C4StringTable.h.

50 { return Data.getRef(); }
StdStrBuf getRef() const
Definition: StdBuf.h:462

References StdStrBuf::getRef().

Referenced by C4PropertyPath::C4PropertyPath(), C4Command::CompileFunc(), C4Property::CompileFunc(), C4Value::CompileFunc(), C4EditCursor::DoContextMenu(), C4PropListStatic::GetDataString(), C4AulFunc::GetFullName(), C4ValueArraySortcomp::operator()(), C4PropListStatic::RefCompileFunc(), C4Object::SetAction(), C4Value::ToJSON(), and C4GraphicsOverlay::UpdateFacet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IncRef()

void C4RefCnt::IncRef ( )
inlineinherited

Definition at line 27 of file C4StringTable.h.

27 { RefCnt++; }

References C4RefCnt::RefCnt.

Referenced by C4Property::C4Property(), C4Command::CompileFunc(), C4Property::CompileFunc(), C4ScriptGuiWindow::CreateFromPropList(), C4Def::GetActionByName(), C4ScriptGuiWindowAction::Init(), C4Property::operator=(), C4ScriptGuiWindowProperty::Set(), C4Command::Set(), C4Object::SetActionByName(), and C4AulScriptFunc::SetOverloaded().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4StringTable

friend class C4StringTable
friend

Definition at line 45 of file C4StringTable.h.

Member Data Documentation

◆ Hash

unsigned int C4String::Hash

Definition at line 37 of file C4StringTable.h.

◆ RefCnt

unsigned int C4RefCnt::RefCnt {0}
protectedinherited

Definition at line 31 of file C4StringTable.h.

Referenced by C4RefCnt::DecRef(), and C4RefCnt::IncRef().


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