JPH117399A - Data display method in object-oriented programs - Google Patents
Data display method in object-oriented programsInfo
- Publication number
- JPH117399A JPH117399A JP9159501A JP15950197A JPH117399A JP H117399 A JPH117399 A JP H117399A JP 9159501 A JP9159501 A JP 9159501A JP 15950197 A JP15950197 A JP 15950197A JP H117399 A JPH117399 A JP H117399A
- Authority
- JP
- Japan
- Prior art keywords
- class
- attribute
- instance
- address
- list
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
(57)【要約】
【課題】オブジェクト指向プログラムにおいて、生成さ
れたインスタンスが関連付けしている複数の他インスタ
ンスの属性を一覧表示すること。さらにオブジェクト指
向データベースにおいて、出力された属性一覧の値を変
更することにより、データベースを更新すること。
【解決手段】処理101は、クラス一覧表示及び、表示
クラス、属性の選択を行う処理であり、ソースコードを
読み込み、読み込んだソースコードに存在するクラスを
一覧表示し、その中から表示するクラスの及び属性の選
択を行い、処理102で取得するアドレス関連ファイル
を作成する。処理102は選択クラスのアドレスと値の
取得と関連付けを行う処理であり、プログラム実行中
に、表示するクラスのインスタンスが記憶されているア
ドレス及び属性の値、インスタンス間の関連をアドレス
関連ファイルに取得する。処理103は選択属性一覧表
示処理であり、処理102で取得したアドレス関連ファ
イルを元に属性を一覧表示する。
(57) [Summary] To provide a list of attributes of a plurality of other instances associated with a generated instance in an object-oriented program. Furthermore, in an object-oriented database, updating the database by changing the value of the output attribute list. A process 101 is a process of displaying a class list, selecting a display class and an attribute, reading a source code, displaying a list of classes existing in the read source code, and selecting a class to be displayed from the list. Then, an address-related file to be acquired in the process 102 is created. Process 102 is a process for acquiring and associating the address and value of the selected class, and acquiring the address where the instance of the class to be displayed is stored, the attribute value, and the relationship between the instances in the address-related file during the execution of the program. I do. Process 103 is a selection attribute list display process, in which attributes are displayed in a list based on the address-related file acquired in process 102.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、オブジェクト指向
プログラミングを支援するコンピュータ支援ソフトウェ
アエンジニアリング(以下CASEとする)ツールにお
いて、特に、メモリ内に保持されている複数のインスタ
ンスの属性及び、オブジェクト指向データベース内に格
納された複数のインスタンスの属性を一覧表示し、デー
タの確認、及び更新を行う為に用いる。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer-assisted software engineering (CASE) tool for supporting object-oriented programming, and more particularly, to an attribute of a plurality of instances held in a memory and an object-oriented database. List of the attributes of a plurality of instances stored in the server and used to confirm and update data.
【0002】[0002]
【従来の技術】従来の技術では、オブジェクト指向プロ
グラムによって生成された、メモリ内のインスタンスの
情報を把握する手段として、CASEツールにデバッガ
及びブラウザと呼ばれるアプリケーションが用意されて
いる。このデバッガにより、メモリ内のインスタンス、
またブラウザにより、データベース内のインスタンスに
関する様々な情報を参照できる。従来のデバッガでは、
デバッグ時にソースコードを一行ずつトレースでき、そ
の際ソースコード上で表示するインスタンスを選択する
事により、選択したインスタンスの属性等の情報を取得
できる。さらに従来のデータベース管理システムで用意
されているブラウザでは、データベースへのエントリポ
イントからインスタンスの関連を一件ずつ追跡する事に
より、目的のインスタンス内の情報を取得する。さら
に、オブジェクト指向データベース内のインスタンスの
属性等の情報の更新は、ユーザが更新用アプリケーショ
ンを作成し、該アプリケーションを用いて行っている。2. Description of the Related Art In a conventional technique, a CASE tool is provided with applications called a debugger and a browser as means for grasping information of an instance in a memory generated by an object-oriented program. This debugger allows for instances in memory,
The browser can also refer to various information about the instance in the database. In a traditional debugger,
At the time of debugging, the source code can be traced line by line. At this time, by selecting an instance to be displayed on the source code, information such as attributes of the selected instance can be acquired. Furthermore, the browser provided in the conventional database management system obtains information in the target instance by tracking the association of the instances one by one from the entry point to the database. Further, information such as the attribute of an instance in the object-oriented database is updated by a user creating an application for updating and using the application.
【0003】[0003]
【発明が解決しようとする課題】従来技術によれば、一
つ一つのインスタンスの情報の確認は可能である。しか
し、オブジェクト指向プログラミングの際重要となるの
はオブジェクト間の関連である。特にあるインスタンス
が複数の他のインスタンスに関連付けされている場合、
関連するインスタンス間のデータの整合性を確認するた
めに、それぞれの関連先インスタンスの内容を同時に把
握することが必要である。また、オブジェクト指向デー
タベースの場合、データの整合性が合わない場合即座に
修正できるツールが必要である。According to the prior art, it is possible to confirm information of each instance. However, what is important in object-oriented programming is the relationship between objects. In particular, if one instance is associated with multiple other instances,
In order to confirm data consistency between related instances, it is necessary to simultaneously grasp the contents of each related destination instance. In the case of an object-oriented database, a tool that can immediately correct data inconsistency is required.
【0004】本発明の第一の目的は、オブジェクト指向
プログラムにおいて、あるインスタンスが関連付けして
いる複数の他のインスタンスの属性を一覧表示すること
により、データ間の関連の確認を容易に行えるデータ表
示方式を提供することにある。A first object of the present invention is to provide a data display which can easily confirm the association between data in an object-oriented program by displaying a list of attributes of a plurality of other instances associated with one instance. It is to provide a method.
【0005】また本発明の第二の目的は、オブジェクト
指向データベースにおいて、データの更新を容易に行え
るデータ表示方式を提供することにある。A second object of the present invention is to provide a data display method for easily updating data in an object-oriented database.
【0006】[0006]
【課題を解決するための手段】上記第一の目的を達成す
るために、本発明によるデータ表示方式では、メモリ内
あるいはオブジェクト指向データベース内に保持されて
いる複数のクラスの複数の属性の内、表示するクラス及
び属性を選択し、プログラムの実行中に該選択クラスの
インスタンスが生成されるメモリ上のアドレス、あるい
はデータベースに格納する際発行されるオブジェクトI
D等の位置情報を取得し、該取得した位置情報に基づ
き、メモリあるいはデータベース内の該選択クラスのイ
ンスタンスの属性を取得し、該取得インスタンスを一覧
表示する。これにより、ユーザが複数のクラス及び属性
の中から確認したい項目のみを一覧表示する事が可能と
なり、さらに表示する属性として、そのクラスのインス
タンスが属性として直接保持しているデータのみなら
ず、表示するクラスのインスタンスの属性として保持し
ている他インスタンスの属性についても、ユーザによっ
て指定する事が可能となる。その結果、効率良くインス
タンスの内容を確認する事が可能となる。In order to achieve the first object, a data display method according to the present invention employs, among a plurality of attributes of a plurality of classes held in a memory or an object-oriented database, Select a class and an attribute to be displayed, and an address on a memory where an instance of the selected class is generated during execution of the program, or an object I issued when stored in a database.
The position information such as D is acquired, the attribute of the instance of the selected class in the memory or the database is acquired based on the acquired position information, and the acquired instances are displayed as a list. As a result, it is possible for the user to list only the items that the user wants to check from among a plurality of classes and attributes, and to display not only the data that the instance of the class directly holds as the attributes, but also the display It is also possible for the user to specify the attributes of other instances held as attributes of the instance of the class to be performed. As a result, it is possible to efficiently confirm the contents of the instance.
【0007】また、上記第二の目的を達成するために、
本発明によるデータ表示方式では、該一覧表示された該
取得インスタンスの属性をユーザが更新することによ
り、該データベース上の該取得インスタンスの属性を更
新する。これにより、オブジェクト指向データベースに
おいて、従来ユーザが作成するアプリケーション内で行
っていたインスタンスの更新を、関連データの整合性を
確認しながら容易に行うことができる。[0007] To achieve the second object,
In the data display method according to the present invention, the attribute of the obtained instance on the database is updated by the user updating the attribute of the obtained instance displayed in the list. This makes it possible to easily update an instance in an object-oriented database, which has been performed in an application created by a user in the past, while checking the consistency of related data.
【0008】[0008]
【発明の実施の形態】以下、本発明の一実施例につい
て、図面を用いて詳細に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below in detail with reference to the drawings.
【0009】まず、本発明の第一の目的である「オブジ
ェクト指向プログラムにおいて、関連するインスタンス
の属性を一覧表示することが可能なデータ表示方式」の
実現方法について、図1から図9を用いて説明する。First, a method of realizing the first object of the present invention "a data display method capable of displaying a list of attributes of related instances in an object-oriented program" will be described with reference to FIGS. explain.
【0010】図2は、本発明に係わる計算機システムで
ある。FIG. 2 shows a computer system according to the present invention.
【0011】201はメモリであり、本発明によるシス
テムを利用し作成したインスタンス、を保存する。20
2は、CPUであり、該システムを制御する。203は
外部記憶装置であり、本発明を用いて作成するソースプ
ログラムや、該アドレス関連ファイル等を格納する。2
04は、入力装置であり、利用者が該システムへの応答
などに用いるキーボードやマウスである。205は、出
力装置であり、該システムの処理に従い情報を利用者に
表示する。Reference numeral 201 denotes a memory for storing an instance created using the system according to the present invention. 20
Reference numeral 2 denotes a CPU, which controls the system. An external storage device 203 stores a source program created by using the present invention, the address-related files, and the like. 2
Reference numeral 04 denotes an input device, which is a keyboard and a mouse used by a user to respond to the system. An output device 205 displays information to a user according to the processing of the system.
【0012】図1は、本実施例のオブジェクト指向プロ
グラミングにおけるデータ表示方式の概略の処理の流れ
を示すフローチャートである。処理101は、インスタ
ンスを表示するクラスをユーザが選択するために利用す
るクラス一覧画面の表示及び、表示クラス、表示属性の
選択を行う処理である。203上のソースコードを読み
込み、該ソースコードに存在するクラスを一覧表示し、
その中から表示するクラス及び属性の選択を行い、処理
102においてアドレスを取得するためのアドレス関連
ファイルを作成する。処理102は、選択クラスのイン
スタンスのアドレスと値の取得さらに、インスタンス間
の関連の取得を行う処理である。プログラム実行中に、
表示するクラスのインスタンスが記憶されているアドレ
ス及び属性の値、インスタンス間の関連をアドレス関連
ファイルに取得する。処理103は、選択属性一覧表示
処理である。処理102で取得したアドレス関連ファイ
ルに基づき属性を一覧表示する。FIG. 1 is a flowchart showing a general processing flow of a data display method in the object-oriented programming of this embodiment. Process 101 is a process of displaying a class list screen used by the user to select a class for displaying an instance, and selecting a display class and a display attribute. The source code on the source code 203 is read, and the classes existing in the source code are listed,
A class and an attribute to be displayed are selected from among them, and an address-related file for acquiring an address is created in a process 102. The process 102 is a process of acquiring the addresses and values of the instances of the selected class and acquiring the association between the instances. During program execution,
The address at which the instance of the class to be displayed is stored, the value of the attribute, and the relationship between the instances are acquired in the address-related file. Process 103 is a selection attribute list display process. A list of attributes is displayed based on the address-related file acquired in the process 102.
【0013】図3は、実施例の説明で用いるオブジェク
トモデルの例であり、4個のクラスから成り立ってい
る。301はItemクラス、302はCodeクラ
ス、303はNameクラス、304はStringク
ラスである。 Itemクラス301は、属性としてC
odeクラスであるcdとNameクラスであるnmと
intであるIDを持ち、Codeクラス302は属性
としてintであるiを持ち、 Nameクラス303
はStringクラスであるstrを持ち、 Stri
ngクラス304はchar*であるrepを持つ。こ
の関係により、310に示すようなクラス同士の関連が
張られる。305、306は既に作成されているインス
タンスの例である。305はクラス「Name」のイン
スタンス「N1」、306はクラス「String」イ
ンスタンス「S1」である。307は後に例として作成
するインスタンスであり、図7を具体的に説明する箇所
で説明をする。FIG. 3 shows an example of an object model used in the description of the embodiment, which is composed of four classes. Reference numeral 301 denotes an Item class, 302 denotes a Code class, 303 denotes a Name class, and 304 denotes a String class. Item class 301 has C as an attribute.
The code class 302 has an ID which is int as an attribute, and the code class 302 has an ID which is int as an attribute.
Has a Str that is a String class.
The ng class 304 has a rep that is char *. This relationship establishes a relationship between the classes as shown by 310. Reference numerals 305 and 306 are examples of already created instances. Reference numeral 305 denotes an instance “N1” of the class “Name”, and reference numeral 306 denotes a class “String” instance “S1”. Reference numeral 307 denotes an instance to be created later as an example.
【0014】図4、図5、図6、図7、図8、図9で
は、図1の各処理を図3で示した実例を元に説明する。4, FIG. 6, FIG. 6, FIG. 7, FIG. 8, and FIG. 9, each processing of FIG. 1 will be described based on the actual example shown in FIG.
【0015】図4は、処理101の詳細である。401
はソース読み込み処理であり、本発明を用いて作成する
ソースプログラムを外部記憶装置203より読み込む。
402はクラス情報取得処理である。読み込んだソース
プログラムを解析し、クラスの一覧とクラス間の関連情
報を取得する。403はクラス、属性一覧表示処理であ
る。該クラス一覧及び属性一覧を出力装置205に表示
する。404は表示クラス、属性選択処理である。出力
装置205に出力された一覧より、インスタンスの属性
を表示するクラス及び属性を、入力装置204を用いて
選択する。405はアドレス関連ファイル作成処理であ
る。表示クラス選択処理404で選択されたクラス及び
属性を元に、アドレス及び属性の値、インスタンス間の
関連を格納するためのアドレス関連ファイルを作成す
る。406はアドレス取得呼出付加処理である。該選択
したクラスのインスタンスを生成するソースステートメ
ント(これをタイプ1とする)及び、選択した属性が属
するクラスが呼び出され、属性の更新を行うソースステ
ートメント(これをタイプ2とする)のうしろに、メモ
リ上のアドレス及び値を取得するソースステートメント
を挿入し、その後にソースプログラムをコンパイルす
る。FIG. 4 shows the details of the process 101. 401
Is a source reading process, in which a source program created by using the present invention is read from the external storage device 203.
Reference numeral 402 denotes a class information acquisition process. Analyzes the loaded source program and obtains a list of classes and related information between classes. Reference numeral 403 denotes a class and attribute list display process. The class list and the attribute list are displayed on the output device 205. Reference numeral 404 denotes a display class and attribute selection process. From the list output to the output device 205, a class and an attribute for displaying the attribute of the instance are selected using the input device 204. Reference numeral 405 denotes an address-related file creation process. Based on the class and attribute selected in the display class selection processing 404, an address-related file for storing the value of the address and the attribute and the relation between the instances is created. Reference numeral 406 denotes an address acquisition call addition process. Behind a source statement that generates an instance of the selected class (this is type 1) and a source statement that calls the class to which the selected attribute belongs and updates the attribute (this is type 2) Then, a source statement for acquiring an address and a value on a memory is inserted, and then the source program is compiled.
【0016】次に図3を具体的な例をとして用い、図
5、図6を用いて、クラス情報表示処理403と表示ク
ラス、属性選択処理404を説明する。Next, the class information display process 403 and the display class / attribute selection process 404 will be described with reference to FIG. 3 as a specific example and FIGS.
【0017】図5は、クラス属性画面の例であり、クラ
ス情報表示処理403によって、出力装置205に表示
され、表示クラス属性選択処理404によって、入力装
置204を介して、表示する項目を選択する。図6は入
力装置204により選択されたクラスのインスタンスの
属性のアドレス及び値と、インスタンス間の関連を格納
するアドレス関連ファイルの例である。FIG. 5 shows an example of a class attribute screen, which is displayed on the output device 205 by a class information display process 403 and an item to be displayed is selected via the input device 204 by a display class attribute selection process 404. . FIG. 6 is an example of an address-related file that stores the addresses and values of the attributes of the instances of the class selected by the input device 204 and the relationships between the instances.
【0018】表示領域501のクラス一覧よりユーザは
表示したいクラスを選択する。ここでは507のクラス
「Item」を選択している。クラスが選択されると、
選択されたクラス「Item」の属性一覧が表示領域5
02として表示された後、アドレス関連ファイル(図
6)に601のクラス「Item」用テーブル601が
作成され、クラス名「Item」が602の領域に格納
される。次にユーザーは表示領域502のクラス「It
em」の属性一覧より表示したい属性を選択する。ここ
では508の属性「Code* cd」を選択してい
る。属性が選択されると、選択された属性が属するクラ
ス「Code」の属性一覧が表示領域503として表示
された後、603の領域に属性名「cd」が格納され、
クラス「Code」用テーブル608が作成され、クラ
ス名「Code」が609の領域に格納される。表示領
域503のクラス「Code」の属性一覧では509の
「int i」を選択している。ここでは「int」は
クラスではなく、符号つき整数を表わしており、実デー
タが格納されている。610の領域に属性名「i」が格
納される。「int」はクラスではないため、クラス
「Code」への遷移元クラスであるクラス「Ite
m」の属性一覧504を表示領域204として表示す
る。表示領域504では、510の属性「Code*
cd」は選択済みなので反転表示されており、511の
クラス「Name* nm」を選択している。次に、ク
ラス「Name」の属性一覧が表示領域505として表
示された後、604の領域に属性名「nm」が格納さ
れ、クラス「Name」用テーブル605が作成され、
クラス名「Name」が606の領域に格納される。表
示領域505では512の属性「String* st
r」が選択されている。次に、クラス「String」
の属性一覧が表示領域506として表示された後、60
7の領域に属性名「str」が格納され、クラス「St
ring」用テーブル611が作成され、クラス名「S
tring」が612の領域に格納される。表示領域5
06では513の属性「char* rep」が選択さ
れている。ここでは「char*」はクラスではなく、
文字列を表わしており、実データが格納されている。6
13の領域に属性名「rep」が格納され、遷移元クラ
スのクラス「Name」へ制御が移る。図6の他の欄に
記入されているデータは処理102で実際に格納される
アドレス及び値の例であり、処理403、404の時点
では格納されていない。The user selects a class to be displayed from the class list in the display area 501. Here, the class “Item” of 507 is selected. When a class is selected,
The attribute list of the selected class “Item” is displayed in the display area 5
After being displayed as 02, a table 601 for class “Item” 601 is created in the address-related file (FIG. 6), and the class name “Item” is stored in the area 602. Next, the user selects the class “It” in the display area 502.
Select the attribute to be displayed from the attribute list of "em". Here, the attribute “Code * cd” of 508 is selected. When an attribute is selected, an attribute list of the class “Code” to which the selected attribute belongs is displayed as a display area 503, and an attribute name “cd” is stored in the area 603.
A table “608” for the class “Code” is created, and the class name “Code” is stored in the area 609. In the attribute list of the class “Code” in the display area 503, “int i” 509 is selected. Here, “int” represents not a class but a signed integer, and stores actual data. The attribute name “i” is stored in the area 610. Since “int” is not a class, the class “Item” which is a transition source class to the class “Code”
The attribute list 504 of “m” is displayed as the display area 204. In the display area 504, the attribute “Code *” of 510 is displayed.
Since “cd” is already selected, it is highlighted and the class “Name * nm” of 511 is selected. Next, after an attribute list of the class “Name” is displayed as the display area 505, the attribute name “nm” is stored in the area 604, and a table 605 for the class “Name” is created.
The class name “Name” is stored in the area 606. In the display area 505, the 512 attribute “String * st
r "is selected. Next, the class "String"
After the attribute list is displayed as the display area 506, 60
7, the attribute name “str” is stored, and the class “St” is stored.
A table 611 for “ring” is created, and the class name “S
"string" is stored in the area 612. Display area 5
In 06, the attribute “char * rep” of 513 is selected. Here, "char *" is not a class,
Represents a character string and stores actual data. 6
The attribute name “rep” is stored in the area 13 and the control is transferred to the class “Name” of the transition source class. The data entered in the other columns in FIG. 6 are examples of addresses and values actually stored in the process 102, and are not stored at the time of the processes 403 and 404.
【0019】図7、図8はアドレス取得呼出付加処理4
06の際付加するステートメントの流れを示すフローチ
ャートである。プログラム中の付加するソースステート
メントがインスタンスの生成である場合(タイプ1)
は、図7のフローチャート、付加するソースステートメ
ントがインスタンスへの操作である場合(タイプ2)
は、図8のフローチャートの処理を行う。FIGS. 7 and 8 show address acquisition call addition processing 4.
It is a flowchart which shows the flow of the statement added at the time of 06. When the source statement to be added in the program is generation of an instance (Type 1)
Means that the source statement to be added is an operation on an instance (type 2)
Performs the processing of the flowchart of FIG.
【0020】これらの処理は処理406でソースプログ
ラムに付加したステートメントがコンパイルプログラム
の実行中に行う処理である。These processes are performed by the statement added to the source program in the process 406 during the execution of the compile program.
【0021】図7はタイプ1に付加するステートメント
の処理である。生成されたインスタンスが表示クラス、
属性選択処理404によって選択されたクラスである場
合(処理701YES)アドレス関連ファイル上の該ク
ラスのテーブルのクラスの欄の下に該インスタンスのア
ドレスが格納される(処理702)。さらに処理404
で選択された属性に関連付け若しくは値が代入された場
合(処理703YES)、代入が他インスタンスへの関
連付けの場合(処理704A)、関連先インスタンスの
アドレスを取得し(処理705)、該クラスのテーブル
の属性の欄の下に該インスタンスのアドレスが格納され
る(処理706)。値への代入の場合(処理704
B)、代入した値を取得し(処理707)、該クラスの
テーブルの属性の欄の下に値が格納される(処理70
8)。FIG. 7 shows the processing of a statement added to type 1. The generated instance is a display class,
If the class is selected by the attribute selection process 404 (YES in process 701), the address of the instance is stored under the class column of the table of the class in the address-related file (process 702). Further processing 404
If the association or the value is assigned to the attribute selected in (Step 703 YES), if the assignment is an association with another instance (Step 704A), the address of the associated destination instance is obtained (Step 705), and the class table The address of the instance is stored below the attribute column (step 706). In the case of assignment to a value (process 704)
B), the substituted value is obtained (process 707), and the value is stored under the attribute column of the table of the class (process 70).
8).
【0022】図8はタイプ2に付加するステートメント
の処理である。属性選択処理404によって選択された
クラスのインスタンスが操作を受ける場合、(処理80
1YES)操作を受けるインスタンスのアドレスを取得
し(処理802)、アドレス関連ファイルの該クラスの
テーブルに格納されているアドレスから、該インスタン
スのアドレスに一致する行を探す(処理803)。さら
に処理404で選択された属性に関連付け若しくは値が
代入された場合(処理804YES)、で代入が他イン
スタンスへの関連付けの場合(処理805A)、関連先
インスタンスのアドレスを取得し(処理806)、処理
803によって探索した行の該属性の欄に該アドレスを
格納する(処理807)。値への代入の場合(処理80
5B)、代入した値を取得し(処理808)、該欄に値
が格納される(処理809)。FIG. 8 shows the processing of a statement added to type 2. When the instance of the class selected by the attribute selection processing 404 is operated, (processing 80
1YES) The address of the instance to be operated is acquired (process 802), and a line matching the address of the instance is searched from the addresses stored in the table of the class in the address related file (process 803). Further, when the association or the value is assigned to the attribute selected in step 404 (step 804 YES), and when the assignment is the association with another instance (step 805A), the address of the related destination instance is acquired (step 806). The address is stored in the column of the attribute in the line searched by the process 803 (process 807). In the case of assignment to a value (process 80
5B), the substituted value is obtained (process 808), and the value is stored in the column (process 809).
【0023】図3、図6の具体例を用い、タイプ1に付
加するステートメント、タイプ2に付加するステートメ
ントを具体的に説明する。The statement added to the type 1 and the statement added to the type 2 will be specifically described with reference to the specific examples shown in FIGS.
【0024】まずタイプ1付加するステートメントの説
明をする。First, the statement to be added to the type 1 will be described.
【0025】307の「S2」という「String」
クラスのインスタンスを新たに生成する場合、選択クラ
スのインスタンスの生成であるので(処理701YE
S)、インスタンスが生成されたメモリ上のアドレスを
領域612の列の下の、空欄614に格納し(処理70
2)、選択された属性に値が代入されたため、(処理7
04B)、値“山田”を取得し、(処理707)領域6
13の列の下の該アドレスが格納された欄の右横の空欄
615に値“山田”を格納する(処理708)。"String" 307 "S2"
When a new instance of the class is generated, the instance of the selected class is generated (step 701YE).
S), the address on the memory where the instance was generated is stored in the blank 614 below the column of the area 612 (processing 70).
2) Since a value is substituted for the selected attribute, (Process 7
04B), the value “Yamada” is obtained, and (processing 707) area 6
The value “Yamada” is stored in the blank column 615 on the right of the column in which the address is stored below the 13th column (process 708).
【0026】次にタイプ2付加するステートメントの説
明をする。Next, the statement to be added to the type 2 will be described.
【0027】305の「N1」という「Name」クラ
スのインスタンスが既に生成されており、該インスタン
スの属性である「str」を、「S1」から「S2」に
変更する、という操作が行われた場合、(処理801Y
ES)、該インスタンスのアドレスを取得し(処理80
2)、テーブル605に格納されている「Name」ク
ラスのインスタンスのアドレスより「N1」のアドレス
に一致する行を探す(処理803)。領域650のある
行がこれに一致する。次に、strが選択された属性で
あり(処理804YES)、その属性は、他インスタン
スへの関連である為(処理805A)、関連先インスタ
ンスの「S2」のアドレスを取得し(処理806)、処
理803で検索した領域650の右横の欄651に「S
2」のアドレスを格納する(処理807)。An instance of the "Name" class 305 "N1" has already been generated, and the operation of changing the attribute "str" of the instance from "S1" to "S2" has been performed. In this case, (Process 801Y
ES), and obtains the address of the instance (step 80).
2) A line matching the address of “N1” is searched from the address of the instance of the “Name” class stored in the table 605 (process 803). A row in the area 650 matches this. Next, str is the selected attribute (step 804 YES), and since the attribute is related to another instance (step 805A), the address of “S2” of the related destination instance is acquired (step 806). In the field 651 on the right side of the area 650 searched in the processing 803, “S
The address of "2" is stored (process 807).
【0028】図9は103の選択属性一覧表示処理の結
果出力される、選択クラス毎のインスタンスの属性を一
覧にして出力したものの例である。FIG. 9 shows an example of a list of the attributes of the instances for each selected class, which are output as a result of the selection attribute list display processing of 103.
【0029】これは、501で最初に選択したクラスの
インスタンスの記憶領域アドレスが格納された602の
列のアドレスを選択属性毎に追跡する事によって表示さ
れる。This is displayed by tracing the address of the column 602 in which the storage area address of the instance of the class selected first in 501 is stored for each selected attribute.
【0030】図9の表示法を図6の具体例で説明する。The display method of FIG. 9 will be described with a specific example of FIG.
【0031】先ず501における選択クラスである「I
tem」テーブル601のインスタンスのアドレスが格
納された602の列の1列である領域661にある「I
1」のアドレスを読み込む。次に、該クラスの中の選択
属性である「cd」のアドレスの格納された列603の
1列目である領域662の「C1」のアドレスを読み込
む。次に「cd」が属するクラス「Code」のテーブ
ル608のインスタンスのアドレスが格納された609
の列から、「C1」のアドレスと一致する欄を検索す
る。これは1列目の領域664が一致する。さらに「C
ode」クラスの中の選択属性である「i」の値が格納
された列610の1列目である領域665の値「10
0」読み込む。この値を、領域901に表示する。First, the selected class "I"
“tem” table 601 stores “I” in area 661, which is one column of column 602 in which the address of the instance is stored.
1 is read. Next, the address of “C1” in the area 662 which is the first column of the column 603 in which the address of “cd” which is the selection attribute in the class is stored is read. Next, 609 in which the address of the instance of the table 608 of the class “Code” to which “cd” belongs is stored.
Is searched for a column that matches the address of “C1”. This matches the area 664 in the first column. Furthermore, "C
The value “10” of the area 665 which is the first column of the column 610 in which the value of the selection attribute “i” in the “mode” class is stored
Read "0". This value is displayed in an area 901.
【0032】以上で示した方法により、オブジェクト指
向プログラミングを行う際、メモリ上のインスタンスの
内容をユーザの指定の基、一覧表示することが可能とな
るため、関連のあるインスタンス間のデータの整合性の
確認、把握が容易となる。According to the method described above, when performing object-oriented programming, the contents of the instances on the memory can be displayed in a list based on the designation of the user, so that data consistency between related instances can be obtained. Confirmation and grasping are easy.
【0033】次に、本発明をオブジェクト指向データベ
ースに対して適用した場合について説明する。Next, a case where the present invention is applied to an object-oriented database will be described.
【0034】この場合には、前記実施例の、「メモリ」
を「データベース」に、「アドレス」を「オブジェクト
ID」に変更する事によって実現する。オブジェクトI
Dとは、データベースにインスタンスが生成される際、
データベース管理システムがデータベース上のインスタ
ンスの位置を特定するため発行するIDである。In this case, the "memory"
Is changed to “database” and “address” is changed to “object ID”. Object I
D means that when an instance is created in the database,
This is an ID issued by the database management system to identify the position of the instance on the database.
【0035】以上で示した方法により、オブジェクト指
向プログラミングを行う際、またオブジェクト指向デー
タベースに記憶されたデータを確認する際、データベー
ス内のインスタンスの内容をユーザの指定の基、一覧表
示することが可能となるため、関連のあるインスタンス
間のデータの整合性の確認、把握が容易となる。According to the method described above, when performing object-oriented programming and when confirming data stored in the object-oriented database, it is possible to list the contents of the instances in the database based on the designation of the user. Therefore, it is easy to confirm and grasp the data consistency between related instances.
【0036】さらに、本発明の第二の目的である「オブ
ジェクト指向データベースにおいてデータの更新を容易
に行えるデータ表示方式」の実現について図10、及び
図9、図6を用いて説明する。Further, the second object of the present invention, that is, the realization of the "data display method capable of easily updating data in an object-oriented database" will be described with reference to FIGS. 10, 9, and 6. FIG.
【0037】図10は、オブジェクト指向データベース
においてデータの更新を容易に行えるデータ表示方式の
概略の処理の流れを示すフローチャートである。処理1
001、処理1002、処理1003は、それぞれ処理
101、処理102、処理103と同じ処理を行う。処
理1004は、一覧表示した属性の値をユーザが書換え
る事によって、データベース内に記憶されている変更さ
れた属性の値の更新を可能にする。FIG. 10 is a flowchart showing a schematic processing flow of a data display method which can easily update data in an object-oriented database. Processing 1
001, processing 1002, and processing 1003 perform the same processing as processing 101, processing 102, and processing 103, respectively. The process 1004 allows the user to update the value of the attribute displayed in the list, thereby updating the value of the changed attribute stored in the database.
【0038】処理1004を、図9、図6を用いて具体
的に説明する。The processing 1004 will be specifically described with reference to FIGS.
【0039】例えば、図9中の領域901の値が「10
0」から「101」に変更されたとする。領域901
は、図6中の領域665に基づいて出力されたものであ
るので、変更された領域901の値を読み込み、領域6
65の値を「101」に更新する。さらに、領域664
に格納された「C1」のオブジェクトIDに対応するデ
ータベース内部の属性の「i」値を「101」に更新す
る。For example, if the value of the area 901 in FIG.
It is assumed that “0” has been changed to “101”. Area 901
Is output based on the area 665 in FIG. 6, the value of the changed area 901 is read, and
The value of 65 is updated to “101”. In addition, area 664
Is updated to “101” in the attribute in the database corresponding to the object ID of “C1” stored in “1”.
【0040】以上で示した方法により、オブジェクト指
向データベース内のデータの更新を容易に行えるデータ
表示方式を実現できる。According to the method described above, a data display method that can easily update data in the object-oriented database can be realized.
【0041】[0041]
【発明の効果】本発明によれば、オブジェクト指向プロ
グラミングを行う際、メモリ上及び、オブジェクト指向
データベース内のインスタンスの内容をユーザの指定の
基、一覧表示することが可能となるため、関連のあるイ
ンスタンス間のデータの整合性の確認、把握が容易とな
る。さらにオブジェクト指向データベースに本発明を用
いた場合、一覧表示された属性を直接書き換えることが
可能となるため、データベース内の情報の更新が容易と
なる。According to the present invention, when performing object-oriented programming, the contents of the instances in the memory and in the object-oriented database can be displayed in a list based on the designation of the user. It is easy to confirm and understand the data consistency between instances. Further, when the present invention is applied to an object-oriented database, it is possible to directly rewrite the attributes displayed in a list, so that information in the database can be easily updated.
【図1】本発明の実施例の概略の処理の流れを示すフロ
ーチャートである。FIG. 1 is a flowchart showing a schematic processing flow of an embodiment of the present invention.
【図2】本発明の実施例の計算機システムである。FIG. 2 is a computer system according to an embodiment of the present invention.
【図3】本発明の実施例として用いるオブジェクトモデ
ルである。FIG. 3 is an object model used as an embodiment of the present invention.
【図4】本発明の実施例のクラス一覧表示及び表示クラ
ス、属性選択処理の詳細の流れを示すフローチャートで
ある。FIG. 4 is a flowchart illustrating a detailed flow of class list display, display class, and attribute selection processing according to the embodiment of this invention.
【図5】本発明の実施例の、クラス属性画面である。FIG. 5 is a class attribute screen according to the embodiment of the present invention.
【図6】本発明の実施例のアドレス関連ファイルであ
る。FIG. 6 is an address-related file according to the embodiment of the present invention.
【図7】本発明の実施例のプログラム(タイプ1)に付
加するステートメントの流れを示すフローチャートであ
る。FIG. 7 is a flowchart showing a flow of a statement added to a program (type 1) according to the embodiment of the present invention.
【図8】本発明の実施例のプログラム(タイプ2)に付
加するステートメントの流れを示すフローチャートであ
る。FIG. 8 is a flowchart illustrating a flow of a statement added to a program (type 2) according to the embodiment of this invention.
【図9】本発明の実施例の選択クラス属性一覧画面であ
る。FIG. 9 is a selection class attribute list screen according to the embodiment of the present invention.
【図10】本発明の実施例の概略の処理の流れを示すフ
ローチャートである。FIG. 10 is a flowchart showing a schematic process flow of the embodiment of the present invention.
201 メモリ 202 CPU 204 入力装置
205 出力装置201 memory 202 CPU 204 input device
205 output device
Claims (6)
述されたプログラムにおいて、表示するクラス、あるい
は表示するクラス及び属性を選択し、プログラムの実行
中に、該選択クラス、あるいは該選択クラス及び該選択
属性のインスタンスの属性を取得し、該取得インスタン
スの属性を一覧表示することを特徴とするデータ表示方
式。In a program described in an object-oriented programming language, a class to be displayed or a class and an attribute to be displayed are selected, and the selected class or an instance of the selected class and the selected attribute are selected during execution of the program. A data display method for acquiring attributes of the acquired instance and displaying a list of attributes of the acquired instance.
ラムにおけるデータ表示方式において、前記プログラム
実行中に、前記選択クラス、あるいは前記選択クラス及
び前記選択属性のインスタンスが生成されるメモリ上の
アドレスを取得し、該所得アドレスに基づき、前記イン
スタンスの属性を取得する事を特徴とするデータ表示方
式。2. A data display method in an object-oriented program according to claim 1, wherein an address on a memory at which an instance of said selected class or said selected class and said selected attribute is generated during execution of said program is obtained. And acquiring an attribute of the instance based on the income address.
ラムにおけるデータ表示方式において、前記取得アドレ
スを格納するアドレスファイルを備えることを特徴とす
るデータ表示方式。3. The data display method according to claim 2, further comprising an address file for storing the obtained address.
を保持するクラスデータと、該クラスデータごとに値が
設定されるインスタンスデータを備えたオブジェクト指
向データベースにおいて、表示するクラス、あるいは表
示するクラス及び属性を選択し、プログラムの実行中
に、該選択クラスのインスタンスが生成される際データ
ベース管理システムが発行するオブジェクトIDを取得
し、該取得オブジェクトIDに基づき、データベースよ
り該選択クラス、あるいは該選択クラス及び該選択属性
のインスタンスの属性を取得し、該取得インスタンスを
一覧表示することを特徴とするデータ表示方式。4. A class to be displayed or classes and attributes to be displayed in an object-oriented database having class data holding information of data items to be registered in the database and instance data in which values are set for each of the class data. Is selected, and during execution of the program, an object ID issued by the database management system when an instance of the selected class is generated is acquired. Based on the acquired object ID, the selected class, or the selected class and A data display method for acquiring an instance attribute of the selected attribute and displaying the acquired instance in a list.
ベースにおけるデータ表示方式において、前記一覧表示
された前記取得インスタンスの属性の更新により、前記
データベース上の該取得インスタンスの属性を更新する
ことを特徴とするデータ表示方式。5. The data display method in an object-oriented database according to claim 4, wherein an attribute of the acquired instance on the database is updated by updating an attribute of the acquired instance displayed in the list. Data display method to be used.
ト指向プログラムにおけるデータ表示方式において、前
記取得インスタンスの属性をテーブル形式により一覧表
示する事を特徴とするデータ表示方式。6. A data display method in an object-oriented program according to claim 1, wherein a list of attributes of the acquired instances is displayed in a table format.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9159501A JPH117399A (en) | 1997-06-17 | 1997-06-17 | Data display method in object-oriented programs |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9159501A JPH117399A (en) | 1997-06-17 | 1997-06-17 | Data display method in object-oriented programs |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH117399A true JPH117399A (en) | 1999-01-12 |
Family
ID=15695156
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9159501A Pending JPH117399A (en) | 1997-06-17 | 1997-06-17 | Data display method in object-oriented programs |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH117399A (en) |
-
1997
- 1997-06-17 JP JP9159501A patent/JPH117399A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5325533A (en) | Engineering system for modeling computer programs | |
| US5519866A (en) | Method and apparatus of incrementally linking components of a modeled computer program | |
| US6651240B1 (en) | Object-oriented software development support apparatus and development support method | |
| US5438661A (en) | Version management method and apparatus in multi-window environment | |
| AU4098700A (en) | Circuit arrangement for measuring the resistances of a pressure-sensitive resistance mat | |
| US5394546A (en) | Database management system and method of extending system functions | |
| EP3113016A1 (en) | Tracing dependencies between development artifacts in a development project | |
| US5781905A (en) | Program generating method combining data item part with database manipulation part | |
| JP2000235444A (en) | Method and apparatus for managing and displaying large build software system | |
| AU760395B2 (en) | Program reproducing method and device, and medium on which program for program reproduction recording | |
| JPH0934698A (en) | Software generation method and development support method | |
| JP6817523B2 (en) | Information processing device, control method of information processing device, and program | |
| JP3516843B2 (en) | Database access method | |
| JPH06110733A (en) | Program test case generator | |
| JP6531855B2 (en) | INFORMATION PROCESSING APPARATUS, CONTROL METHOD FOR INFORMATION PROCESSING APPARATUS, AND PROGRAM | |
| JPH0683594A (en) | Graphical user interface with integrated Wizwig expression editor and compiler | |
| JP2021182252A (en) | Design information management device and design information management method | |
| CN116107628B (en) | Document sorting method based on node. Js | |
| JP2015069247A (en) | Information processing apparatus, information processing apparatus control method, and program | |
| JP3424558B2 (en) | Object management method | |
| JP2000207226A (en) | Code optimizing device, language processing device and code optimizing method | |
| JPH11272524A (en) | Data conversion device and storage medium | |
| JPS6310239A (en) | High-level language patch generation method | |
| JPH04190423A (en) | Information control assisting device using function-classified pointer | |
| JPH05189212A (en) | Linking method |