JOEModelManager Class Reference
| Inherits from | NSObject |
| Declared in | JOEModelManager.h |
Tasks
Creating JOEModelManager
-
+ sharedManagerThis 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)objectParameters
- object
The object to be added to the model.
Declared In
JOEModelManager.hexchangeObjectAtIndex:withObjectAtIndex:
Exchanges the objects in the shared model at given indices.
- (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2Parameters
- 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.hinsertObject: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)indexParameters
- object
The object to be inserted at the given index.
- index
The index at which the object will be inserted.
Declared In
JOEModelManager.hload
Loads the shared object model from disk.
- (BOOL)loadReturn Value
If YES, it was a success the model is either already loaded or it was loaded from disk.
Declared In
JOEModelManager.hobjectAtIndex:
Returns an object from the shared model at the given index
- (id)objectAtIndex:(NSUInteger)indexParameters
- index
An index within the bounds of the array.
Return Value
The object located at index.
Declared In
JOEModelManager.hremoveObject:
Removes all occurrences of an object in the shared model.
- (void)removeObject:(id)objectParameters
- object
The object to be removed from the model.
Declared In
JOEModelManager.hreplaceObjectAtIndex:withObject:
Replaces the object at index with anObject.
- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)objectParameters
- 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