Технологии разработки программного обеспечения


Генерация программного кода - часть 2


После генерации кода программный текст добавляется между операторами ##begin и ##end.

Полный листинг сгенерированного кода спецификации выглядит так:

--##begin module.cp preserve=no

--##end module.cp

-- Specification CourseOffering (Package Specification)

-- Dir : C:\Program Files\Rational\Rose\ada95\source

-- File: courseoffering.ads

--##begin module.withs preserve=yes

--##end module.withs

package CourseOffering is

--##begin module.declarations preserve=no

--##end module.declarations

-- Class CourseOffering

-- Documentation:

-- CourseOffering is

-- Concurrency: Sequential

-- Persistence: Transient

-- Cardinality: n

type Object is tagged private;

type Handle is access Object'Class;

-- Array declarations

type Array_0f_0bject is

array (Positive range <>) of Object;

type Access_Array_Of_Object is

access Array_0f_0bject;

-- Standard Operations

function Create return Object;

function Copy (From : in Object) return Object;

procedure Free (This : in out Object);

function Create return Handle;

function Copy (From : in Handle) return Handle;

procedure Free (This : in out Handle);

-- Accessor Operations for Associations

function Get_The_Course (This : in Object)

return Course.Handle;

pragma Inline (Get_The_Course);

-- Association Operations

procedure Associate (This_Handle : in Handle;

This_Handle : in Handle);

procedure Associate (This_Handle : in Handle;

This_Array_Of_Handle : in Array_Of_Handle);

procedure Dissociate (This : in Handle);

procedure Dissociate (This : in Handle);

procedure Dissociate (This : in Array_Of_Handle);

-- Other Operations

function offeringOpen (This : in Object) return Integer;

--##begin module.additionalDeclarations preserve=yes

--##end module.additiona1Declarations

private

--##begin module.privateDeclarations preserve=yes

--##end module.privateDeclarations

type Object is tagged

record

-- Data Members for Class Attributes

numberStudents : Integer;

-- Data Members for Associations

The_Course : Course.Handle;




- Начало -  - Назад -  - Вперед -