JPH03157729A - Multiple succession control system - Google Patents

Multiple succession control system

Info

Publication number
JPH03157729A
JPH03157729A JP29624789A JP29624789A JPH03157729A JP H03157729 A JPH03157729 A JP H03157729A JP 29624789 A JP29624789 A JP 29624789A JP 29624789 A JP29624789 A JP 29624789A JP H03157729 A JPH03157729 A JP H03157729A
Authority
JP
Japan
Prior art keywords
message
inheritance
group
window
definition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP29624789A
Other languages
Japanese (ja)
Inventor
Akihiko Matsuo
昭彦 松尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP29624789A priority Critical patent/JPH03157729A/en
Publication of JPH03157729A publication Critical patent/JPH03157729A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To simplify the hierarchical relation of succession of definition relating to an object by designating a succession destination at every group with a method retrieval part by referring to a message group correspondence table when controlling the succession of the nature of the object. CONSTITUTION:The system is equipped with an object managing table 4 provided with information relating to the definition of a class or a generated object, the message group correspondence table 5 representing the correspondence of a message as a result of the grouping of the message with the group, and the method retrieval part 3 which retrieves a method for the message sent to the object as referring to the definition of the object. When the succession of the nature of the object is controlled, the method retrieval part 3 designates the succession destination at every group by referring to the message group correspondence table 5. Thereby, it is possible to simplify the hierarchical relation of the succession of the definition in an object oriented program.

Description

【発明の詳細な説明】 [概 要] オブジェクト指向プログラミングにおけるオブジェクト
に係る定義の継承の制御方式に関し、定義の継承の階層
関係の簡潔化を目的とし、メツセージのグループ化を行
なった結果のメツセージとグループとの対応を示すメッ
セージ・グループ対応テーブルと、オブジェクトに送ら
れたメツセージに対するメソッドをオブジェクトの定義
を参照しながら検索するメソッド検索部とを具備し、オ
ブジェクトの性質の継承を制御する際に、上記メソッド
検索部が、メッセージ・グループ対応テーブルを参照し
てグループごとに継承光を指定する如く構成する。
[Detailed Description of the Invention] [Summary] Regarding a control method for inheritance of definitions related to objects in object-oriented programming, for the purpose of simplifying the hierarchical relationship of inheritance of definitions, messages resulting from grouping messages and It is equipped with a message/group correspondence table that shows the correspondence with groups, and a method search section that searches for a method for a message sent to an object while referring to the definition of the object. The method search section is configured to refer to the message/group correspondence table and specify inheritance light for each group.

[産業上の利用分野] 本発明は、オブジェクト指向プログラミングにおける、
オブジェクトの定義の、クラスからの継承制御方式に関
し、特に複数の継承光の指定を許す多重継承方式を採る
場合におけるクラスの定義や継承の階層関係を簡潔なも
のと成すための制御方式に係る。
[Industrial Application Field] The present invention is applicable to object-oriented programming.
This invention relates to a control method for inheritance of object definitions from classes, and in particular to a control method for simplifying class definitions and inheritance hierarchical relationships when adopting a multiple inheritance method that allows the specification of multiple inheritance lights.

[従来の技術] 近年、オブジェクト指向プログラミングという概念が脚
光を浴びている。これは、従来から言われていたデータ
構造の抽象化をさらに押し進め、データとそれを処理す
るプログラムを−まとめにしたオブジェクトと呼ぶ構造
体を導入し、オブジェクトの性質を定義することによっ
てプログラミングを行なうスタイルを指す。
[Background Art] In recent years, the concept of object-oriented programming has been in the spotlight. This pushed the conventional abstraction of data structures further, introduced a structure called an object that bundled data and the program that processes it, and performed programming by defining the properties of the object. Refers to style.

オブジェクト指向プログラムのデータへのアクセス及び
処理の実行は、オブジェクトに対してメツセージを送り
、そのメツセージに対応するプログラム(これをメソッ
ドと呼ぶ)を実行し、結果を返すという形式になる。こ
の形式では、メツセージを送る側は実行されるメソッド
の具体的な処理内容を知る必要がなく、単にその返して
くる値を利用すればよいので、プログラムのモジュール
化にとっても望ましいといえる。
Accessing data and executing processing in an object-oriented program takes the form of sending a message to an object, executing a program (called a method) corresponding to the message, and returning the result. In this format, the message sender does not need to know the specific processing contents of the method to be executed, and can simply use the returned value, so it can be said to be desirable for program modularization.

例えば、文字列の長さを得るための処理と配列の長さを
知るための処理は異なるが、オブジェクト指向ではどち
らもデータ(文字列または配列)に「長さを得る」とい
うメツセージを送り、その実行結果を得るという形式に
なる。メツセージを送る側では、データが文字列なのか
配列なのかを気にする必要がなくなり、また長さを得る
ための具体的な処理内容も気にする必要がなくなる。
For example, the processing to obtain the length of a string and the processing to find the length of an array are different, but in object orientation both send a message to the data (string or array) to "obtain the length", The format is to obtain the execution results. On the side sending the message, there is no need to worry about whether the data is a character string or an array, and there is no need to worry about the specific process to obtain the length.

個々のオブジェクトが持つデータやメソッドを定義する
のに用いられる方法として、オブジェクトの生成時にそ
れが属するクラスを指定するという方法がある。
One method used to define the data and methods that each object has is to specify the class to which the object belongs when the object is created.

クラスとは、同じ性質を備えたオブジェクト群の共通の
定義を記述したものである。個々のオブジェクトはこの
クラスに属するインスタンスであるといい、このクラス
の定義を継承することになる。
A class describes a common definition of a group of objects with the same properties. Each object is said to be an instance of this class and inherits the definition of this class.

例えば、文字列“ABC”は、「文字列」というクラス
のインスタンスであり、その性質は「文字列」というク
ラスの定義を継承する。この定義は「文字列」というク
ラスのインスタンスに共通であり、オブジェクトごとに
異なるのは、個々のオブジェクトの持つデータ(これを
インスタンス変数と呼ぶ)だけである。こうすることで
、総てのオブジェクトごとに性質を記述するという手間
を省けることになる。
For example, the character string "ABC" is an instance of a class called "character string", and its properties inherit the definition of the class "character string". This definition is common to all instances of the "character string" class, and the only thing that differs from object to object is the data held by each object (this is called an instance variable). This saves you the trouble of writing the properties for every object.

第5図は上述したクラス定義の例について示したもので
ある。
FIG. 5 shows an example of the class definition described above.

同図の例では、stringというクラス(a)とar
rayというクラス1lb)を定義している。それぞれ
、インスタンス変数としてデータ(data)を持ち、
length、 get、 arefというメツセージ
に対するメソッドを定義している。これらのタイプのオ
ブジェクトは、長さを得るというlengthというメ
ツセージに対して同じように結果を返すが、具体的に実
行される内容はそれぞれ異なっている。
In the example in the same figure, a class (a) called string and ar
A class 1lb) called ray is defined. Each has data as an instance variable,
Methods for messages such as length, get, and aref are defined. These types of objects return the same result in response to the message length, but the specific content they perform is different.

このようなインスタンスとクラスの性質の継承には、幾
つかの方式が考えられる。最も一般的なのは、クラスの
上にスーパークラスを導入し、クラスもまたスーパーク
ラスの定義を継承するという方式である。
There are several possible ways to inherit the properties of instances and classes. The most common method is to introduce a superclass above a class, and the class also inherits the definition of the superclass.

このような方式を採用することで、クラスに階層構造を
持たせ、上位のクラスには一般的な概念を記述し、下位
のクラスにはより具体的な定義を述べることができるの
で、クラスの定義がより容易になる。
By adopting this method, classes can have a hierarchical structure, with general concepts described in higher-level classes and more specific definitions in lower-level classes. Easier to define.

例えば、マルチウィンドウシステムにおいてウィンドウ
の機能の定義をオブジェクト指向で行なった場合、ウィ
ンドウの基本的な機能は「ウィンドウ」というスーパー
クラスに定義しておき、詳細な機能については個々のク
ラスで定義すればよい。こうすれば、スーパークラス名
を見ることでそのクラスの性質を大まかに理解すること
ができるようになる。
For example, if window functions are defined in an object-oriented manner in a multi-window system, the basic functions of a window are defined in a superclass called "window", and detailed functions are defined in individual classes. good. This way, you can roughly understand the nature of a class by looking at its superclass name.

第6図はこのようなスーパークラスの導入による定義の
継承の例を示す図である。同図において、ウィンドウ(
window)というクラス51の性質を継承するクラ
スとして、マウス・ウィンドウ(mouse−wind
ow)というクラス52とキー・ウィンドウ(key−
window)というクラス53を定義している。これ
らのクラスのオブジェクトは、windowクラス51
に定義された性質も継承する。
FIG. 6 is a diagram showing an example of inheritance of definitions by introducing such a superclass. In the figure, the window (
As a class that inherits the properties of class 51 called mouse-window
ow) and a class 52 called key window (key-
A class 53 called ``window'' is defined. Objects of these classes are window class 51
It also inherits the properties defined in .

また、スーパークラスの導入に加えて、複数の継承光の
指定を許すという方式(多重継承方式)もある。この方
式では、スーパークラスを部品と見立て、下位のクラス
はそれらの部品の組み合わせとして定義することができ
る。先のウィンドウの例では、個々の機能ごとにスーパ
ークラスを定義しておき、クラスの定義では、継承光と
してそれらのスーパークラスを列挙すればよい。
In addition to introducing a superclass, there is also a method (multiple inheritance method) that allows the specification of multiple inheritance lights. In this method, superclasses are treated as parts, and lower classes can be defined as combinations of those parts. In the window example above, you can define a superclass for each function, and then list those superclasses as inheritance lights in the class definition.

第7図はこのような多重継承の例を示す図である。同図
においてマウス・キー・ウィンドウ(mouse−ke
y−window)というクラス56は、マウス・ウィ
ンドウ (mouse−window) 54とキー・
ウィンドウ(key−window) 55の性質を共
に継承する。mouse−windowにはマウス関係
の機能が、1(ey−windowにはキー人出力関係
の機能が定義されているとすればITlouse−ke
y−windowはマウスとキー人出力の両方の機能を
持つ。
FIG. 7 is a diagram showing an example of such multiple inheritance. In the figure, the mouse-key window (mouse-key
A class 56 called y-window has a mouse window 54 and a key window.
It also inherits the properties of window (key-window) 55. mouse-window has mouse-related functions, and 1 (eye-window has key output-related functions defined, ITlouse-ke
y-window has both mouse and key output functions.

[発明が解決しようとする課題] 上述したように多重継承を許した場合、問題となるのが
、複数の継承光で同じメツセージに対するメソッドが定
義されていた場合である。
[Problems to be Solved by the Invention] When multiple inheritance is allowed as described above, a problem arises when methods for the same message are defined in multiple inheritance lights.

このような場合、何らかの方策を設けてメソッドの競合
を解消しなければならない。
In such a case, some measure must be taken to resolve the method conflict.

第8図はメソッドの競合の例について示す図である。マ
ウス・キー人力・ウィンドウ (mouse−key−
window> 59は、マウス・ウィンドウ(mou
sewindow >、57とキー・ウィンドウ(ke
y−w i ndow)58の性質を継承しているが、
どちらのクラスにも1nput、 outputという
メツセージに対するメソッドが定義されている。
FIG. 8 is a diagram showing an example of method conflict. Mouse/key/window (mouse-key-
window > 59 is the mouse window (mou
sewindow >, 57 and key window (ke
y-wi indow) 58, but
Both classes define methods for messages called 1nput and output.

多くの場合、この解決には、オブジェクトに記述された
クラスからある方式に従って検索を行ない、最初に見つ
かったメソッドを実行するという方式を取る。
In many cases, this solution involves searching the classes described in the object according to a certain method, and executing the first method found.

しかし、この方式では、個々のメツセージごとに継承光
を変えることができない。そこで、個々のメツセージに
その継承光、あるいは継承をしないという指定を付ける
という方式も提案されている。こうすることで、個々の
メツセージごとに継承の制御が可能となる。
However, with this method, it is not possible to change the inherited light for each individual message. Therefore, a method has been proposed in which each message is designated as being inherited or not inherited. This allows inheritance to be controlled for each individual message.

このようにメソッドごとに継承光を定義するようにした
例を第9図に示す。同図において、1nputメツセー
ジに対してはmouse−windowを継承し、ou
tputメツセージに対してはkey−windowを
継承する。継承光が指定されていないメツセージに対し
ては、通常のメソッド探索を行なうことになるので、場
合によっては多くのメツセージに対して継承光を記述す
る必要を生じることになる。
FIG. 9 shows an example in which inheritance light is defined for each method in this way. In the same figure, for a 1nput message, mouse-window is inherited and ou
For tput messages, key-window is inherited. For messages for which inheritance light is not specified, a normal method search will be performed, so in some cases it may be necessary to write inheritance light for many messages.

しかし、個々のメツセージごとに継承光を指定するので
は、クラスの定義が複雑になり、その性質を把渥しづら
くなる。また、継承の階層関係が複雑になり、プログラ
ムのモジュール化を損なう結果にもなる。
However, specifying inheritance light for each individual message complicates the definition of the class and makes it difficult to understand its properties. Furthermore, the hierarchical relationship of inheritance becomes complicated, which impairs the modularization of the program.

本発明はこのような従来の問題点に鑑み、オブジェクト
指向プログラムにおいて、プログラムの必要以上の複雑
化を伴うことなく、継承光を自由に指定することが可能
で、定義の継承の階層関係を簡潔なものと成し得る制御
方式を提供することを目的としている。
In view of these conventional problems, the present invention enables the inheritance light to be freely specified in an object-oriented program without making the program unnecessarily complicated, and simplifies the hierarchical relationship of inheritance of definitions. The purpose is to provide a control method that can be used to control objects.

[課題を解決するための手段] 本発明によれば、上述の目的は、前記特許請求の範囲に
記載した手段により達成される。すなわち、本発明は、
オブジェクト指向プログラミングにおける、オブジェク
トに係るデータやメソッドの定義の継承の制御方式であ
って、クラスや生成されたオブジェクトの定義に係る情
報を有するオブジェクト管理テーブルと、メツセージの
グループ化を行なった結果のメツセージとグループとの
対応を示すメツセージ・グル−ブ対応テーブルと、オブ
ジェクトに送られたメツセージに対するメソッドをオブ
ジェクトの定義を参照しながら検索するメソッド検索部
とを具備し、オブジェクトの性質の継承を制御する際に
、上記メソッド検索部が、メッセージ・グループ対応テ
ーブルを参照してグループごとに継承光を指定する多重
継承制御方式である。
[Means for Solving the Problems] According to the present invention, the above objects are achieved by the means described in the claims. That is, the present invention
In object-oriented programming, it is a control method for inheritance of data and method definitions related to objects, and includes an object management table that has information related to the definitions of classes and generated objects, and messages that are the result of grouping messages. It is equipped with a message/group correspondence table that shows the correspondence between objects and groups, and a method search section that searches for a method for a message sent to an object while referring to the object definition, and controls the inheritance of object properties. In this case, the method search unit uses a multiple inheritance control method in which the method search unit specifies inheritance light for each group by referring to a message/group correspondence table.

[作 用] 本発明においては、メツセージを、予め関連するものご
とにグループ化してメッセージ・グループ対応テーブル
を作成して置き、継承光を指定する単位としてこのグル
ープを使えるようにする。このようにすることにより、
個々のグループごとに継承光を変えることが可能となり
、また、クラスの定義が必要以上に複雑になることもな
い。更に、メツセージのグループ化をそのメツセージの
機能ごとに行なえば、スーパークラスから継承する性質
がより明確となりクラスの機能の理解が容易になる。
[Function] In the present invention, messages are grouped in advance into related groups to create a message/group correspondence table, and this group can be used as a unit for specifying inherited light. By doing this,
It is possible to change the inheritance light for each group, and the class definition does not become unnecessarily complicated. Furthermore, if messages are grouped according to their functions, the properties inherited from the superclass will become clearer and the functions of the class will be easier to understand.

第1図は本発明によるクラスの定義例を示す図である。FIG. 1 is a diagram showing an example of class definition according to the present invention.

同図において、1nput−messageグループの
メツセージはmouse−windowを継承し、ou
tput−messageグループのメツセージはke
y−windowを継承する。
In the same figure, messages in the 1nput-message group inherit mouse-window and
Message of tput-message group is ke
Inherits y-window.

第2図は本発明の方式で使用するテーブルの例を示す図
であって、(a)はメッセージ・グループ対応テーブル
、ら)はメツセージ管理テーブル、(C)はオブジェク
ト・スーパークラス継承テーブル、(社)はオブジェク
ト・グループ・メツセージ対応管理テーブルを示してい
る。
FIG. 2 is a diagram showing examples of tables used in the method of the present invention, in which (a) is a message/group correspondence table, (3) is a message management table, (C) is an object/superclass inheritance table, ( ) shows an object/group/message correspondence management table.

例えば、同図(a)において、1nput、 read
−charメツセージはinput−messageに
、output、 write−charメツセージは
output−messageに属することが示されて
いる。
For example, in the same figure (a), 1nput, read
It is shown that the -char message belongs to the input-message, the output, and the write-char message belong to the output-message.

[実施例] 第3図は本発明の一実施例を示すブロック図であって、
多重継承制御方式の構成を示しており、lはプログラム
格納部、2はプログラム実行部、3はメソッド検索部、
4はオブジェクト管理テーブル、5はメッセージ・グル
ープ対応テーブル、6は継承制御部を表わしている。
[Embodiment] FIG. 3 is a block diagram showing an embodiment of the present invention,
It shows the configuration of the multiple inheritance control system, where l is a program storage section, 2 is a program execution section, 3 is a method search section,
4 represents an object management table, 5 represents a message/group correspondence table, and 6 represents an inheritance control section.

同図において、実行すべきプログラムは、プログラム格
納B1に格納される。
In the figure, the program to be executed is stored in program storage B1.

プログラム実行部2は、プログラムの実行を行なう部分
であって、プログラム中でメツセージ送信が行なわれた
とき、継承制@部6に実行すべきメソッドを問い合わせ
る。
The program execution section 2 is a section that executes the program, and when a message is sent in the program, it inquires of the inheritance system @ section 6 about the method to be executed.

オブジェクト管理テーブル4は定義されたクラスや生成
されたオブジェクトを管理するためのテーブルである。
The object management table 4 is a table for managing defined classes and generated objects.

また、メッセージ・グループ対応テーブル5は、先に第
2図でその例を示したように、メツセージとその属する
グループを対応付けたテーブルである。
The message/group correspondence table 5 is a table that associates messages with groups to which they belong, as shown in FIG.

メソッド検索部3はオブジェクトに送られたメツセージ
に対するメソッドをオブジェクトの定義を参照しながら
検索するが、このとき、メッセージ・グループ対応テー
ブル5を参照して、当該メツセージのグループを識別し
てグループごとに継承光を指定する。
The method search unit 3 searches for a method for a message sent to an object while referring to the definition of the object. At this time, it refers to the message/group correspondence table 5 to identify the group of the message and searches for each group. Specify inherited light.

また、本発明の方式は、他の継承制御方式と組み合わせ
ることも可能である。例えば、グループの継承光の指定
がなければ、従来と同様の方式で継承光を決定するよう
にすれば良い。
Furthermore, the method of the present invention can be combined with other inheritance control methods. For example, if there is no specification of inheritance light for a group, the inheritance light may be determined using a method similar to the conventional method.

第4図にこの場合のメソッド探索のフローチャートを示
す。第4図フローチャートに従って、本発明の詳細な説
明する。同図において点線で囲んだ部分は本発明を適用
した品分である。
FIG. 4 shows a flowchart of method search in this case. The present invention will be explained in detail according to the flowchart of FIG. In the same figure, the part surrounded by a dotted line is an item to which the present invention is applied.

〈ステップl〉 何らかのメツセージが、プログラム実行部2から送られ
て来たとする。
<Step l> Assume that some message has been sent from the program execution unit 2.

メツセージが送られたオブジェクトをobjに格納し、
送られたメツセージをmsHに格納する。また、送られ
たメツセージをメッセージ・グループ対応テーブル(第
2図(a))で検索し、メツセージのグループを探し、
それをgrに格納する。
Store the object to which the message was sent in obj,
Store the sent message in msH. Also, search the message group correspondence table (Figure 2 (a)) for the sent message, find the message group,
Store it in gr.

前記obj、msg、grはプログラムが格納されてい
るメモリ上の所定の領域である。
The obj, msg, and gr are predetermined areas on the memory where programs are stored.

〈ステップ2ン オブジェクト管理テーブル4を検索し、そのオブジェク
トのメツセージ管理テーブル(第2図ら))を検索し、
前記メツセージがあるかどうかを検索する。
<Step 2: Search the object management table 4, and search the message management table (Fig. 2 et al.) for that object.
Search to see if the message exists.

例えば、メツセージが送られたオブジェクトがkey−
w i ndowであるとする。仮に、メツセージが1
nputであれば、それに対応するメソッド1nput
−keyが引かれる。
For example, the object to which the message was sent is key-
Suppose that it is window. If the message is 1
If nput, the corresponding method 1nput
-key is pulled.

〈ステップ7〉 前記メソッドをプログラム実行部2に返す。<Step 7> The method is returned to the program execution unit 2.

プログラム実行部2は前記メソッドで定義された処理を
実行する。
The program execution unit 2 executes the processing defined by the method.

次に、ステップ2で前記メツセージが無い場合について
説明する。
Next, the case where there is no message in step 2 will be explained.

例えば、オブジェク) key−windowに、メツ
セージoutputが人力されたとする。メツセージ管
理テーブル(第2図う))には、オブジェクトkey−
windowに、メツセージoutputは定義されて
いない。
For example, assume that a message output is manually input to the key-window (object). The message management table (Figure 2) contains the object key-
No message output is defined for window.

くステップ3〉 オブジェクト・グループ・メツセージ対応管理テーブル
(第2図(d))を検索し、前記outputに対応す
るグループが登録されているかどうかを見る。outp
utのグル−プはoutput−messageである
(ステップlでメツセージグループ対応テーブル(第2
図(a))を検索し、grに格納しているので判る。) 次に、前記output−messageが継承するオ
ブジェクトを検索すると、key−w i ndo−で
ある。すなわちkey−windowでoutput−
messageが継承するのは、A−windowであ
る。
Step 3> Search the object/group/message correspondence management table (FIG. 2(d)) to see if a group corresponding to the output is registered. outp
The group of ut is output-message (in step l, the message group correspondence table (second
This can be seen because Figure (a)) is searched and stored in gr. ) Next, when searching for the object inherited by the output-message, it is key-wi indo-. In other words, key-window and output-
What message inherits is A-window.

くステップ5〉 objに、八−windowを格納する(すなわち、o
bjに書かれていたオブジェクトkey−w indo
wは八−windowに変更になる)。その後ステップ
2に分岐し、ステップ7を実行する。
Step 5> Store 8-window in obj (i.e., o
Object written in bj key-w indo
w will be changed to 8-window). Thereafter, the process branches to step 2, and step 7 is executed.

仮に、ステップ3で、継承先が定義されていないとする
場合は、ステップ4を実行する。
If it is assumed that the inheritance destination is not defined in step 3, step 4 is executed.

〈ステップ4〉 スーパークラスが定義されているかどうかを検索する。<Step 4> Find if a superclass is defined.

仮に、オブジェクト・グループ・メツセージ対応管理テ
ーブル(第2図(d))内で、オブジェクトkey−w
indowにoutput−messageが定義され
ていないとする。
For example, in the object/group/message correspondence management table (Fig. 2(d)), the object key-w
Assume that no output-message is defined for indo.

この時、ステップ4で、オブジェクト・スーパークラス
継承テーブル(第2図(C))を参照し、key−wi
ndowが継承するスーパークラスを検索する0この場
合は・オブジェク) windowである。
At this time, in step 4, the object superclass inheritance table (Figure 2 (C)) is referred to, and the key-wi
Find the superclass that ndow inherits from (in this case, object) window.

くステップ6〉 objに、windowを格納する(すなわち、Ob)
に書かれていたオブジェク? key−windowは
windowに変更になる)。その後のステップ2に分
岐し、ステップ7を実行する。尚、スーパークラスw1
0dowのメツセージおよびメソッドはメツセージ管理
テーブル(第2図う))に定義されているものとする。
Step 6> Store window in obj (i.e., Ob)
The object written in? key-window will be changed to window). The process branches to subsequent step 2 and executes step 7. Furthermore, super class w1
It is assumed that the message and method of 0dow are defined in the message management table (Figure 2B).

仮に、ステップ4でスーパークラスが定義されていない
と判断されたら、ステップ8でメソッドは未定義と判断
される。この場合は、プログラム実行部2はメツセージ
による処理を実行しない。
If it is determined in step 4 that the superclass is not defined, then in step 8 it is determined that the method is undefined. In this case, the program execution unit 2 does not execute processing based on the message.

更に他の方式として、個々のメソッドごとに継承先を指
定する形式と併用した場合、個々のメソッドに継承先が
定義されているかどうかを調べ、もし定義されていたら
その継承先を優先させるようにしても良い。
As another method, when used in conjunction with a format in which inheritance destinations are specified for each individual method, it is necessary to check whether an inheritance destination is defined for each method, and if so, give priority to that inheritance destination. It's okay.

[発明の効果] 以上説明したように、本発明の方式によれば、オブジェ
クト指向プログラムにおいて、プログラムの必要以上の
複雑化を伴うことなく継承先を自由に指定でき、またそ
の指定も理解しやすいものとなるため、ソフトウェア開
発に際する労力を大幅に削減することができる利点があ
る。
[Effects of the Invention] As explained above, according to the method of the present invention, an inheritance destination can be freely specified in an object-oriented program without making the program unnecessarily complicated, and the specification is also easy to understand. This has the advantage of greatly reducing the effort required for software development.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明の方式によるクラスの定義の例を示す
図、第2図は本発明の方式で使用する対応表の例を示す
図、第3図は本発明の一実施例を示すブロック図、第4
図は本発明の方式と通常の継承方式とを併用するときの
メソッド探索のフローチャート、第5図はクラス定義の
例を示す図、第6図はスーパークラスの導入による定義
の継承の例を示す図、第7図は多重継承の例を示す図、
第8図はメソッドの競合の例を示す図、第9図はメソッ
ドごとに継承光を定義する場合の例を示す図である。 本jjI5′wy4の方式7zよろクラ久の東義の枳1
示す同第1図 1・・・・・・プログラム格納部、2・・・・・・プロ
グラム実行部、3・・・・・・メソッド検索邪、4・・
・・・・オブジェクト管理テーブル、5・・・・・・メ
ッセージ・グループ対応テーブル
FIG. 1 is a diagram showing an example of class definition according to the method of the present invention, FIG. 2 is a diagram showing an example of a correspondence table used in the method of the present invention, and FIG. 3 is a diagram showing an embodiment of the present invention. Block diagram, 4th
The figure is a flowchart of method search when the method of the present invention and the normal inheritance method are used together, Figure 5 is a diagram showing an example of class definition, and Figure 6 is an example of definition inheritance by introducing a super class. Figure 7 is a diagram showing an example of multiple inheritance,
FIG. 8 is a diagram showing an example of method conflict, and FIG. 9 is a diagram showing an example of defining inheritance light for each method. Book jj I5'wy4 method 7z Yorokura Hisashi's Togi's 1
FIG. 1 shows: 1...Program storage section, 2...Program execution section, 3...Method search function, 4...
...Object management table, 5...Message group correspondence table

Claims (1)

【特許請求の範囲】 オブジェクト指向プログラミングにおける、オブジェク
トに係るデータやメソッドの定義の継承の制御方式であ
って、 クラスや生成されたオブジェクトの定義に係る情報を有
するオブジェクト管理テーブルと、メッセージのグルー
プ化を行なった結果のメッセージとグループとの対応を
示すメッセージ・グループ対応テーブルと、 オブジェクトに送られたメッセージに対応するメソッド
をオブジェクトの定義を参照しながら検索するメソッド
検索部とを具備し、 オブジェクトの性質の継承を制御する際に、上記メソッ
ド検索部が、メッセージ・グループ対応テーブルを参照
してグループごとに継承先を指定することを特徴とする
多重継承制御方式。
[Claims] A control method for inheritance of data and method definitions related to objects in object-oriented programming, comprising an object management table having information related to definitions of classes and generated objects, and message grouping. It is equipped with a message/group correspondence table that shows the correspondence between messages and groups as a result of performing this process, and a method search section that searches for a method corresponding to a message sent to an object while referring to the definition of the object. A multiple inheritance control method characterized in that, when controlling property inheritance, the method search unit specifies an inheritance destination for each group by referring to a message/group correspondence table.
JP29624789A 1989-11-16 1989-11-16 Multiple succession control system Pending JPH03157729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29624789A JPH03157729A (en) 1989-11-16 1989-11-16 Multiple succession control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29624789A JPH03157729A (en) 1989-11-16 1989-11-16 Multiple succession control system

Publications (1)

Publication Number Publication Date
JPH03157729A true JPH03157729A (en) 1991-07-05

Family

ID=17831097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29624789A Pending JPH03157729A (en) 1989-11-16 1989-11-16 Multiple succession control system

Country Status (1)

Country Link
JP (1) JPH03157729A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819279A (en) * 1995-04-27 1998-10-06 Fujitsu Limited Object data processing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819279A (en) * 1995-04-27 1998-10-06 Fujitsu Limited Object data processing apparatus

Similar Documents

Publication Publication Date Title
US7043481B2 (en) System, method and software for creating, maintaining, navigating or manipulating complex data objects and their data relationships
US7207002B2 (en) Serialization and preservation of objects
KR101137188B1 (en) Promotion and demotion techniques to facilitate file property management between object systems
US7100112B1 (en) Dynamic properties of documents and the use of these properties
US6169993B1 (en) Method, data structure, and computer program product for object state storage
US6704743B1 (en) Selective inheritance of object parameters in object-oriented computer environment
US4912637A (en) Version management tool
US6343265B1 (en) System and method for mapping a design model to a common repository with context preservation
US6766518B1 (en) Establishing relationships between objects based on object interfaces
US4964063A (en) System and method for frame and unit-like symbolic access to knowledge represented by conceptual structures
JPH03137730A (en) Object directional computer-system
US8024295B2 (en) Method and apparatus for archiving and unarchiving objects
JP2007012080A (en) Compound document framework
CA2246920A1 (en) An activemark mechanism for a live parsing editor
JPH0693227B2 (en) Data processing system and method of operating data processing system
JPH07175730A (en) System and method for transfer of data in object-oriented environment
US7409642B2 (en) Method and system for applying user interface elements to data
US5062039A (en) Sharing of workspaces in interactive processing using workspace name tables for linking of workspaces
US7908240B1 (en) Facilitated use of column and field data for field record universe in a knowledge store
CN112698819A (en) Method, device and storage medium for designing tree-oriented object programming program
US5379407A (en) Error handling in a state-free system
JPH08202551A (en) Method and mechanism for access on object involving interface heritage
US7039900B2 (en) Method for implementing a plurality of object interfaces
JPH03157729A (en) Multiple succession control system
Elahi et al. Classes and Packages