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机制:
-
Application
-
Application是一个抽象类,负责在工作期间处理documents
-
创建新的documents
-
存储documents
-
打开documents
-
初始化document的views
-
-
Document
-
"Application data"的容器
-
The document is the container for the application data.
-
The document is implemented by the concreate class : Document.
-
Documents offer access to the data framework and serve the following purposes
-
Manage the notification of changes 管理变更
-
Update external links 管理关联关系
-
Manage the saving and restoring of data 管理序列化和反序列化
-
Store the names of software extensions. 存储软件扩展
-
Manage command transactions. 管理命令事务
-
Manage Undo and Redo options.管理Undo和Redo
-
-
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)
-
除了作为应用程序数据容器的角色外,文档还可以相互引用;例如,文档 A 可以引用文档 B 中的特定标签。通过引用键可以实现此功能。
-
-
Attribute
-
“Application data” is described by Attributes, which are instances of classes derived from the Attribute abstract class.
-
The OCAF Data Framework references aggregations of attributes using persistent identifiers in a single hierarchy.
-
Attribute是一个抽象类
-
OCAF数据框架是一个引用属性的聚合aggregations
-
OCAF
-
-