OCAF Browser

 

General principles

 

 Any Open CASCADE document consists of an Application Data Framework including a structured set of labels and attributes. Labels are interdependent (child label depends on its father) and form a directed tree-type graph . Each label has a name - this is a unique list of numbers, separated by a colon ( : ), where the last number is a tag of this label and the rest is a name of the father label. Thus, a root label with the name "0" will have, for example, children with names "0:1" and "0:3".
 A label contains a set of attributes that are universal data containers. Each attribute has a type, such as: Integer, Real, Name, Reference, etc. A label can contain any number of attributes with different types.
 OCAF Browser represents the Application Data Framework tree with its labels, attributes and stored data. For example, see Picture 1, showing a part of the application structure.

 

image\img00008.gif

 

 

Picture 1.

The picture corresponds to the OCAF Browser window. The document tree structure is shown on the white background: opened folders correspond to labels, icons with an "A" symbol correspond to attributes (or "NS" - named shape attributes). Each entity has a description: its label always has a name and attributes with type name. The list of entities under each label is sorted in the following order: first, attributes of this label, then child labels, which are sorted according to their tags.

Browser functionality

 

 Each folder (corresponding to a label) can be opened or closed by clicking on the triangle switch near the folder icon. If the folder is closed, all attributes and children of this label will be hidden ( see, for example, label 0:1:1 in Picture 1). In this way, user can close unused folders and free the browser window from clutter. If there is not enough room in the window to view the tree completely, the user can scroll tree information with the right and bottom scroll bars.
 
The OCAF Browser window contains the following buttons and graphical elements:

 

image\img00009.gif

 

Picture 2. "Description" mode is on, "Detailed" mode is off, filter string is "Tr".

 

image\img00010.gif

 

Picture 3. "Attribute list" and "NS tree" modes are on.

 The OCAF Browser has another special functions:

 

Description of standard attributes

 

 Common attributes can be described in greater detail in the tree text string:

 

Installation and setting

 

 OCAF Browser is written in C++ language and uses one of three graphic tool kits:

The Tcl OCAF Browser is available within Draw Test Harness (TCAF and XDEDRAW executables).

 

To activate it, use the following sequence:

Launch TCAF or XDEDRAW executables

Draw> source $env(CSF_XCAFDefaults)/dftree.tcl

Draw> NewDoc document

Draw> DFBrowse <document>

 

Tcl OCAF Browser may be chosen for Windows, Linux and Solaris OS.

FLTK and QT OCAF Browser is avaliable for Windows only.

 

This program uses a multi-thread mechanism, which must be supported by the user's OS.

User may use DebugBrowser.hxx include file to compile application: to start OCAF Browser call DebugBrowser::DFBrowser(Handle(TDocStd_Document)theDocument) method with the browsed OCAF document handle as an argument.

Only one browser can be started for one application. If OCAF Browser window is closed, the user could call this method again.

To use the OCAF Browser in applications, you must load DFBrowser library. Also it is

neccessary to load fltk library for FLTK or QT library for QT to use OCAF Browser in an application.

 

 

Remarks: