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 ()
 
const char * GetCStr () const
 
StdStrBuf GetData () const
 
void IncRef ()
 
void DecRef ()
 

Public Attributes

unsigned int Hash
 

Protected Attributes

unsigned int RefCnt
 

Friends

class C4StringTable
 

Detailed Description

Definition at line 34 of file C4StringTable.h.

Constructor & Destructor Documentation

C4String::~C4String ( )

Definition at line 55 of file C4StringTable.cpp.

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

56 {
57  // unreg
58 #ifdef _DEBUG
59  static bool remove = false;
60  assert(!remove); (void)remove;
61  remove = true;
62 #endif
63  Strings.Set.Remove(this);
64 #ifdef _DEBUG
65  remove = false;
66 #endif
67 }
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 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:470

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
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: