JOEModelManager Class Reference
Inherits from | NSObject |
Declared in | JOEModelManager.h |
Tasks
Creating JOEModelManager
-
+ sharedManager
This method allocates and initializes the singleton manager object if one doesn’t already exist.
Insertion and Deletion
-
– addObject:
Inserts a given object at the end of the shared model.
-
– removeObject:
Removes all occurrences of an object in the shared model.
-
– insertObject:atIndex:
Inserts a given object into the shared model manager’s contents at a given index. If index is already occupied, the objects at index and beyond are shifted by adding 1 to their indices to make room.
-
– replaceObjectAtIndex:withObject:
Replaces the object at index with anObject.
-
– exchangeObjectAtIndex:withObjectAtIndex:
Exchanges the objects in the shared model at given indices.
Object Retrieval
-
– objectAtIndex:
Returns an object from the shared model at the given index
Model Loading and Saving
Instance Methods
addObject:
Inserts a given object at the end of the shared model.
- (void)addObject:(id)object
Parameters
- object
The object to be added to the model.
Declared In
JOEModelManager.h
exchangeObjectAtIndex:withObjectAtIndex:
Exchanges the objects in the shared model at given indices.
- (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2
Parameters
- idx1
The index of the object with which to replace the object at index idx2.
- idx2
The index of the object with which to replace the object at index idx1.
Declared In
JOEModelManager.h
insertObject:atIndex:
Inserts a given object into the shared model manager’s contents at a given index. If index is already occupied, the objects at index and beyond are shifted by adding 1 to their indices to make room.
- (void)insertObject:(id)object atIndex:(NSUInteger)index
Parameters
- object
The object to be inserted at the given index.
- index
The index at which the object will be inserted.
Declared In
JOEModelManager.h
load
Loads the shared object model from disk.
- (BOOL)load
Return Value
If YES, it was a success the model is either already loaded or it was loaded from disk.
Declared In
JOEModelManager.h
objectAtIndex:
Returns an object from the shared model at the given index
- (id)objectAtIndex:(NSUInteger)index
Parameters
- index
An index within the bounds of the array.
Return Value
The object located at index.
Declared In
JOEModelManager.h
removeObject:
Removes all occurrences of an object in the shared model.
- (void)removeObject:(id)object
Parameters
- object
The object to be removed from the model.
Declared In
JOEModelManager.h
replaceObjectAtIndex:withObject:
Replaces the object at index with anObject.
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)object
Parameters
- index
The index of the object which will be replaced.
- object
The object that will replace the one at the index. Should not be nil.
Declared In
JOEModelManager.h