The main application class that coordinates application-wide functionality. More...
#import <Application/Application.h>
Instance Methods | |
(NXArray *) | - args |
Returns command-line arguments passed to the application. More... | |
(id< ApplicationDelegate >) | - delegate |
Gets the current application delegate. More... | |
(void) | - terminate |
This method notifies the app that you want to exit the run loop. More... | |
(void) | - terminateWithExitStatus: |
This method notifies the app that you want to exit the run loop, with a specific exit status. More... | |
![]() | |
(id) | - retain |
Increases the retain count of the receiver. More... | |
(void) | - release |
Decreases the retain count of the receiver. More... | |
(id) | - autorelease |
Adds the receiver to the autorelease pool. | |
![]() | |
(void) | - dealloc |
Free resources for an existing instance. | |
(id) | - init |
Initialize the instance, after allocation. More... | |
(Class) | - class |
Returns the class of the instance. More... | |
(Class) | - superclass |
Returns the superclass of the instance. More... | |
(BOOL) | - isEqual: |
Compares the receiver to another object for equality. More... | |
(BOOL) | - isKindOfClass: |
Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
(BOOL) | - conformsTo: |
Checks if the receiver's class conforms to a protocol. More... | |
(NXString *) | - description |
Returns a string that represents the instance. More... | |
![]() | |
(BOOL) | - respondsToSelector: |
Checks if the receiver responds to a selector. More... | |
Class Methods | |
(id) | + sharedApplication |
Returns the shared application instance. | |
![]() | |
(id) | + allocWithZone: |
Allocates a new instance of an object in a specific memory zone. More... | |
![]() | |
(void) | + initialize |
Performs one-time initialization for the class. More... | |
(id) | + alloc |
Allocate a new class instance. More... | |
(Class) | + class |
Returns the class object. More... | |
(Class) | + superclass |
Returns the superclass of the class. More... | |
(const char *) | + name |
Returns the name of the class. More... | |
(BOOL) | + conformsTo: |
Checks if the class conforms to a protocol. More... | |
(NXString *) | + description |
Returns a string that represents the class. More... | |
Additional Inherited Members | |
![]() | |
id | _zone |
The memory zone where the object is allocated. | |
unsigned short | _retain |
The retain count of the object. | |
id | _next |
The next object in an autorelease pool. | |
![]() | |
Class | isa |
A pointer to the object's class structure. More... | |
The main application class that coordinates application-wide functionality.
The Application class serves as the central hub for application management. An NXApplication instance is created automatically by invoking the NXApplicationMain function, which initializes the application and starts the main run loop.
You don't create instances of this class directly; instead, you use the sharedApplication method to access the singleton instance. The Application class is responsible for handling command-line arguments, setting the application delegate, starting the main run loop, handling events and then terminating the application gracefully.
Definition at line 30 of file NXApplication.h.
- (NXArray *) args |
Returns command-line arguments passed to the application.
This method retrieves the command-line arguments that were passed to the application at startup. It returns an array containing the arguments, the first of which is typically the application name or path to the executable.
- (id<ApplicationDelegate>) delegate |
Gets the current application delegate.
This method returns the object that serves as the application's delegate.
- (void) terminate |
This method notifies the app that you want to exit the run loop.
The remaining events in the run loop will be processed, and then the application will terminate gracefully.
- (void) terminateWithExitStatus: | (int) | status |
This method notifies the app that you want to exit the run loop, with a specific exit status.
The remaining events in the run loop will be processed, and then the application will terminate gracefully.