デザインパターンに出てくる用語集を考えます。d から iまで

デザインパターンを調べ始めた経緯はこちらです。

他のパターンはこちらです。

今回はオブジェクト指向のための再利用可能なデザインパターンを読み解くために必要な用語集を作成します。

主にこちらのサイトの用語を翻訳していきます。

説明に必要な単語であればこのサイトに載っていなくても並べることがあります。

※かなり紆余曲折することや誤った解釈をする可能性があります。その際は是非コメントをお待ちしています。よろしくお願いします。

※アルファベット順で並べていますが今後のアップデートであいうえお順に整理しなおす予定です。

Glossary 用語

D

delegation デリゲーション

An implementation mechanism in which an object forwards or delegates a request to another object. The delegate carries out the request on behalf of the original object.

オブジェクトがリクエストを別のオブジェクトに転送または委譲する実装メカニズムのこと。委任者は、元のオブジェクトに代わって要求を実行する。

また「ほかのオブジェクトに処理を任せることをデリゲートといいます。」

p166 Objective-Cの絵本 (絵本シリーズ) 大型本 – 2013/4/9 株式会社アンク (著)より引用。


design pattern デザインパターン

A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples. The solution is a general arrangement of objects and classes that solve the problem. The solution is customized and implemented to solve the problem in a particular context.

デザインパターンは、オブジェクト指向システムで繰り返し起こる設計上の問題を解決するための一般的な設計を、体系的に名付け、動機付けし、説明するものです。デザインパターンには問題点、解決策、その解決策を適用するタイミング、その結果などが含まれます。また、実装のヒントや例も示しています。

解決策とは、問題を解決するためのオブジェクトやクラスの一般的な配置のことです。解決策は、特定のコンテキストで問題を解決するためにカスタマイズされ、実装されます。


destructor デストラクタ

In C++, an operation that is automatically invoked to finalize an object that is about to be deleted.

C++ では、削除されようとしているオブジェクトを最終的に処理するために自動的に呼び出される操作。


dynamic binding ダイナミックバインディング

The run-time association of a request to an object and one of its operations. In C++, only virtual functions are dynamically bound.

要求をオブジェクトとその操作のいずれかにランタイム(実行時もしくはコンパイル時)で関連付けること。C++ では、仮想関数のみが動的にバインドされます。

virtual function 仮想関数
ポリモーフィズムと関連している??要調査。

E

encapsulation カプセル化

The result of hiding a representation and implementation in an object. The representation is not visible and cannot be accessed directly from outside the object. Operations are the only way to access and modify an object's representation.

表現と実装をオブジェクトの中に隠すこと。表現は見えず、オブジェクトの外から直接アクセスすることはできません。操作は、オブジェクトの表現にアクセスしたり変更したりする唯一の方法です。

カプセル化についての記事

F

framework フレームワーク

A set of cooperating classes that makes up a reusable design for a specific class of software. A framework provides architectural guidance by partitioning the design into abstract classes and defining their responsibilities and collaborations. A developer customizes the framework to a particular application by subclassing and composing instances of framework classes.

特定のクラスのソフトウェアのための再利用可能な設計を構成する、協力的なクラスのセット。

フレームワークは、設計を抽象的なクラスに分割し、それぞれの責任と協力関係を定義することで、アーキテクチャ上の指針を提供します。

開発者は、フレームワーククラスのインスタンスをサブクラス化したり合成したりすることで、特定のアプリケーションに合わせてフレームワークをカスタマイズします。


friend class フレンドクラス

In C++, a class that has the same access rights to the operations and data of a class as that class itself.

C++で、あるクラスの操作やデータに対して、そのクラス自身と同じアクセス権を持つクラスのこと。

I

inheritance 継承

A relationship that defines one entity in terms of another. Class inheritance defines a new class in terms of one or more parent classes. The new class inherits its interface and implementation from its parents. The new class is called a subclass or (in C++) a derived class. Class inheritance combines interface inheritance and implementation inheritance. Interface inheritance defines a new interface in terms of one or more existing interfaces. Implementation inheritance defines a new implementation in terms of one or more existing implementations.

あるエンティティを別のエンティティの観点から定義する関係のこと。

クラス継承では、1 つまたは複数の親クラスの観点から新しいクラスを定義します。新しいクラスは、そのインターフェイスと実装を親クラスから継承します。新しいクラスは、サブクラスまたは(C++では)派生クラスと呼ばれます。

クラスの継承は、インターフェースの継承と実装の継承を組み合わせたものです。インターフェイス継承では、1つ以上の既存のインターフェイスを利用して新しいインターフェイスを定義します。実装継承では、1つまたは複数の既存の実装の観点から新しい実装を定義します。


instance variable インスタンス変数

A piece of data that defines part of an object's representation. C++ uses the term data member.

オブジェクトの表現の一部を定義するデータの断片。C++ではデータメンバーという用語を使用する。


interaction diagram 相互作用図

A diagram that shows the flow of requests between objects. interfaceThe set of all signatures defined by an object's operations. The interface describes the set of requests to which an object can respond.

オブジェクト間の要求の流れを示した図。 インターフェースオブジェクトの操作によって定義されるすべてのシグネチャの集合。インターフェースには、オブジェクトが応答できる要求のセットが記述されています。

「相互作用図という用語は、より専門的な2つのUML図を一般化したものですが、どちらも同様のメッセージの相互作用を表現するために使用できます。」

・collaboration diagrams
・sequence diagrams

参照:[15.1 Sequence and Collaboration Diagrams] https://sites.cs.ucsb.edu/~mikec/cs48/project/InteractionLarman.pdf

ちょっと気になる記事


interface インタフェース

The set of all signatures defined by an object's operations. The interface describes the set of requests to which an object can respond.

オブジェクトの操作によって定義されるすべてのシグネチャの集合。インターフェースは、オブジェクトが応答できる要求のセットを記述します。

独自の理解としては、情報を交換するための共有境界・やり取りする部分。


signature シグネチャ

An operation's signature defines its name, parameters, and return value.

操作のシグネチャは、その名前、パラメータ、および戻り値を定義します。

単語の意味としては、署名や(処方せんに書く)用法注意とあります。感覚としてはとある物体に記号つまり文字でとある物体を示す名称やとある物体の用法を記することだと思います。

そうなると「とある操作」つまり「とある処理」に対してその仕掛けの名前やパラメータ(必要な値。薬で言うところの一日3錠飲む的な)・戻り値(仕掛けがとある処理をした後に返す値のこと。薬で言うところの熱が引く的な「効果」に近い)のことと理解しました。

request リクエスト

An object performs an operation when it receives a corresponding request from another object. A common synonym for request is message.

オブジェクトは、他のオブジェクトから対応するリクエストを受け取ると操作を実行する。リクエストの一般的な同義語はメッセージです。


今回はdからiまでです。ところどころに出てくるシグネチャーとリクエストは先に翻訳しました。

翻訳にはhttps://www.deepl.com/を用いています。

ここまでお読みいただきありがとうございます。


この記事が気に入ったらサポートをしてみませんか?