AOCAspectManager Class Reference

Manages the installation and uninstallation of advice objects. More...

#import <AOCAspectManager.h>

List of all members.

Public Member Functions

(BOOL) - installAdvice:forSelector:ofClass:error:
 Installs an advice object.
(void) - uninstallAdvice:forSelector:ofClass:
 Uninstalls an advice object.
(void) - uninstallAllAdvice
 Uninstalls all advice objects.
(void) - dealloc
 Calls [self uninstallAllAdvice].

Static Public Member Functions

(AOCAspectManager *) + defaultAspectManager

Detailed Description

Manages the installation and uninstallation of advice objects.

AOCAspectManager is not a singleton. defaultAspectManager (AOCAspectManager) will return an application-wide default object, but you may create other AOCAspectManager objects if you wish.


Member Function Documentation

- (void) dealloc  

Calls [self uninstallAllAdvice].

+ (AOCAspectManager *) defaultAspectManager  
Returns:
The default AOCAspectManager
- (BOOL) installAdvice: (id<AOCAdviceProtocol>)  advice
forSelector: (SEL)  selector
ofClass: (Class)  cls
error: (NSError**)  outError 

Installs an advice object.

If two separate AOCAspectManager try to install advice for the same selector and class, then the second installation will fail.

Parameters:
advice The advice object to install
selector The selector to install the advice for. Must be an instance method.
cls The class to install the advice for. The selector must be implemented on this class, not on a superclass.
outError A pointer to an NSError*. If this method returns NO, *outError will be set to an NSError* that describes the problem. This argument may be NULL if you don't want the error.
Returns:
YES if the installation succeeded, otherwise NO.
- (void) uninstallAdvice: (id<AOCAdviceProtocol>)  advice
forSelector: (SEL)  selector
ofClass: (Class)  cls 

Uninstalls an advice object.

Parameters:
advice The advice object to uninstall
selector The selector the advice was installed for
cls The class the advice was installed for
- (void) uninstallAllAdvice  

Uninstalls all advice objects.


The documentation for this class was generated from the following files:
 All Classes Functions
Generated by  doxygen 1.6.3