1 Automation 和 CAA 的在用户交互上的对比

1.1 Automation

1.2 CAA

2 CAA开发环境

2.1 CAA V5 Framwork

CAA Framwork
CAA Framwork

2.2 CAA 工程文件结构

CAA project tree
CAA project tree

2.3 Framwork Identity Card

  1. IdentityCard 定义pre-requisite frameworks ,从而编译和使用这个framwork
  2. 每个framwork都有一个identity card,若没有pre-requisite的framework,则要定义一个空的identitycard
  3. IdentityCard 用于帮助编译工具寻找pre-requisite frameworks的特定目录中的头文件,限制其搜索范围
    identitycard
    identitycard

    上图中仅搜索system和ObjectModelerBase frameworks中PublicInterfaces和ProtectedInterfaces 目录中的头文件

2.4 CAA V5 编译工具的level 选择 TCK

在命令行中输入命令,

2.5 定义prerequisite workspaces: mkGetPreq

2.6 编译工具: mkmk


  BUILT_OBJECT_TYPE=SHARED LIBRARY ;;定义模块类型

  OS = COMMON ;;指定所有os的通用选项
  WIZARD_LINK_MODULES = \ ;;指定wizard关键字
  JS0GROUP JS0FM CATApplicationFrame
  LINK_WITH = $(WIZARD_LINK_MODULES) \ ;;指定共享lib模块,用于解决symbol
  CATDialogEngine

  OS = AIX ;;特定的os
  SYS_INCPATH =
  SYS_LIBS = -lXm -lXt -lXmu -lX11 -lm ;;编译参数
  SYS_LIBPATH = -L/usr/lpp/X11/lib/R5/Motif1.2 -L/usr/lpp/X11/Motif1.2/lib
  

2.7 和外部库一起编译

  # 连接的外部库
  LOCAL_LDFLAGS = /LIBPATH:”E:\DirectoryWhereTheLibrariesAreStored”
  # 库名
  SYS_LIBS = LibraryName.lib
  # 包含的头文件
  LOCAL_CCFLAGS = /I”E:\DirectoryWhereTheIncludeFilesAreStored”
  

2.8 调用外部库

更改环境变量(Start + Programs + CATIA + Tools + CATIA Environment Editor) E:\CATIAV5_Rx\intel_a\code\bin\CATIAENV.exe

2.9 mkmk详解

2.10 预处理语句:ExportedByModuleName

WINDOWS #ifdef _WINDOWS_SOURCE
__ __MyModule
ExportedByMyModule __declspec(dllexport)
/> #define ExportedByMyModule __declspec(dllimport)
/> #else
ExportedByMyModule
/> #define ExportedByMyModule __declspec(dllexport)
/> #define ExportedByMyModule __declspec(dllimport)
/> #else
ExportedByMyModule
/>

2.11 运行时语句

2.12 快捷键

2.13 编程规则

3 CAA V5 ObjectModeler

3.1 Interface

3.1.1 所有的 interfaces 从 IUnknown / CATBaseUnknown 继承

3.1.2 取得interface的方式

      [...]
      // Query if CATIVisu interface is supported in addition to CATITransform
      HRESULT rc = transformInterface->QueryInterface(IID_CATIVisu,(void**)& visuInterface);
      // Use returned interface to manipulate point
      if SUCCEEDED (rc)
      {
        visuInterface->Draw(...);
        cout << "Point displayed" << endl;
      }

      

        [...]
        // Query if point implementation can provide a CATITransform interface
        CATITransform * transformInterface = NULL;
        HRESULT rc = pointImpl->QueryInterface(IID_CATITransform,(void**)& transformInterface);
        // Use returned interface to manipulate point
        if SUCCEEDED (rc)
        {
          transformInterface ->Translate(...);
          cout << "Point translated" << endl;
        }
        [...]

      

3.1.3 编写interface 方法

3.1.4 GUID 保存在一个特定的module中

3.2 Implementation

3.2.1 实现结构

Valid XHTML 1.0 :: Valid CSS :: Made with Emacs-Muse