OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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 ( )
override

Definition at line 53 of file C4StringTable.cpp.

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

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)

Here is the call graph for this function:

Member Function Documentation

void C4RefCnt::DecRef ( )
inlineinherited

Definition at line 28 of file C4StringTable.h.

References C4RefCnt::RefCnt.

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

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

Here is the caller graph for this function:

StdStrBuf C4String::GetData ( ) const
inline

Definition at line 50 of file C4StringTable.h.

References StdStrBuf::getRef().

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void C4RefCnt::IncRef ( )
inlineinherited

Definition at line 27 of file C4StringTable.h.

References C4RefCnt::RefCnt.

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

27 { RefCnt++; }
unsigned int RefCnt
Definition: C4StringTable.h:31

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class C4StringTable
friend

Definition at line 45 of file C4StringTable.h.

Member Data Documentation

unsigned int C4String::Hash

Definition at line 37 of file C4StringTable.h.

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: