Foundation Kit
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2009) |
The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification. It provides basic classes such as wrapper classes and data structure classes. This framework uses the prefix NS (for NeXTSTEP).
Contents |
[edit] Classes
[edit] NSObject
The most common base class for Objective-C hierarchies. This class provides standard methods working with objects, such as Memory management and querying objects.
[edit] NSString
This class is used for string manipulation in OpenStep environments, representing a Unicode string. Though this class is immutable, there is a NSMutableString class in Foundation Kit.
[edit] NSValue and NSNumber
NSValue is a wrapper class of C data types, and NSNumber is a wrapper class for C number data types, such as int, double, and float. The Data structures in Foundation Kit can only hold objects, not primitive types, so wrappers such as NSValue and NSNumber are used in those data structures.
[edit] Major implementations
[edit] Mac OS X
The Foundation Kit is part of the Cocoa API. This was originally built by NeXT developers after Apple bought NeXT[citation needed]. Beginning as the successor to OPENSTEP/Mach, this framework has deviated from OpenStep compliance, and is in some places incompatible.
[edit] iOS
The Foundation Kit is in the Cocoa Touch API. This framework is based on the Mac OS X Foundation, not OpenStep.[citation needed]
[edit] GNUstep
The Foundation Kit is implemented in GNUstep's Base Package. This implementation is mostly comparable (4 classes are missing) and aims to be comparable with both the OpenStep API and latter Mac OS X additions.
[edit] Cocotron
The Foundation Kit is implemented in Cocotron, an open-source implementation of Cocoa.
[edit] PureFoundation
PureFoundation is an open-source implementation of Foundation that implements Foundation by wrapping Core Foundation, just like in Cocoa, rather than create a separate Foundation from scratch like GNUstep and Cocotron.