Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Приложение Б. Модели кодогенерации при настройке по типу Default

 

Type SampleClass1 = class (BaseClass, SampleInterface) {...} end;  
type SampleClass2 = class private AnAttribute : Integer; ARole : SupplierClass1; Public procedure AnOperation (arg : Integer); property AProperty : Integer index 2 read AnAttribute write AnOperation; end; Property specifiers are stored in the code generation properties of the associated rose operation.  
type SampleClass3 = class private ArrayRole1 : array of SupplierClass2; ArrayRole2 : array [1..10] of SupplierClass5; ArrayRole3 : array [SampleRange] of SupplierClass3; ArrayRole4 : TItems; end; ArrayRole3 range 'SampleRange' is stored in the Array_Range code gen property. To specify your own collection type, instead of using arrays, add a ':' and the collection type to the role name.
type SampleRecord = record attr1 : Integer; attr2 : Real; end;
type SampleEnum = ( value1, value2, value3 );
type ProcedureTypeSample = function( arg : Integer ) : Integer; A procedure type maps to a Rose class, with a ProcType stereotype, and a single operation 'signature' which represents the procedure type signature
type SampleRange = 1..10; A subrange is represented as a Rose class with 'Range' stereotype, and 2 attributes named Low and High. The initial value of these attributes are the low and high values of the range
type TOldType = class end;   type SampleTypeId1 = TOldType; type SampleTypeId2 = Integer; A type id is represented as a Rose class with a 'TypeId' stereotype. If the type being renamed is a standard delphi type (such as Integer) an attribute is used to model this type. Otherwise, an inheritance relationship is used.
type SampleClassRef = class of TObject;   type SamplePointer = ^TOtherType;   type SampleFile = file of Integer;   type SampleArray = array of array of Integer; Delphi pointer types, class references, array types, set types, and file types are represented as Rose classes with stereotypes. If the delphi type references another user-defined type, this is shown with a dependency. If the delphi type references a basic delphi type (Integer) or is complex (i.e. nested arrays) the reference is modeled with an attribute.
Unit SampleUnit;   interface   type SampleClass1 = class {…} end;   implementation end; A unit maps to a component and a category. Its member classes are the component’s assigned classes.
       

 


Date: 2016-03-03; view: 1338


<== previous page | next page ==>
Edit] General Relationship | English tests Swiss identity
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.005 sec.)