`
yangzb
  • 浏览: 3502507 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Enterprise Architect's Engineering Code Template Framework Code Templates

 
阅读更多

The Code Template Framework consists of a number of base templates. Each base template transforms particular aspects of the UML to corresponding parts of object-oriented languages.

The following table lists and briefly describes the base templates used in the CTF.

Template

Description

Attribute

A top-level template to generate member variables from UML attributes.

Attribute Declaration

Used by the Attribute template to generate a member variable declaration.

Attribute Notes

Used by the Attribute template to generate member variable notes.

Class

A top-level template for generating Classes from UML Classes.

Class Base

Used by the Class template to generate a base Class name in the inheritance list of a derived Class, where the base Class doesn't exist in the model.

Class Body

Used by the Class template to generate the body of a Class.

Class Declaration

Used by the Class template to generate the declaration of a Class.

Class Interface

Used by the Class template to generate an interface name in the inheritance list of a derived Class, where the interface doesn't exist in the model.

Class Notes

Used by the Class template to generate the Class notes.

File

A top-level template for generating the source file. For languages such as C++, this corresponds to the header file.

Import Section

Used in the File template to generate external dependencies.

Linked Attribute

A top-level template for generating attributes derived from UML Associations.

Linked Attribute Notes

Used by the Linked Attribute template to generate the attribute notes.

Linked Attribute Declaration

Used by the Linked Attribute template to generate the attribute declaration.

Linked Class Base

Used by the Class template to generate a base Class name in the inheritance list of a derived Class, for a Class element in the model that is a parent of the current Class.

Linked Class Interface

Used by the Class template to generate an Interface name in the inheritance list of a derived Class, for an Interface element in the model that is a parent of the current Class.

Namespace

A top-level template for generating namespaces from UML packages. (Although not all languages have namespaces, this template can be used to generate an equivalent construct, such as packages in Java.)

Namespace Body

Used by the Namespace template to generate the body of a namespace.

Namespace Declaration

Used by the Namespace template to generate the namespace declaration.

Operation

A top-level template for generating operations from a UML Class's operations.

Operation Body

Used by the Operation template to generate the body of a UML operation.

Operation Declaration

Used by the Operation template to generate the operation declaration.

Operation Notes

Used by the Operation template to generate documentation for an operation.

Parameter

Used by the Operation Declaration template to generate parameters.

The second table lists templates used for generating code for languages that have separate interface and implementation sections.

Template

Description

Class Impl

A top-level template for generating the implementation of a Class.

Class Body Impl

Used by the Class Impl template to generate the implementation of Class members.

File Impl

A top-level template for generating the implementation file.

File Notes Impl

Used by the File Impl template to generate notes in the source file.

Import Section Impl

Used by the File Impl template to generate external dependencies.

Operation Impl

A top-level template for generating operations from a UML Class's operations.

Operation Body Impl

Used by the Operation template to generate the body of a UML operation.

Operation Declaration Impl

Used by the Operation template to generate the operation declaration.

Operation Notes Impl

Used by the Operation template to generate documentation for an operation.

The base templates form a hierarchy, which varies slightly across different programming languages. A typical template hierarchy relevant to a language like C# or Java (which do not have header files) is shown in the example diagram below. In this diagram the templates are modeled as Classes (in reality they are just plain text). This hierarchy would be slightly more complicated for languages like C++ and Delphi, which have separate implementation templates.

Each of the base templates must be specialized to be of use in code engineering. In particular, each template is specialized for the supported languages (or 'products'). For example, there is a ClassBody template defined for C++, another for C#, another for Java, and so on. By specializing the templates, you can tailor the code generated for the corresponding UML entity.

Once the base templates are specialized for a given language, they can be further specialized based on:

  • A Class's stereotype
  • A feature's stereotype (where the feature can be an operation or attribute)

This type of specialization enables, for example, a C# operation that is stereotyped as «property» to have a different Operation Body template from an ordinary operation. The Operation Body template can then be specialized further, based on the Class stereotype.

templateHierarchy

Note:

The above Class Model shows the hierarchy of Code Generation templates for a language such as C# or Java. The Aggregation connectors denote references between templates.

分享到:
评论

相关推荐

    Enterprise Architect 破解版

    Enterprise Architect 破解版 Enterprise Architect 破解版 Enterprise Architect 破解版 Enterprise Architect 破解版

    Enterprise Architect 8.0.858 汉化补丁包

    Enterprise Architect是一款强大的统一建模语言(UML)工具,由Sparx Systems公司开发,用于软件工程、系统工程、业务过程建模等多个领域。这款工具提供了全面的模型构建、管理和协作功能,支持从需求捕获到系统设计...

    Enterprise Architect 10 中文帮助文档

    Enterprise Architect 10 中文帮助文档

    Enterprise Architect 破解补丁

    Enterprise Architect 破解补丁 亲测可破解 EA10

    Enterprise Architect 8.0汉化版附注册码

    Enterprise Architect是一款强大的统一建模语言(UML)工具,由Sparx Systems公司开发,用于软件工程、系统工程、业务过程建模等多个领域。在这个"Enterprise Architect 8.0汉化版附注册码"的资源中,用户可以获取到...

    在EnterpriseArchitect中的需求建模实例

    虽然才EnterpriseArchitect还没多长时间,但它杰出的管理能力,强大的功能,小巧的体积,柔和的界面设计,都让我非常惊叹!与之前的rose相比,EnterpriseArchitect是我现在画用例图与做需求的首选工具。对Enterprise...

    enterprise architect 12(含注册码和中文包)

    企业架构师(Enterprise Architect,简称EA)是一款由Sparx Systems公司开发的强大的统一建模语言(UML)工具,广泛应用于软件开发、系统分析和企业架构规划等领域。本文将深入探讨"Enterprise Architect 12"的主要...

    EnterpriseArchitect汉化版(绝对可用)

    《企业架构师Enterprise Architect的汉化实践》 在IT领域,建模工具是软件开发过程中不可或缺的一部分,尤其在系统分析和设计阶段。Enterprise Architect(EA)是一款强大的UML建模工具,深受全球开发者喜爱。然而...

    Enterprise Architect 7.5 汉化工具

    Enterprise Architect V7.5 汉化工具 安装玩Enterprise Architect 7.5后直接安装该工具,即可实现汉化! 该文件是exe文件

    EnterpriseArchitect中文经典教程.pdf

    根据提供的文件信息,下面对“Enterprise Architect中文经典教程.pdf”文件中所提及的技术知识点进行详细解读。 首先,从标题“Enterprise Architect中文经典教程.pdf”我们可以推断出,本文档很可能是一本关于...

    EnterpriseArchitect 7.5汉化+序列号

    Enterprise Architect是一款强大的软件建模工具,由Sparx Systems公司开发,主要用于企业级的系统分析、设计和开发。"Enterprise Architect 7.5汉化+序列号"的资源显然是为那些希望在中文环境下使用该软件的用户提供...

    enterprise architect 15中文版 v15.0.1509.rar

    Enterprise Architect是一个对于软件系统开发有着极好支持的CASE软件(Computer Aided Software Engineering)。EA不同于普通的UML画图工具(如VISIO),它将支撑系统开发的全过程。在需求分析阶段,系统分析与设计...

    Enterprise Architect13.5破解版

    该工具为Enterprise Architect13.5破解版,用于企业及的项目需求分析,架构设计,UML类图的设计工具,非常好用欢迎大家下载使用,有问题私聊我!

    Enterprise Architect 中文用户手册

    Sparx Systems 的Enterprise Architect 是一个完整生命周期的UML 工具: · 设计和建造一个广泛的软件系统 · 业务分析,业务流程建模,管理要求 · 系统建模,系统架构建模,组件设计,仿真 · 广义域特定...

    Enterprise Architect 建模实例视频

    Enterprise Architect是一款强大的建模工具,尤其在企业级应用架构领域有着广泛的应用。在这个"Enterprise Architect 建模实例视频"中,我们将会深入探讨如何利用该工具进行ATM(自动取款机)系统的建模,以及如何在...

    Enterprise Architect 汉化版

    ea 汉化版,Enterprise Architect是构建和共享基于业务模型的理想平台,可完全集成到整个企业或系统级架构中。 开发支持从复杂的战略模型到简单的思维导图,过程建模,需求管理,BPMN模型等。

    EnterpriseArchitect 2016

    Enterprise Architect 2016,作为Sparx Systems公司的旗舰产品,是一款强大的UML设计工具,专为软件开发者、系统架构师以及业务分析师提供全面的建模解决方案。该工具以其高效、灵活和全面的特性在业界享有盛誉。...

    ea Enterprise Architect 8.0汉化破解

    ea Enterprise Architect 8.0汉化破解

    Enterprise Architect 13.5

    Enterprise Architect是由Sparx Systems开发的一款强大的统一建模语言(UML)建模工具,它在版本13.5中提供了 Ultimate Edition,旨在为专业软件开发者、系统架构师以及业务分析师提供全面的模型构建和协作环境。...

Global site tag (gtag.js) - Google Analytics