OCAF——框架机制

OCAF(Open CASCADE Technology Application Framework)提供了一个面向对象的模型,由C++类库构成,包括Application、Document、Attribute和Reference-key模型。本文重点讨论Reference-key模型,它为数据提供了持久化标识,使得在几何模型参数化后仍能维持应用数据的关联。OCAF通过属性和引用键来管理数据,即使几何形状变化,仍能保持数据的正确引用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Email:dev_as@163.com

OCAF Architecture Overview

OCAF provides you with an object-oriented Application-Document-Attribute model consisting of C++ class libraries.

 这里涉及重要的4个概念:Application、Document、Attribute和Reference-key model

本文将重点描述Reference-key model机制:

  1. Application

    1. Application是一个抽象类,负责在工作期间处理documents

    2. 创建新的documents

    3. 存储documents

    4. 打开documents

    5. 初始化document的views

  2. Document

    1. "Application data"的容器

    2. The document is the container for the application data.

    3. The document is implemented by the concreate class : Document.

    4. Documents offer access to the data framework and serve the following purposes

      1. Manage the notification of changes 管理变更

      2. Update external links 管理关联关系

      3. Manage the saving and restoring of data 管理序列化和反序列化

      4. Store the names of software extensions. 存储软件扩展

      5. Manage command transactions. 管理命令事务

      6. Manage Undo and Redo options.管理Undo和Redo

    5. Each document is saved in a single flat ASCII file defined by its format and extension (a ready-to-use format is provided with OCAF)

    6. 除了作为应用程序数据容器的角色外,文档还可以相互引用;例如,文档 A 可以引用文档 B 中的特定标签。通过引用键可以实现此功能。

  3. Attribute

    1. “Application data” is described by Attributes, which are instances of classes derived from the Attribute abstract class.

    2. The OCAF Data Framework references aggregations of attributes using persistent identifiers in a single hierarchy.

      1. Attribute是一个抽象类

      2. OCAF数据框架是一个引用属性的聚合aggregations

      3. OCAF

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时间简史u

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值