CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
CatNiPErrorManager Class Reference

An error forwarding class for CatNiP. More...

#import <CatNiPErrorManager.h>

List of all members.

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

Detailed Description

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.


Member Function Documentation

- (void) addErrorConsumer: (id <CatNiPErrorConsumer>)  consumer

Adds an error consumer to the list of interested parties.

Parameters:
consumerThe CatNiPErrorConsumer to add to the error consumer set

Definition at line 50 of file CatNiPErrorManager.m.

References errorConsumers.

Here is the caller graph for this function:

+ (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.

Returns:
An allocated CatNiPErrorManager object when called for the first time, or nil when called later.

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.

Returns:
The object itself

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.

Returns:
The object itself

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.

Parameters:
consumerThe 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.

Parameters:
errorThe NSError object to report

Definition at line 38 of file CatNiPErrorManager.m.

References errorConsumers.

Here is the caller graph for this function:

- (id) retain

Singleton pattern implementation, overrides the default retain to ignore any retain calls.

Returns:
The object itself

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.

Returns:
UINT_MAX to denote an object that cannot be released

Definition at line 125 of file CatNiPErrorManager.m.

+ (CatNiPErrorManager *) sharedManager

Returns the singleton object handling the error manager / forwarder role.

Returns:
A CatNiPErrorManager object working as the error manager

Definition at line 75 of file CatNiPErrorManager.m.

References sharedErrorManager.

Here is the caller graph for this function:


Member Data Documentation

- (NSMutableSet*) errorConsumers [protected]

Definition at line 13 of file CatNiPErrorManager.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines