「NSObject Protocol Reference」の編集履歴(バックアップ)一覧に戻る

NSObject Protocol Reference - (2010/01/27 (水) 21:30:47) のソース

//0.下はいじらない
Tags:&tags()

//1.以下に続けてADCでの分類を書き込みリンクする。「NSHogeのクラスリファレンス」、まで書く
&link_toppage(トップ) > [[リファレンス]] > [[Data Types & Collections]] > NSObject プロトコルリファレンス

//2.リファレンス日本語名を見出し1で書く。wiki内のリンクで用いられるタイトルになる。翻訳元にもリンクする。
*NSObject プロトコルリファレンス [[翻訳元>http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html]]

//3.翻訳元の最終更新日を書く
このページの最終更新:&date()
ADCの最終更新:2008-12-22

//4.以下、用語は頻繁に出てくる単語の翻訳ガイドラインを参照しながら翻訳する。
//5.ある程度書き終わったらタグ(未完または完成、カテゴリ名×3)をつけて下線を引く(広告との境)。これで終了。それではGood Luck!
//本文開始↓

|BGCOLOR(#eef):準拠しているクラス|BGCOLOR(#eef):[[NSObject>NSObject Class Reference]] |
|フレームワーク|/System/Library/Frameworks/Foundation.framework|
|BGCOLOR(#eef):使用可能な環境|BGCOLOR(#eef):Mac OS X v10.0以降|
|宣言ファイル|NSObject.h|
|BGCOLOR(#eef):コンパニオンガイド|BGCOLOR(#eef):Cocoa Fundamentals Guide&br()Memory Management Programming Guide for Cocoa|

**概観(Overview)
 NSObjectプロトコルは全てのObjective-Cオブジェクトの根幹をなすメソッドをまとめています。
 このプロトコルに準拠しているオブジェクトは、ファーストクラスオブジェクトであると考えることができます。このようなオブジェクトには以下のことが要求されます。
-クラスであること。クラス階層内での位置づけ。
-プロトコルに準拠していること。
-各メッセージに反応できること。
 また、このプロトコルのretain,release,autoreleaseメソッドを実装しているオブジェクトは、ファンデーションで定義されているオブジェクトの管理と解放の仕組みの中に組み込むことができます(詳細については、Memory Management Programming Guide for Cocoaなどを参照してください)。要するに、NSObjectプロトコルに準拠しているオブジェクトはNSArrayやNSDictionary等で定義されるコンテナオブジェクトを使って管理できるようになるのです。
 CocoaのルートクラスであるNSObjectはこのプロトコルに準拠しているので、NSObjectを継承する全てのオブジェクトはこのプロトコルに記述された性質を持っています。
----

**このクラスでできること(Tasks)
***クラスの識別(Identifying Classes)
    – class  required method
    – superclass  required method
***オブジェクト比較の関係(Identifying and Comparing Objects)
    – isEqual:  required method
    – hash  required method
    – self  required method
***リフェレンスカウントの管理(Managing Reference Counts)
    – retain  required method
    – release  required method
    – autorelease  required method
    – retainCount  required method
***オブジェクトの継承関係、機能、準拠の確認(Testing Object Inheritance, Behavior, and Conformance)
    – isKindOfClass:  required method
    – isMemberOfClass:  required method
    – respondsToSelector:  required method
    – conformsToProtocol:  required method
***オブジェクトの記述(Describing Objects)
    – description  required method
***メッセージ送信(Sending Messages)
    – performSelector:  required method
    – performSelector:withObject:  required method
    – performSelector:withObject:withObject:  required method
***ゾーンの決定(Determining Allocation Zones)
    – zone  required method
***プロキシの識別(Identifying Proxies)
    – isProxy  required method
----

**インスタンスメソッド
----

**定数(Constants)
----


----
目安箱バナー