objc

Instance Methods | Class Methods | Protected Attributes
NXObject Class Reference

The base class for objects in the Foundation framework. More...

#import <Foundation/Foundation.h>

Inheritance diagram for NXObject:
Inheritance graph
[legend]
Collaboration diagram for NXObject:
Collaboration graph
[legend]

Instance Methods

(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.
 
- Instance Methods inherited from Object
(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...
 
- Instance Methods inherited from <ObjectProtocol>
(BOOL- respondsToSelector:
 Checks if the receiver responds to a selector. More...
 

Class Methods

(id+ allocWithZone:
 Allocates a new instance of an object in a specific memory zone. More...
 
- Class Methods inherited from Object
(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...
 

Protected Attributes

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.
 
- Protected Attributes inherited from Object
Class isa
 A pointer to the object's class structure. More...
 

Detailed Description

The base class for objects in the Foundation framework.

NXObject extends the functionality of the root Object class by adding support for memory zones, object retention and releasing. All objects that are part of the Foundation framework inherit from this class.

Examples:
examples/Application/blink/main.m, examples/Application/gpio/main.m, examples/Application/helloworld/main.m, examples/Application/timer/main.m, examples/Network/ntp/main.m, and examples/Network/scan/main.m.

Definition at line 21 of file NXObject.h.

Method Documentation

◆ allocWithZone:()

+ (id) allocWithZone: (NXZone *)  zone

Allocates a new instance of an object in a specific memory zone.

Parameters
zoneThe NXZone in which to allocate the new instance.
Returns
A new instance of the receiving class, or nil if the allocation failed.

◆ release()

- (void) release

Decreases the retain count of the receiver.

This method is part of the reference counting memory management system. Sending a release message to an object decreases its retain count by one. If the retain count becomes zero, the object is deallocated.

Reimplemented from <RetainProtocol>.

◆ retain()

- (id) retain

Increases the retain count of the receiver.

Returns
The receiver, with its retain count incremented.

This method is part of the reference counting memory management system. Sending a retain message to an object increases its retain count by one.

Reimplemented from <RetainProtocol>.


The documentation for this class was generated from the following file: