A. Glossary

This appendix contains informal definitions for many of the terms you will encounter. Some of these terms have to do directly with the Objective-C language itself, whereas others have their etymology from the discipline of object-oriented programming. In the latter case, the meaning of the term as it specifically applies to the Objective-C language is provided.

abstract class  A class defined to make creating subclasses easier. Instances are created from the subclass, not of the abstract class. See Also concrete subclass.

Application Kit  A framework for developing an application's user interface, which includes objects such as menus, toolbars, pasteboards, and windows. Part of Cocoa and more commonly called AppKit.

archiving  Translating the representation of an object's data into a format that can later be restored (unarchived).

array  An ordered collection of values. Arrays can be defined as a basic Objective-C type and are implemented as objects under Foundation through the NSArray and NSMutableArray classes.

automatic variable  A variable that is automatically allocated and released when a statement block is entered and exited. Automatic variables have scope that is limited to the block in which they are defined and have no default initial value. They are optionally preceded by the keyword auto.

autorelease pool  An object defined in the Foundation framework that keeps track of objects that are to be released when the pool itself is released. Objects are added to the pool by sending them autorelease messages.

bitfield  A structure containing one or more integer fields of a specified bit width. Bitfields can be accessed and manipulated the same way other structure members can.

category  A set of methods grouped together under a specified name. Categories can modularize the method definitions for a class and can be used to add new methods to an existing class.

character string  A null-terminated sequence of characters.

class  A set of instance variables and methods that have access to those variables. After a class is defined, instances of the class (that is, objects) can be created.

class method  A method (defined with a leading + sign) that is invoked on class objects. See Also instance method.

class object  An object that identifies a particular class. The class name can be used as the receiver of a message to invoke a class method. In other places, the class method can be invoked on the class to create a class object.

cluster  An abstract class that groups a set of private concrete subclasses, providing a simplified interface to the user through the abstract class.

Cocoa  A development environment on Mac OS X that comprises the Foundation and Application Kit frameworks.

collection  A Foundation framework object that is an array, a dictionary, or a set used for grouping and manipulating related objects.

compile time  The time during which the source code is analyzed and converted into a lower-level format known as object code.

composite class  A class that is composed of objects from other classes; often it's used as an alternative to subclassing.

concrete subclass  A subclass of an abstract class. Instances can be created from a concrete subclass.

conform  A class conforms to a protocol if it adopts all the methods in the protocol, either directly through implementation or indirectly through inheritance.

constant character string  A sequence of characters enclosed inside a pair of double quotation marks. If preceded by an @ character, a constant character string object, typically of type NSConstantString, is defined.

data encapsulation  The notion that the data for an object is stored in its instance variables and is accessed only by the object's methods. This maintains the integrity of the data.

delegate  An object directed to carry out an action by another object.

designated initializer  The method that all other initialization methods in the class, or in subclasses (through messages to super), will invoke.

dictionary  A collection of key/value pairs implemented under Foundation with the NSDictionary and NSMutableDictionary classes.

directive  In Objective-C, a special construct that begins with an at sign (@). @interface, @implementation, @end, and @class are examples of directives.

Distributed Objects  The capability of Foundation objects in one application to communicate with Foundation objects in another application, possibly running on another machine.

dynamic binding  Determining the method to invoke with an object at runtime instead of at compile time.

dynamic typing  Determining the class to which an object belongs at runtime instead of at compile time. See Also static typing.

encapsulation  See data encapsulation.

extern variable  See global variable.

factory method  See class method.

factory object  See class object.

formal protocol  A set of related methods grouped together under a name declared with the @protocol directive. Different classes (not necessarily related) can adopt a formal protocol by implementing (or inheriting) all its methods. See Also informal protocol.

forwarding  The process of sending a message and its associated argument(s) to another method for execution.

Foundation framework  A collection of classes, functions, and protocols that form the foundation for application development, providing basic facilities such as memory management, file and URL access, archiving, and working with collections, and number and date objects.

framework  A collection of classes, functions, protocols, documentation, and header files and other resources that are all related. For example, the Cocoa framework is for developing interactive graphical applications under Mac OS X.

function  A block of statements identified by a name that can accept one or more arguments passed to it by value and can optionally return a value. Functions can be local (static) to the file in which they're defined or global, in which case they can be called from functions or methods defined in other files.

gcc  The name of the compiler developed by the Free Software Foundation (FSF). gcc supports many programming languages, including C, Objective-C, and C++. gcc is the standard compiler used on Mac OS X and under GNUStep for compiling Objective-C programs.

gdb  The standard debugging tool for programs compiled with gcc.

global variable  A variable defined outside any method or function that can be accessed by any method or function in the same source file or from other source files that declare the variable as extern.

GNUStep  The Free Software Foundation's implementation of OPENSTEP.

header file  A file that contains common definitions, macros, and variable declarations that is included into a program using either an #import or #include statement.

id  The generic object type that can hold a pointer to any type of object.

immutable object  An object whose value cannot be modified. Examples from the Foundation framework include NSString, NSDictionary, and NSArray objects. See Also mutable object.

implementation section  The section of a class definition that contains the actual code (that is, implementation) for the methods declared in the corresponding interface section (or as specified by a protocol definition).

informal protocol  A logically related set of methods declared as a category, often as a category of the root class. Unlike formal protocols, all the methods in an informal protocol do not have to be implemented. See Also formal protocol.

inheritance  The process of passing methods and instance variables from a class, starting with the root object down to subclasses.

instance  A concrete representation of a class. Instances are objects that are typically created by sending an alloc or new message to a class object.

instance method  A method that can be invoked by an instance of a class. See Also class method.

instance variable  A variable declared in the interface section (or inherited from a parent) that is contained in every instance of the object. Instance methods have direct access to their instance variables.

Interface Builder  A tool under Mac OS X for building a graphical user interface for an application.

interface section  The section for declaring a class, its superclass, instance variables, and methods. For each method, the argument types and return type are also declared. See Also implementation section.

internationalization  See localization.

isa  A special instance variable defined in the root object that all objects inherit. The isa variable is used to identify the class to which an object belongs at runtime.

link  The process of taking one or more object files and converting them into a program that can be executed.

LinuxSTEP  A version of GNUStep that runs on Linux systems.

local variable  A variable whose scope is limited to the block in which it is defined. Variables can be local to a method, function, or statement block.

localization  The process of making a program suitable for execution within a particular geographic region, typically by translating messages to the local language and handling things such as local time zones, currency symbols, date formats, and so on. Sometimes localization is used just to refer to the language translation and the term internationalization to the rest of the process.

message  The method and its associated arguments that are sent to an object (the receiver).

message expression  An expression enclosed in square brackets that specifies an object (the receiver) and the message to send to the object.

method  A procedure that belongs to a class and can be executed by sending a message to a class object or to instances from the class. See Also class method, instance method.

mutable object  An object whose value can be changed. The Foundation framework supports mutable and immutable arrays, sets, strings, and dictionaries. See Also immutable object.

NEXTSTEP  A development environment developed by NeXT Software for application development with Objective-C.

nil  An object of type id, which is used to represent an invalid object. Its value is defined as 0. nil can be sent messages.

notification  The process of sending a message to objects that have registered to be alerted (notified) when a specific event occurs.

NSObject  The root object under the Foundation framework.

null character  A character whose value is 0. A null character constant is denoted by ''.

null pointer  An invalid pointer value, normally defined as 0.

NXObject  The root object under NEXTSTEP.

object  A set of variables and associated methods. An object can be sent messages to cause one of its methods to be executed.

Object  The root object in Objective-C. See Also NSObject.

object-oriented programming  A method of programming based on classes and objects and performing actions on those objects.

OPENSTEP  An Objective-C development environment based on NEXTSTEP and standardized by NeXT Software and Sun Microsystems, Inc.

parent class  A class from which another class inherits. Also referred to as the super class.

pointer  A value that references another object or data type. A pointer is implemented as the address of a particular object or value in memory. An instance of a class is a pointer to the location of the object's data in memory.

polymorphism  The capability of objects from different classes to accept the same message.

posing  The process of substituting one class for another.

preprocessor  A program that makes a first pass through the source code processing lines that begin with a #, which presumably contain special preprocessor statements. Common uses are for defining macros with #define, including other source files with #import and #include, and conditionally including source lines with #if, #ifdef, and #ifndef.

procedural programming language  A language in which programs are defined by procedures and functions that operate on a set of data.

Project Builder  An application on Mac OS X for entering, building, running, and debugging programs.

property list  A representation of different types of objects in a standardized and portable format. Property lists are typically stored in either a “traditional” or XML format.

protocol  A list of methods that a class must implement to conform or adopt the protocol. Protocols provide a way to standardize an interface across classes. See Also formal protocol, informal protocol.

receiver  The object to which a message is sent. The receiver can be referred to as self from inside the method that is invoked.

reference count  See retain count.

retain count  A count of the number of times an object is referenced. It's incremented by sending a retain message to the object and decremented by sending a release message to it.

root object  The topmost object in the inheritance hierarchy that has no parent.

runtime  The time when a program is executing; also the mechanism responsible for executing a program's instructions.

selector  The name used to select the method to execute for an object. Compiled selectors are of type SEL and can be generated using the @selector directive.

self  A variable used inside a method to refer to the receiver of the message.

set  An unordered collection of unique objects implemented under Foundation with the NSSet, NSMutableSet, and NSCountedSet classes.

statement  One or more expressions terminated by a semicolon.

statement block  One or more statements enclosed in a set of curly braces. Local variables can be declared within a statement block, and their scope is limited to that block.

static function  A function declared with the static keyword that can be called only by other functions or methods defined in the same source file.

static typing  Explicitly identifying the class to which an object belongs at compile time. See Also dynamic typing.

static variable  A variable whose scope is limited to the block or module in which it is defined. Static variables have default initial values of 0 and retain their values through method or function invocations.

structure  An aggregate data type that can contain members of varying types. Structures can be assigned to other structures, passed as arguments to functions and methods, and returned by them as well.

subclass  Also known as a child class, a subclass inherits the methods and instance variables from its parent or superclass.

super  A keyword used in a method to refer to the parent class of the receiver.

super class  The parent class of a particular class. See Also super.

Unicode character  A standard for representing characters from sets containing up to millions of characters. The NSString and NSMutableString classes work with strings containing Unicode characters.

union  An aggregate data type like a structure containing members that share the same storage area. Only one of those members can occupy the storage area at any point in time.

Xcode  A compiling and debugging tool for program development released with Mac OS X v. 10.3.

XML  Extensible Markup Language. The default format for property lists generated on Mac OS X.

zone  A designated area of memory for allocating data and objects. A program can work with multiple zones to more efficiently manage memory.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.226.84