Delphi
Delphi generator produces class defintions based on Object Pascal. Generated code include class names, inheritance and its type, attribute and method definitions together with data types, access levels etc.
The report specification links below are direct links to the .rep files, which are ASCII files that MetaEdit+ can read with its 'Read from File' function in the Report Browser. Download the report specifications by selecting first the report type and then the appropriate method (report specifications are typically dependent on the method used, and thus for example Delphi generator from OMT is not workable with Fusion). To download use 'Save' function in your browser.
All report files are supplied 'as is', with no guarantees, and no liability for any damages is accepted by MetaCase Consulting.
Coad/Yourdon OOAD; Object Diagram
Example
{ From MetaEdit+, graph: Ball game - Design}{ Type declarations, pas files }
unit CompositeObjUnit;
interface
uses GameObject;
type
CompositeObj = class (GameObject)
private
protected
public
parts : collection;
procedure initialize();
{ Initializes the whole system. }
procedure removePart(part);
{ Removes given part from the part collection. }
end;
implementation
procedure initialize();
{ Initializes the whole system. }
begin
end;
procedure removePart(part);
{ Removes given part from the part collection. }
begin
end;
end. { End of unitCompositeObj }
unit GameObjectUnit;
interface
type
GameObject = class (TObject)
private
protected
public
end;
implementation
end. { End of unitGameObject }
unit MovingObjUnit;
interface
uses GameObject;
type
MovingObj = class (GameObject)
private
protected
public
position : { please specify data type }; { Position knows the place of the moving objects in the field (ie. ball and paddle). }
direction : { please specify data type }; { Knows the direction where the object is currently moving. }
procedure move(position, direction);
{ Move method changes the location of the MovingObj according to the given position and direction. It also updates the screen according to the movement operation. }
procedure initialize();
{ Initializes the whole system. }
end;
implementation
procedure move(position, direction);
{ Move method changes the location of the MovingObj according to the given position and direction. It also updates the screen according to the movement operation. }
begin
end;
procedure initialize();
{ Initializes the whole system. }
begin
end;
end. { End of unitMovingObj }
unit BallUnit;
interface
uses MovingObj;
type
Ball = class (MovingObj)
private
protected
public
procedure removeBall();
end;
implementation
procedure removeBall();
begin
end;
end. { End of unitBall }
unit BallGameUnit;
interface
uses Ball, Wall, Paddle, Sides;
type
BallGame = class (TObject)
private
protected
public
Ball : TBall; { aggregation based data }
Wall : TWall; { aggregation based data }
Paddle : TPaddle; { aggregation based data }
Sides : TSides; { aggregation based data }
end;
implementation
end. { End of unitBallGame }
unit BrickUnit;
interface
type
Brick = class (TObject)
{ A single element in the wall. It disappears when the ball hits it. }
private
protected
public
direction : { please specify data type }; { Knows the direction where the object is currently moving. }
procedure removeBrick();
{ This method removes the brick from the wall. }
end;
implementation
procedure removeBrick();
{ This method removes the brick from the wall. }
begin
end;
end. { End of unitBrick }
unit PaddleUnit;
interface
uses MovingObj;
type
Paddle = class (MovingObj)
private
protected
public
end;
implementation
end. { End of unitPaddle }
unit SidesUnit;
interface
uses CompositeObj;
type
Sides = class (CompositeObj)
private
protected
public
end;
implementation
end. { End of unitSides }
unit WallUnit;
interface
uses CompositeObj, Brick;
type
Wall = class (CompositeObj)
private
protected
public
Brick : TBrick; { aggregation based data }
end;
implementation
end. { End of unitWall }
