JPH09212345A - Object linkage definition method - Google Patents

Object linkage definition method

Info

Publication number
JPH09212345A
JPH09212345A JP8016276A JP1627696A JPH09212345A JP H09212345 A JPH09212345 A JP H09212345A JP 8016276 A JP8016276 A JP 8016276A JP 1627696 A JP1627696 A JP 1627696A JP H09212345 A JPH09212345 A JP H09212345A
Authority
JP
Japan
Prior art keywords
class
attribute
function
temperature
relative
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
JP8016276A
Other languages
Japanese (ja)
Inventor
Yukimasa Shiyou
行正 招
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP8016276A priority Critical patent/JPH09212345A/en
Publication of JPH09212345A publication Critical patent/JPH09212345A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To facilitate the associative relating description between class an attribute by providing a relative defining function for the class, a relative defining function for the attribute, and a method automatic calling function. SOLUTION: A temperature control system for a bath burner 1 is regarded as a system controlled to be and programmed in an object-oriented language. A relative class is defined to generate the objects of a burner class and a sensor class as relative classes by the object generation of a bath burner class in initial start function definition and also generate the object of a controller class. When set temperature of a console panel 5 is set by defining a relative attribute, the set temperature of a controller 4 varies to the same value at the same time. Further, the alarm upper limit and lower limit temperatures of the controller 4 are set. A correcting function is set and then a current temperature display is called when the current temperature of the console panel 5 varies, so that the varied temperature is displayed on a display panel.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、オブジェクト指向
プログラミング言語を使用したオブジェクトの連携定義
方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an object cooperation definition method using an object-oriented programming language.

【0002】[0002]

【従来の技術】現在、コンピュータのプログラムを記述
し、そのプログラムを実行する場合には動作の全てを高
級言語のプログラムで記述し、それを実行形式に変換す
る手続きを取っている。
2. Description of the Related Art Currently, a program for a computer is described, and when the program is executed, all operations are described in a high-level language program, and a procedure for converting the program into an execution form is taken.

【0003】同様に、オブジェクト指向プログラミング
においても、クラスを定義し、属性はメソッドと呼ばれ
る手続きを記述している。また、クラスとクラスの連
携、クラス間の属性の連携、メソッドと属性、メソッド
間の連携などをプログラマが全て記述している。
Similarly, in object-oriented programming, a class is defined and an attribute describes a procedure called a method. In addition, programmers describe all the cooperation between classes, cooperation between attributes between classes, methods and attributes, and cooperation between methods.

【0004】[0004]

【発明が解決しようとする課題】オブジェクト指向のプ
ログラムを記述する場合に必要なクラスを分析過程で抽
出し、プログラム言語によって実装するときにあらかじ
めクラスとクラスの関連が分かっているにも拘わらず、
クラスの定義を全てのクラスに行い、関連したクラス間
の関係付けをあるクラスのメソッドとして記述する必要
がある。
Despite the fact that the classes necessary for writing an object-oriented program are extracted in the analysis process and the relation between the classes is known in advance when they are implemented by a programming language,
It is necessary to define a class for all classes and describe the relationship between related classes as a method of a class.

【0005】同様に、あるクラスの属性も、他のクラス
の属性と関連がある場合においても、該等クラスのメソ
ッドで関連を記述しなければならない。
Similarly, even when an attribute of a certain class is related to an attribute of another class, the relationship must be described by a method of the equal class.

【0006】このようなプログラミング手法では、クラ
スとクラスを実行時に結び付けるために全ての関連を記
述するのは関連の付け忘れを起こす可能性が高い。ま
た、属性間のメソッドでの関連付けにおいても全ての関
連した属性もメソッドで記述しなければならないため、
記述忘れとバグの混入を起こし易い。
[0006] In such a programming technique, describing all the associations in order to connect the classes to each other at run time is likely to cause the associations to be forgotten. Also, in the method association between attributes, all related attributes must also be described in the method.
It is easy to forget the description and mix bugs.

【0007】本発明の目的は、クラス及び属性間の関連
付け記述を容易にするオブジェクトの連携定義方式を提
供することにある。
An object of the present invention is to provide an object cooperation definition method that facilitates the association description between classes and attributes.

【0008】[0008]

【課題を解決するための手段】本発明は、オブジェクト
指向プログラミング言語を使ってプログラムを作成する
において、クラスからオブジェクトを生成・消滅する場
合に関連定義したクラスからもオブジェクトを生成・消
滅させるクラスの関連定義機能と、オブジェクトの属性
を変化させたときに、関連定義した他のオブジェクトに
同じ属性を設定する属性の同値関連定義機能と、オブジ
ェクトの属性を変化させたときに、関連定義した他のオ
ブジェクトに関数で関連付けた値を設定する属性の異値
関連定義機能と、オプションの属性の値を変化させたと
きに定義されたメソッドを呼出すメソッド自動呼出し機
能と、を備えたことを特徴とする。
According to the present invention, in creating a program using an object-oriented programming language, when an object is created or deleted from a class, a class that creates or deletes an object from the associated defined class is also provided. Related definition function and when the attribute of the object is changed, the same attribute is set for other related defined objects. It is characterized by having a different value relation definition function of an attribute that sets a value associated with a function with an object, and a method automatic call function that calls a defined method when the value of an optional attribute is changed. .

【0009】[0009]

【発明の実施の形態】図1は、風呂釜の温度制御のシス
テムを示す。風呂釜1には風呂水の温度を高めるための
バーナ2と、風呂水の温度を測定するためのセンサ3が
設けられる。そして、バーナ2のオン・オフ制御のため
の制御装置4と操作盤5が設けられる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT FIG. 1 shows a system for controlling the temperature of a bath. The bath pot 1 is provided with a burner 2 for increasing the temperature of bath water and a sensor 3 for measuring the temperature of bath water. A control device 4 and an operation panel 5 for on / off control of the burner 2 are provided.

【0010】操作盤5には、設定温度を増減させるスイ
ッチ51、52と、現在温度と設定温度の数値表示パネル
53、54と警報ランプ55及び運転停止のスイッチ56、
57が設けられる。
The operation panel 5 includes switches 5 1 and 5 2 for increasing / decreasing the set temperature, numerical display panels 5 3 and 5 4 for the present temperature and the set temperature, an alarm lamp 5 5 and a switch 5 6 for stopping operation.
5 7 are provided.

【0011】このような温度制御システムを制御対象と
し、オブジェクト指向プログラム言語によりプログラミ
ングを行う場合、それぞれクラスオブジェクトを定義し
て相互の関連付けを行ったプログラムを作成するが、本
実施形態では、以下の関連定義等を行ったプログラミン
グを可能にする。
When programming is performed using an object-oriented programming language with such a temperature control system as a control target, a program in which class objects are defined and associated with each other is created. Enables programming with related definitions.

【0012】(1)クラスオブジェクトの関連定義 クラス定義において、関連クラス(relation_
class)を定義することにより、クラスからオブジ
ェクトが生成される場合に関連定義したクラスからもオ
ブジェクトを生成し、オブジェクト同士で相手のオブジ
ェクトのリンクを持つ。
(1) Related Definition of Class Object In the class definition, the related class (relation_
By defining "class)", when an object is generated from a class, an object is also generated from the associated defined class, and the objects have links to each other.

【0013】図2〜図4は、上記の風呂釜の温度制御シ
ステムのプログラムの一部を示し、初期始動関数定義
(main_roop)において風呂釜クラスのオブジ
ェクト生成によって関連したクラスになるバーナクラス
とセンサクラスのオブジェクトが生成され、また伝播に
よりバーナクラスのオブジェクトが生成されたことによ
り制御装置クラスのオブジェクトが生成される。
FIGS. 2 to 4 show a part of the program of the temperature control system for a bath kettle, in which the burner class and the sensor which become the related classes by the object generation of the bath kettle class in the initial starting function definition (main_loop). An object of the class is generated, and an object of the burner class is generated by the propagation, so that an object of the controller class is generated.

【0014】制御装置はセンサとバーナの2つから参照
されているが先に伝播されたものだけを生成する。同様
に、関連したオブジェクトを伝播によって生成する。
The controller produces only those referenced by the sensor and burner but propagated earlier. Similarly, the related objects are created by propagation.

【0015】図5は、オブジェクト相互にリンクを張っ
たクラスオブジェクトを生成した状態を示す。
FIG. 5 shows a state in which a class object in which objects are linked to each other is generated.

【0016】(2)属性の同値関連定義 クラス定義において、関連属性(relation_a
ttr)を定義することにより、オブジェクト間の属性
の関連付けを行う。この定義は、一致(equal)オ
プションにより全く同じ属性がコピーされ設定される。
(2) Equivalence relation definition of attribute In the class definition, the relation attribute (relation_a
By defining ttr), attributes are associated between objects. This definition is set by copying the exact same attribute by the equal option.

【0017】図2〜図4の例では、操作盤の設定温度を
設定すると、同時に制御装置の設定温度が同じ値に変化
する。
In the example shown in FIGS. 2 to 4, when the set temperature of the operation panel is set, the set temperature of the control device simultaneously changes to the same value.

【0018】(3)属性の異値関連定義 クラス定義において、関連属性(relation_a
ttr)を定義することにより、オブジェクト間の属性
の関連付けを行う際、関数(function)オプシ
ョンにより関連した値にある関数の値が設定される。
(3) Different value relation definition of attribute In the class definition, the relation attribute (relation_a)
By defining the (ttr), the value of the function in the related value is set by the function option when associating the attributes between the objects.

【0019】図2〜図4の例では、制御装置の警報上限
値が設定温度+5度で、警報下限値温度がー8度に設定
される。これは、設定温度が設定される度に呼出され、
関数を演算し、各警報温度に設定する。
In the example of FIGS. 2 to 4, the alarm upper limit value of the control device is set to +5 degrees and the alarm lower limit temperature is set to -8 degrees. This is called every time the set temperature is set,
Calculate the function and set each alarm temperature.

【0020】(4)属性値変更時のメソッド自動呼出し クラス定義において、修正機能(modify_dae
mon)を定義することにより、オプションの属性に値
が設定されるときに定義されたメソッドを呼出す。
(4) Method automatic call when attribute value is changed In the class definition, a modification function (modify_dae)
mon) to call the defined method when a value is set for an optional attribute.

【0021】図4の例では、操作盤の現在温度が変化し
たときに現在温度表示が呼出され、表示パネルに変化し
た温度を表示するようになる。
In the example of FIG. 4, when the current temperature of the operation panel changes, the current temperature display is called and the changed temperature is displayed on the display panel.

【0022】以上のように、本実施形態では、クラス
(オブジェクト)の関連定義をすることにより、関連定
義されたオブジェクトを1つの命令により同時に生成す
ることができる。また、消滅時においても関連したオブ
ジェクトを同期して消滅できる。これにより、手続きの
簡略化と、オブジェクト生成・消滅の手続きの記述忘れ
の間違いを防止できる。
As described above, in this embodiment, by defining the relations of the classes (objects), the objects for which the relations are defined can be simultaneously generated by one instruction. Further, even when the objects are deleted, the related objects can be deleted synchronously. As a result, it is possible to simplify the procedure and prevent a mistake in forgetting to describe the procedure for creating / deleting an object.

【0023】また、クラス(オブジェクト)の属性間の
値の同期設定機構により、一方のオブジェクトの属性の
値を変化させた場合に関連したオブジェクトの値も同時
に変化させることができる。これにより、メソッドなど
の手続きを記述してオブジェクト間の属性の同期処理を
していたものを省略できる。
Further, by the value synchronization setting mechanism between the attributes of the class (object), when the attribute value of one object is changed, the value of the related object can be changed at the same time. As a result, it is possible to omit a procedure that describes a procedure such as a method and synchronizes attributes between objects.

【0024】また、値を設定する場合に、簡易手続き変
換関数を定義することにより、属性間の同期した異値の
設定が可能となる。
Further, when values are set, it is possible to set different values in synchronization with each other by defining a simple procedure conversion function.

【0025】また、ある属性が変更されたときにメソッ
ドの手続きを自動的に呼出す機構によって、メソッドを
呼出す記述を省略することができる。
Also, the description of calling a method can be omitted by a mechanism for automatically calling a method procedure when a certain attribute is changed.

【0026】[0026]

【発明の効果】以上のとおり、本発明によれば、オブジ
ェクト指向プログラミング言語を使ってプログラムを記
述するにおいて、クラスの関連定義機能と、属性の同値
関連定義機能と、属性の異値関連定義機能及びメソッド
自動呼出し機能を設けたため、オブジェクトの生成や消
滅の記述を簡略にし、また間違いを防止できる。
As described above, according to the present invention, in describing a program using an object-oriented programming language, a class relation definition function, an attribute equivalence relation definition function, and an attribute different value relation definition function are provided. Also, since the function automatic call function is provided, the description of object creation and deletion can be simplified, and mistakes can be prevented.

【図面の簡単な説明】[Brief description of drawings]

【図1】風呂釜の温度制御システム。FIG. 1 Temperature control system for bath kettle.

【図2】本発明の実施形態における風呂釜の温度制御プ
ログラム(1)。
FIG. 2 is a bath stove temperature control program (1) according to the embodiment of the present invention.

【図3】本発明の実施形態における風呂釜の温度制御プ
ログラム(2)。
FIG. 3 is a bath oven temperature control program (2) according to the embodiment of the present invention.

【図4】本発明の実施形態における風呂釜の温度制御プ
ログラム(3)。
FIG. 4 is a bath oven temperature control program (3) according to the embodiment of the present invention.

【図5】本発明の実施形態におけるオブジェクトのリン
ク構造。
FIG. 5 is a link structure of objects according to the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1…風呂釜 2…バーナ 3…センサ 4…制御装置 5…操作盤 1 ... Bath pot 2 ... Burner 3 ... Sensor 4 ... Control device 5 ... Operation panel

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 オブジェクト指向プログラミング言語を
使ってプログラムを作成するにおいて、 クラスからオブジェクトを生成・消滅する場合に関連定
義したクラスからもオブジェクトを生成・消滅させるク
ラスの関連定義機能と、 オブジェクトの属性を変化させたときに、関連定義した
他のオブジェクトに同じ属性を設定する属性の同値関連
定義機能と、 オブジェクトの属性を変化させたときに、関連定義した
他のオブジェクトに関数で関連付けた値を設定する属性
の異値関連定義機能と、 オプションの属性の値を変化させたときに定義されたメ
ソッドを呼出すメソッド自動呼出し機能と、を備えたこ
とを特徴とするオブジェクトの連携定義方式。
1. When creating a program using an object-oriented programming language, a class related definition function of creating and deleting an object from a class that is defined when creating and deleting an object from the class, and an attribute of the object. When changing the, the attribute equivalency related definition function that sets the same attribute to other related defined objects, and the value associated with another related defined object by a function when the attribute of the object is changed An object linkage definition method characterized by having a different value related definition function of the attribute to be set and an automatic method calling function that calls the defined method when the value of the optional attribute is changed.
JP8016276A 1996-02-01 1996-02-01 Object linkage definition method Pending JPH09212345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8016276A JPH09212345A (en) 1996-02-01 1996-02-01 Object linkage definition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8016276A JPH09212345A (en) 1996-02-01 1996-02-01 Object linkage definition method

Publications (1)

Publication Number Publication Date
JPH09212345A true JPH09212345A (en) 1997-08-15

Family

ID=11912035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8016276A Pending JPH09212345A (en) 1996-02-01 1996-02-01 Object linkage definition method

Country Status (1)

Country Link
JP (1) JPH09212345A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250655A (en) * 2009-04-17 2010-11-04 Hitachi Ltd Software development support method, development support apparatus, and development support program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010250655A (en) * 2009-04-17 2010-11-04 Hitachi Ltd Software development support method, development support apparatus, and development support program

Similar Documents

Publication Publication Date Title
US5838563A (en) System for configuring a process control environment
GB1509803A (en) Programmer for a digital controller
JPS6318403A (en) Off-line control executing method
JPH0221320A (en) Information processor having help function including editing function
JP2649034B2 (en) Control device
JP2000194406A (en) Programming method for industrial controller and programming system
JPH01108602A (en) Sequence controller
JPS58158704A (en) Plc of time chart input system
JP3034265B2 (en) State transition display method
JP3283055B2 (en) Program editing device
JPH04181351A (en) Dynamic alteration system for sg information by command
JP2672759B2 (en) Robot motion program generator
JPH0340546A (en) Communication control equipment
JPH0784653A (en) Program translation system for automatically controlling thermostat
JPS56162123A (en) Electronic computer system
JPS61279932A (en) Automatic batch translation system for source programs
JP2589183B2 (en) How to set time chart
JP2002073004A (en) Screen layout system and screen layout method
JPH03241450A (en) Time sharing system
JPH04147335A (en) Simple built-in processing system for user program
JP2024076013A5 (en)
JPH02108106A (en) Numerical controller
TW347519B (en) Method for performing oriented software design
JPH0589047A (en) Control system for execution procedure of program
JPS63201702A (en) Robot control program generating device