ページの先頭行へ戻る
Interstage Application Server アプリケーション作成ガイド(CORBAサービス編)
FUJITSU Software

G.1.7 属性の設定・参照

属性の値を設定・参照するには、GetObject関数で作成したインスタンスのプロパティに対して値の設定・参照を行います。ただし、readonlyの属性に対しては、値の参照しか行えません。


IDL言語
interface example1 {
    attribute long              att1; 
    readonly attribute string   att2; 
} ; 

Visual Basic
Dim factory As Object 
Dim obj As Object 
Dim att1 As long
Dim att2 As string

Set factory = CreateObject( "CORBA.Factory" ) 
Set obj = factory.GetObject( "example1" ) 
obj.att1 = 100&
att1 = obj.att1 
att2 = obj.att2