A key/value pair of strings. More...
#include <entitylib.h>
Public Types | |
typedef MemberCaller1 < KeyValue, const std::string &,&KeyValue::importState > | UndoImportCaller |
Public Member Functions | |
KeyValue (const char *string, const char *empty) | |
~KeyValue () | |
void | IncRef () |
void | DecRef () |
void | instanceAttach (MapFile *map) |
void | instanceDetach (MapFile *map) |
void | attach (const KeyObserver &observer) |
void | detach (const KeyObserver &observer) |
const char * | c_str () const |
void | assign (const std::string &other) |
void | notify () |
void | importState (const std::string &string) |
Static Public Member Functions | |
static void | setKeyValueChangedFunc (EntityCreator::KeyValueChangedFunc func) |
Private Types | |
typedef UnsortedSet< KeyObserver > | KeyObservers |
Private Attributes | |
std::size_t | m_refcount |
KeyObservers | m_observers |
std::string | m_string |
const char * | m_empty |
ObservedUndoableObject < std::string > | m_undo |
Static Private Attributes | |
static EntityCreator::KeyValueChangedFunc | m_entityKeyValueChanged |
A key/value pair of strings.
Definition at line 286 of file entitylib.h.
typedef UnsortedSet<KeyObserver> KeyValue::KeyObservers [private] |
Definition at line 288 of file entitylib.h.
typedef MemberCaller1<KeyValue, const std::string&, &KeyValue::importState> KeyValue::UndoImportCaller |
Definition at line 372 of file entitylib.h.
KeyValue::KeyValue | ( | const char * | string, | |
const char * | empty | |||
) | [inline] |
Definition at line 298 of file entitylib.h.
References notify().
KeyValue::~KeyValue | ( | ) | [inline] |
Definition at line 303 of file entitylib.h.
References UnsortedSet< Value >::empty(), and m_observers.
void KeyValue::assign | ( | const std::string & | other | ) | [inline, virtual] |
Implements EntityKeyValue.
Definition at line 348 of file entitylib.h.
void KeyValue::attach | ( | const KeyObserver & | observer | ) | [inline, virtual] |
Implements EntityKeyValue.
Definition at line 333 of file entitylib.h.
References c_str(), UnsortedSet< Value >::insert(), and m_observers.
const char* KeyValue::c_str | ( | ) | const [inline, virtual] |
Implements EntityKeyValue.
Definition at line 342 of file entitylib.h.
void KeyValue::DecRef | ( | ) | [inline] |
Definition at line 317 of file entitylib.h.
References m_refcount.
void KeyValue::detach | ( | const KeyObserver & | observer | ) | [inline, virtual] |
Implements EntityKeyValue.
Definition at line 337 of file entitylib.h.
References UnsortedSet< Value >::erase(), m_empty, and m_observers.
void KeyValue::importState | ( | const std::string & | string | ) | [inline] |
Definition at line 366 of file entitylib.h.
void KeyValue::IncRef | ( | ) | [inline] |
Definition at line 313 of file entitylib.h.
References m_refcount.
void KeyValue::instanceAttach | ( | MapFile * | map | ) | [inline] |
Definition at line 324 of file entitylib.h.
References m_undo.
void KeyValue::instanceDetach | ( | MapFile * | map | ) | [inline] |
Definition at line 328 of file entitylib.h.
References m_undo.
void KeyValue::notify | ( | ) | [inline] |
Definition at line 357 of file entitylib.h.
References c_str(), i, m_entityKeyValueChanged, m_observers, UnsortedSet< Value >::rbegin(), and UnsortedSet< Value >::rend().
Referenced by assign(), importState(), and KeyValue().
static void KeyValue::setKeyValueChangedFunc | ( | EntityCreator::KeyValueChangedFunc | func | ) | [inline, static] |
Definition at line 308 of file entitylib.h.
References m_entityKeyValueChanged.
const char* KeyValue::m_empty [private] |
Definition at line 293 of file entitylib.h.
EntityCreator::KeyValueChangedFunc KeyValue::m_entityKeyValueChanged [static, private] |
Definition at line 295 of file entitylib.h.
Referenced by notify(), and setKeyValueChangedFunc().
KeyObservers KeyValue::m_observers [private] |
Definition at line 291 of file entitylib.h.
Referenced by attach(), detach(), notify(), and ~KeyValue().
std::size_t KeyValue::m_refcount [private] |
Definition at line 290 of file entitylib.h.
std::string KeyValue::m_string [private] |
Definition at line 292 of file entitylib.h.
Referenced by assign(), c_str(), and importState().
ObservedUndoableObject<std::string> KeyValue::m_undo [private] |
Definition at line 294 of file entitylib.h.
Referenced by assign(), instanceAttach(), and instanceDetach().