Vous êtes sur la page 1sur 4

The Cocoa Framework

The Cocoa Framework


Foundation Classes

Foundation Classes Foundation Classes The Foundation Class hierarchy is embedded in NSObjects Class that represents the basic object attributes and their behavior. The foundation framework consist of numerous related groups of classes as well as few individual classes. There are classes representing basic data types such as byte arrays, strings, collection classes for storing other objects, it also represents system information Such as dates, Ports, threads, processes.
Value Objects Value objects encapsulate values of primitive types, including string, numbers and pointers and structures. Value objects access to these values manipulate them in a suitable ways.

Foundation Classes

The Cocoa Framework


Foundation Classes

When you differentiate two values of an objects of the similar class types, it compares encapsulated values not pointers values. Value objects are frequently the attributes of other objects and custom objects.
You may use primitive values directly in your program, where objective C is superset of ANSI C. The elements of collections object such as arrays and directories must be an objects. Cocoa framework that takes and return value of strings, number and dates require that these values be encapsulated in objects. Classes for value objects have mutable and immutable variants :The values encapsulated by immutable objects cant be modified, where as mutable objects can be modified easily.

Values Objects :

The Cocoa Framework


Foundation Classes Values Objects :

Instances of the NSValues

NSNumber Class

NSDate class

NSString

Foundation Classes

The Cocoa Framework


Foundation Classes

Values Objects : Instances of the NSValues class encapsulates a single value ANSI C or Objective C data item. NSNumber Class instantiates objects that contain numeric values such as integer, float, and doubles. Instances of NsNumebr provides object oriented storage for streams of bytes. The class have methods for writing data objects to the file systems. The NSDate class ,along with supporting NSTime Zone, NSCalender and NSCompnonets , and NSLocale classes, that provides objects calendar, times and locales. It provides different techniques to calculate date and times in numerous format. Objects of the NSString class are types of values objects that provides object oriented storage for a unique characters. It can convert representation of character strings such as UTF -8 and Null terminated array of bytes in a particular encoding. It also searches, combines and compares the string and manipulate files systems paths.