FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
OrderedDictionary Class Reference
Inheritance diagram for OrderedDictionary:
Collaboration diagram for OrderedDictionary:

Instance Methods

(void) - insertObject:forKey:atIndex:
 
(id) - keyAtIndex:
 
(NSUInteger) - indexForValue:
 
(NSUInteger) - indexForKey:
 
(NSEnumerator *) - reverseKeyEnumerator
 

Protected Attributes

NSMutableDictionary * dictionary
 
NSMutableArray * array
 

Detailed Description

Definition at line 28 of file OrderedDictionary.h.

Method Documentation

◆ indexForKey:

- (NSUInteger) indexForKey: (id)  key

Definition at line 28 of file OrderedDictionary.m.

130 :(id)key
131{
132 return [array indexOfObject:key];
133}

◆ indexForValue:

- (NSUInteger) indexForValue: (id)  value

Definition at line 28 of file OrderedDictionary.m.

135 :(id)value
136{
137 NSArray *keys = [self allKeysForObject:value];
138 if ([keys count] > 0)
139 {
140 return [self indexForKey:[keys objectAtIndex:0]];
141 }
142
143 return NSNotFound;
144}

◆ insertObject:forKey:atIndex:

- (void) insertObject: (id)  anObject
forKey: (id)  aKey
atIndex: (NSUInteger)  anIndex 

Definition at line 28 of file OrderedDictionary.m.

115 :(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex
116{
117 if ([dictionary objectForKey:aKey])
118 {
119 [self removeObjectForKey:aKey];
120 }
121 [array insertObject:aKey atIndex:anIndex];
122 [dictionary setObject:anObject forKey:aKey];
123}

◆ keyAtIndex:

- (id) keyAtIndex: (NSUInteger)  anIndex

Definition at line 28 of file OrderedDictionary.m.

125 :(NSUInteger)anIndex
126{
127 return [array objectAtIndex:anIndex];
128}

◆ reverseKeyEnumerator

- (NSEnumerator *) reverseKeyEnumerator

Definition at line 28 of file OrderedDictionary.m.

111{
112 return [array reverseObjectEnumerator];
113}

Field Documentation

◆ array

- (NSMutableArray*) array
protected

Definition at line 31 of file OrderedDictionary.h.

◆ dictionary

- (NSMutableDictionary*) dictionary
protected

Definition at line 30 of file OrderedDictionary.h.


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