CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
An error forwarding class for CatNiP. More...
#import <CatNiPErrorManager.h>
Public Member Functions | |
(void) | - addErrorConsumer: |
Adds an error consumer to the list of interested parties. | |
(id) | - autorelease |
Singleton pattern implementation, overrides the default autorelease to prevent this object from being added to autorelease pools. | |
(id) | - copyWithZone: |
Singleton pattern implementation, overrides the default copyWithZone to prevent copying of the singleton object. | |
(void) | - dealloc [implementation] |
Custom dealloc method, releases error consumers. | |
(id) | - init [implementation] |
Object initializer for the singleton object. | |
(void) | - release |
Singleton pattern implementaiton, overrides the default release to prevent decrementation of the inner retain count attribute. | |
(void) | - removeErrorConsumer: |
Removes the specified error consumer from the list of interested parties. | |
(void) | - reportError: |
Reports error to any registered error consumers. | |
(id) | - retain |
Singleton pattern implementation, overrides the default retain to ignore any retain calls. | |
(NSUInteger) | - retainCount |
Singleton pattern implementation, overrides the default retainCount to indicate that this object can not be released / deallocated. | |
Static Public Member Functions | |
(id) | + allocWithZone: |
Singleton pattern implementation, assigns and returns the manager when called for the first time, and returns nil if and when called for a second or subsequent times. | |
(CatNiPErrorManager *) | + sharedManager |
Returns the singleton object handling the error manager / forwarder role. | |
Protected Attributes | |
NSMutableSet * | errorConsumers |
An error forwarding class for CatNiP.
Keeps track of listeners (consumers) interested in any errors generated by underlying code, and provides a mechanism for forwarding errors to those interested parties via a static method.
Singleton pattern implementation from cocoadev, http://www.cocoadev.com/index.pl?SingletonDesignPattern
Created by Antti V J Niemela, tkol on 6/16/11. Copyright 2011 University of Helsinki. All rights reserved.
Definition at line 12 of file CatNiPErrorManager.h.
- (void) addErrorConsumer: | (id <CatNiPErrorConsumer>) | consumer |
Adds an error consumer to the list of interested parties.
consumer | The CatNiPErrorConsumer to add to the error consumer set |
Definition at line 50 of file CatNiPErrorManager.m.
References errorConsumers.
+ (id) allocWithZone: | (NSZone *) | zone |
Singleton pattern implementation, assigns and returns the manager when called for the first time, and returns nil if and when called for a second or subsequent times.
Definition at line 91 of file CatNiPErrorManager.m.
References sharedErrorManager.
- (id) autorelease |
Singleton pattern implementation, overrides the default autorelease to prevent this object from being added to autorelease pools.
Definition at line 141 of file CatNiPErrorManager.m.
- (id) copyWithZone: | (NSZone *) | zone |
Singleton pattern implementation, overrides the default copyWithZone to prevent copying of the singleton object.
Definition at line 107 of file CatNiPErrorManager.m.
- (void) dealloc | [implementation] |
Custom dealloc method, releases error consumers.
Definition at line 28 of file CatNiPErrorManager.m.
References errorConsumers.
- (id) init | [implementation] |
Object initializer for the singleton object.
Definition at line 21 of file CatNiPErrorManager.m.
References errorConsumers.
- (void) release |
Singleton pattern implementaiton, overrides the default release to prevent decrementation of the inner retain count attribute.
Definition at line 133 of file CatNiPErrorManager.m.
- (void) removeErrorConsumer: | (id <CatNiPErrorConsumer>) | consumer |
Removes the specified error consumer from the list of interested parties.
consumer | The CatNiPErrorConsumer to remove from the error consumer set |
Definition at line 62 of file CatNiPErrorManager.m.
References errorConsumers.
- (void) reportError: | (NSError *) | error |
Reports error to any registered error consumers.
error | The NSError object to report |
Definition at line 38 of file CatNiPErrorManager.m.
References errorConsumers.
- (id) retain |
Singleton pattern implementation, overrides the default retain to ignore any retain calls.
Definition at line 116 of file CatNiPErrorManager.m.
- (NSUInteger) retainCount |
Singleton pattern implementation, overrides the default retainCount to indicate that this object can not be released / deallocated.
Definition at line 125 of file CatNiPErrorManager.m.
+ (CatNiPErrorManager *) sharedManager |
Returns the singleton object handling the error manager / forwarder role.
Definition at line 75 of file CatNiPErrorManager.m.
References sharedErrorManager.
- (NSMutableSet*) errorConsumers [protected] |
Definition at line 13 of file CatNiPErrorManager.h.