Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <MutableDictionary.h>
Mutable key-value stores.
Definition at line 40 of file MutableDictionary.h.
Properties | |
Dictionary | dictionary |
The superclass. More... | |
![]() | |
size_t | count |
The count of elements. More... | |
Object | object |
The superclass. More... | |
![]() | |
Class * | clazz |
Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
Class * | _MutableDictionary (void) |
The MutableDictionary archetype. More... | |
void | addEntriesFromDictionary (MutableDictionary *self, const Dictionary *dictionary) |
Adds the key-value entries from dictionary to this MutableDictionary. More... | |
MutableDictionary * | dictionary (void) |
Returns a new MutableDictionary. More... | |
MutableDictionary * | dictionaryWithCapacity (size_t capacity) |
Returns a new MutableDictionary with the given capacity . More... | |
MutableDictionary * | init (MutableDictionary *self) |
Initializes this MutableDictionary. More... | |
MutableDictionary * | initWithCapacity (MutableDictionary *self, size_t capacity) |
Initializes this MutableDictionary with the specified capacity. More... | |
void | removeAllObjects (MutableDictionary *self) |
Removes all Objects from this MutableDictionary. More... | |
void | removeAllObjectsWithEnumerator (MutableDictionary *self, DictionaryEnumerator enumerator, ident data) |
void | removeObjectForKey (MutableDictionary *self, const ident key) |
Removes the Object with the specified key from this MutableDictionary. More... | |
void | removeObjectForKeyPath (MutableDictionary *self, const char *path) |
Removes the Object with the specified key path from this MutableDictionary. More... | |
void | setObjectForKey (MutableDictionary *self, const ident obj, const ident key) |
Sets a pair in this MutableDictionary. More... | |
void | setObjectForKeyPath (MutableDictionary *self, const ident obj, const char *path) |
Sets a pair in this MutableDictionary. More... | |
void | setObjectsForKeyPaths (MutableDictionary *self,...) |
Sets pairs in this MutableDictionary from the NULL-terminated list. More... | |
void | setObjectsForKeys (MutableDictionary *self,...) |
Sets pairs in this MutableDictionary from the NULL-terminated list. More... | |
![]() | |
Class * | _Dictionary (void) |
The Dictionary archetype. More... | |
Array * | allKeys (const Dictionary *self) |
Array * | allObjects (const Dictionary *self) |
_Bool | containsKey (const Dictionary *self, const ident key) |
_Bool | containsKeyPath (const Dictionary *self, const char *path) |
Dictionary * | dictionaryWithDictionary (const Dictionary *dictionary) |
Returns a new Dictionary containing all pairs from dictionary . More... | |
Dictionary * | dictionaryWithObjectsAndKeys (ident obj,...) |
Returns a new Dictionary containing pairs from the given arguments. More... | |
void | enumerateObjectsAndKeys (const Dictionary *self, DictionaryEnumerator enumerator, ident data) |
Enumerate the pairs of this Dictionary with the given function. More... | |
Dicionary * | filterObjectsAndKeys (const Dictionary *self, DictionaryPredicate predicate, ident data) |
Creates a new Dictionary with pairs that pass the filter function. More... | |
Dictionary * | initWithDictionary (Dictionary *self, const Dictionary *dictionary) |
Initializes this Dictionary to contain elements of dictionary . More... | |
Dictionary * | initWithObjectsAndKeys (Dictionary *self,...) |
Initializes this Dictionary with the NULL -terminated list of Objects and keys. More... | |
MutableDictionary * | mutableCopy (const Dictionary *self) |
ident | objectForKey (const Dictionary *self, const ident key) |
ident | objectForKeyPath (const Dictionary *self, const char *path) |
![]() | |
Class * | _Object (void) |
The Object archetype. More... | |
Object * | copy (const Object *self) |
Creates a shallow copy of this Object. More... | |
void | dealloc (Object *self) |
Frees all resources held by this Object. More... | |
String * | description (const Object *self) |
int | hash (const Object *self) |
Object * | init (Object *self) |
Initializes this Object. More... | |
_Bool | isEqual (const Object *self, const Object *other) |
Tests equality of the other Object. More... | |
_Bool | isKindOfClass (const Object *self, const Class *clazz) |
Tests for Class hierarchy membership. More... | |
Protected Attributes | |
MutableDictionaryInterface * | interface |
The interface. More... | |
![]() | |
DictionaryInterface * | interface |
The interface. More... | |
![]() | |
ObjectInterface * | interface |
The interface. More... | |
MutableDictionary * dictionary | ( | void | ) |
The superclass.
Definition at line 45 of file MutableDictionary.h.
|
protected |
The interface.
Definition at line 51 of file MutableDictionary.h.
Class * _MutableDictionary | ( | void | ) |
The MutableDictionary archetype.
Definition at line 371 of file MutableDictionary.c.
void addEntriesFromDictionary | ( | MutableDictionary * | self, |
const Dictionary * | dictionary | ||
) |
Adds the key-value entries from dictionary
to this MutableDictionary.
self | The MutableDictionary. |
dictionary | A Dictionary. |
Definition at line 68 of file MutableDictionary.c.
MutableDictionary * dictionary | ( | void | ) |
Returns a new MutableDictionary.
NULL
on error. Definition at line 79 of file MutableDictionary.c.
MutableDictionary * dictionaryWithCapacity | ( | size_t | capacity | ) |
Returns a new MutableDictionary with the given capacity
.
capacity | The desired initial capacity. |
NULL
on error. Definition at line 88 of file MutableDictionary.c.
MutableDictionary * init | ( | MutableDictionary * | self | ) |
Initializes this MutableDictionary.
self | The MutableDictionary. |
NULL
on error. Definition at line 97 of file MutableDictionary.c.
MutableDictionary * initWithCapacity | ( | MutableDictionary * | self, |
size_t | capacity | ||
) |
Initializes this MutableDictionary with the specified capacity.
self | The MutableDictionary. |
capacity | The initial capacity. |
NULL
on error. Definition at line 106 of file MutableDictionary.c.
void removeAllObjects | ( | MutableDictionary * | self | ) |
Removes all Objects from this MutableDictionary.
self | The MutableDictionary. |
Definition at line 126 of file MutableDictionary.c.
void removeAllObjectsWithEnumerator | ( | MutableDictionary * | self, |
DictionaryEnumerator | enumerator, | ||
ident | data | ||
) |
Definition at line 143 of file MutableDictionary.c.
void removeObjectForKey | ( | MutableDictionary * | self, |
const ident | key | ||
) |
Removes the Object with the specified key from this MutableDictionary.
self | The MutableDictionary. |
key | The key of the Object to remove. |
Definition at line 173 of file MutableDictionary.c.
void removeObjectForKeyPath | ( | MutableDictionary * | self, |
const char * | path | ||
) |
Removes the Object with the specified key path from this MutableDictionary.
self | The MutableDictionary. |
path | The key path of the Object to remove. |
Definition at line 203 of file MutableDictionary.c.
void setObjectForKey | ( | MutableDictionary * | self, |
const ident | obj, | ||
const ident | key | ||
) |
Sets a pair in this MutableDictionary.
self | The MutableDictionary. |
obj | The Object to set. |
key | The key of the Object to set. |
Definition at line 260 of file MutableDictionary.c.
void setObjectForKeyPath | ( | MutableDictionary * | self, |
const ident | obj, | ||
const char * | path | ||
) |
Sets a pair in this MutableDictionary.
self | The MutableDictionary. |
obj | The Object to set. |
path | The key path of the Object to set. |
Definition at line 288 of file MutableDictionary.c.
void setObjectsForKeyPaths | ( | MutableDictionary * | self, |
... | |||
) |
Sets pairs in this MutableDictionary from the NULL-terminated list.
self | The MutableDictionary. |
Definition at line 301 of file MutableDictionary.c.
void setObjectsForKeys | ( | MutableDictionary * | self, |
... | |||
) |
Sets pairs in this MutableDictionary from the NULL-terminated list.
self | The MutableDictionary. |
Definition at line 324 of file MutableDictionary.c.