サンプルプログラム"draw"のスキーマファイルです。
schema shape;
typedef Shape is struct {
attr : union ShapeType {
case POLYLINE_SHAPE:
polyline :Polyline;
case BOX_SHAPE:
box :Box;
case CIRCLE_SHAPE:
circle :Circle;
};
prev :pointer to Shape;
next :pointer to Shape;
};
typedef ShapeType is enum {
POLYLINE_SHAPE,
BOX_SHAPE,
CIRCLE_SHAPE
};
typedef Polyline is struct {
point :varray of Point;
};
typedef Box is struct {
point :array[2] of Point;
};
typedef Circle is struct {
center :Point;
radius :double;
};
typedef Point is struct {
x :double;
y :double;
};
ひとつ上のページに戻る |
prev(スキーマファイルの文法) |
next(AP向けヘッダファイルの例) |