Salome HOME
Initial version
[modules/gui.git] / doc / salome / tui / KERNEL / sources / static / overview_Study.html
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
2 <html>\r
3 <head>\r
4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
5    <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
6    <title>Main Page</title>\r
7 <link href="doxygen.css" rel="stylesheet" type="text/css">\r
8 </head>\r
9 <body>\r
10 &nbsp;\r
11 <center><table WIDTH="96%" >\r
12 <tr>\r
13 <td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
14 \r
15 \r
16 <td>\r
17 <div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
18 </td>\r
19 </tr>\r
20 </table></center>\r
21 \r
22 \r
23 <h1><a name="page2">General overview</a>\r
24 </h1>\r
25 <br>\r
26 <h2><a name="cont"></a>Table of contents</h2>\r
27 <ul>\r
28   <li><i><b><a href="#1">1. Introduction</a></b></i></li>\r
29   <li><i><b><a href="#2">2. Representation of the study</a></b></i></li>\r
30   <ul>\r
31     <li><i><b><a href="#2_1">2.1 Study in transient format</a></b></i></li>\r
32     <li><i><b><a href="#2_2">2.2 Study in persistent format</a></b></i></li>\r
33     <li><i><b><a href="#2_3">2.3 Link between transient and persistent formats</a></b></i></li>\r
34   </ul>\r
35   <li><i><b><a href="#3">3. Services and features of the study</a></b></i></li>\r
36   <ul>\r
37   <li><i><b><a href="#3_1">3.1 Study class </a></b></i></li>\r
38   <li><i><b><a href="#3_2">3.2 StudyBuilder class </a></b></i></li>\r
39   <li><i><b><a href="#3_3">3.3 StudyManager class </a></b></i></li>\r
40   <li><i><b><a href="#3_4">3.4 SObject class </a></b></i></li>\r
41   <li><i><b><a href="#3_5">3.5 SComponent class </a></b></i></li>\r
42   <li><i><b><a href="#3_6">3.6 ChildIterator class </a></b></i></li>\r
43   <li><i><b><a href="#3_7">3.7 SComponentIterator </a></b></i></li>\r
44   <li><i><b><a href="#3_8">3.8 GenericAttribute class  </a></b></i></li>\r
45   <li><i><b><a href="#3_9">3.9 UseCaseBuilder class </a></b></i></li>\r
46   <li><i><b><a href="#3_10">3.10 UseCaseIterator </a></b></i></li>\r
47   <li><i><b><a href="#3_12">3.11 Callback class </a></b></i></li>\r
48   <li><i><b><a href="#3_12">3.12 Driver class </a></b></i></li>\r
49   </ul>\r
50 </ul> \r
51 <h2><a name="1"></a>1. Introduction</h2>\r
52 <p>In SALOME application the Study module is used for management (creation, saving \r
53   etc.) of studies. In the framework of the platform, a study represents a working \r
54   document allowing to manage the data produced by various components which are \r
55   integarted into SALOME.<br>\r
56 </p>\r
57 <h2><a name="2"></a>2. Representation of the study</h2>\r
58 <p>The study represents a set of objects that we will call Study Objects or SObjects. \r
59   The study can be represented as a tree, every node of that tree containing a \r
60   SObject. SObjects in the study can be values or references towards data of calculation, \r
61   graphs of calculation, trees of construction of detail(room), results. Every \r
62   SOject of the study is characterised by a unique identifier in the study.</p>\r
63 <p>The study allows to describe the following relations:</p>\r
64 <ul>\r
65   <li>The link between the transient and persistent values of an SObject.</li>\r
66   <li>The relations between the SObjects produced by different components.</li>\r
67   <li>The relations between the SObjects produced by the same component.</li>\r
68   <li>The link between an object and its user name.</li>\r
69   <li>The access to the definition of the component which produce an object of \r
70     the study.</li>\r
71   <li>The access to instance of the component (if this one exists) which has produced \r
72     this SObject of the study.</li>\r
73 </ul>\r
74 \r
75 <p>Every SObject in the study contains a set of attributes. These attributes represent \r
76   a set of definitions associated to that object, they can contain values or corba \r
77   references towards the data contained in the internal data structure of a component.</p>\r
78 <p>As the structure of the study is tree-like it is possible to associate sub-objects \r
79   to objects.</p>\r
80 <p>As particular object, the study contains Component Data which are labels associated to the component\r
81 which produce data in the study. It is to this object that we can associate attributes containing ID which\r
82 we shall allow to identify the type of the component and also its instance. Objects produced by a\r
83 component will be sub-objects of the coresponding Data Component.</p>\r
84 <p>For example Component Data GEOM will contain the data produced by the component \r
85   Geom.</p>\r
86 <table width="100%" border="0">\r
87   <tr>\r
88     <td><img src="Study_Struct.gif"></td>\r
89     <td>GEOM contains the data produced by the component GEOM. The component MESH \r
90       contains a SObject Mesh_1 wich refers to the SObject identified \r
91       by ID4 corresponding to Geometrie_1.</td>\r
92   </tr>\r
93 </table>\r
94 <p>We distinguish two forms of the study, the study opened in a session SALOME and the study in the\r
95 persistent format. These two formats are described in the following sections</p>\r
96 <h3><a name="2_1"></a>2.1 Study in transient format</h3>\r
97 <p>The representation of the study in memory will be based on the document OCAF (supplied by OCC).\r
98 The document OCAF can be seen as a tree, every node of that tree is identified by <i>a tag</i> representing an integer value.</p>\r
99 <p>The exploration of the tree from the root to a node supplies a sequence of tags which establishes a\r
100 unique identifier <i>ID</i>. ID represents a character string containing the sequence of tags separated by\r
101 one ':'.</p> \r
102 <p>For example  0:1:12:4 </p>\r
103 <p>To every node we can associate a set of attributes.</p>\r
104 <p>The attributes which the study can contain can be of the following types:</p>\r
105 <ul>\r
106 <li>All standard attributes supplied by OCC (package TdataStd) which allow to define (integers,\r
107 real, strings, identifiers, references etc.)</li>\r
108 <li>Attributes which contain CORBA references.</li>\r
109 <li>Attributes which contain the path HDF to reach the persistent datum. (Cf. the following chapter)</li>\r
110 </ul>\r
111 <p><b>Remark</b>: it is the study which takes care to build the attributes from the values which are passed to it, so\r
112 an attribute is always in a study, and it knows the study object to which it is attached.</p>\r
113 <p>Example of a Study Object as a set of various attributes.</p>\r
114 <img src="SObject.gif"> \r
115 <h3><a name="2_2"></a>2.2 Study in persistent format</h3>\r
116 <p>To store a study HDF format is used, this tool allows to represent persistent data in the form of a tree.</p>\r
117 <p>Under the root of the persistent document, you can find a set of nodes:</p>\r
118 <ul>\r
119 <li>The first node contains the skeleton of the study. The skeleton consists of the identifiers of the\r
120 objects, as well as the references among them.</li>\r
121 <li>There is also one node for every component which has produced data during this SALOME session. Under each of these\r
122 node there are values of the data produced by this component.</li>\r
123 </ul>\r
124 <h3><a name="2_3"></a>2.3 Link between transient and persistent formats</h3>\r
125 <p>It will be possible to complete the definition of one object in the study by associating to it an attribute\r
126 <i>HDFPath</i> which will contain the path to the persistent data.</p>\r
127 <img src="Link.gif"> \r
128 <p><a href="#cont"><b><i>Back to the contents</i></b></a></p>\r
129 <h2><a name="3"></a>3. Services and features of the study</h2>\r
130 <p>The Study in SALOME application possess a wide functionality. This functionality is provided by a set of classes which are described\r
131 below.\r
132 <h3><a name="3_1"></a>3.1 Study class</h3>\r
133 <p>The purpose of the Study class is to manage the data produced by various components \r
134   of SALOME platform. Most of the Study operations are handled by the <a href="#3_3">StudyManager</a> \r
135   and the <a href="#3_2">StudyBuilder</a>. What \r
136   is left in the Study class are elementary inquiries. A Study is explored by \r
137   a set of tools, mainly iterators , which are described further.</p> \r
138   <p>Nevertheless, the Study class contains a set of methods providing: </p>\r
139   \r
140 <ul>\r
141   <li>management of study properties \r
142   <li> search for SObjects. \r
143   <li>search for SComponents\r
144   <li>creation of a new StudyBuilder, ComponentIterator, ChildIterator etc.\r
145 </ul>\r
146 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Study.html">here</a>.</p>\r
147 <h3><a name="3_2"></a>3.2 StudyBuilder class</h3>\r
148 <p>StudyBuilder supplies basic services to edit the study. The edition of the study is made by the\r
149 component. Every component will use the basic services of the StudyBuilder allowing to write and publish objects.</p>\r
150 <p>StudyBulder provides the following functionality:</p>\r
151 <ul>\r
152   <li>creation, modification or deletetion of SObjects in the study</li>\r
153   <li>creation or removal of SComponents </li>\r
154   <li>undo/redo functionality. For that purpose it supplies the methods NewCommand, \r
155     CommitCommand, AbortCommand. </li>\r
156 </ul>\r
157 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyBuilder.html">here</a>.</p>\r
158 <h3><a name="3_3"></a>3.3 StudyManager class</h3>\r
159 <p>The purpose of the Manager is to manipulate Studies. Since SALOME is a multi-document \r
160   application during a working session you can operate as many stadies as you \r
161   wishes to create. </p>\r
162 <p>For that purpose StudyManager provides the following functionality:</p>\r
163 <ul>\r
164   <li>creation, opening, closing and saving studies</li>\r
165   <li>navigation through a set of studies present in the current working session</li>\r
166   <li> copy/paste of the objects in the study functionality.</li>\r
167 </ul>\r
168 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyManager.html">here</a>.</p>\r
169 <h3><a name="3_4"></a>3.4 SObject class</h3>\r
170 <p>The objects in the study are built by the StudyBuilder. \r
171 The SObject class provides methods for elementary inquiries, like getting an object ID or its attribuites. </p>\r
172 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SObject.html">here</a>.</p>\r
173 <h3><a name="3_5"></a>3.5 SComponent class</h3>\r
174 <p>The SComponent class establishes in the study a permanent assocition to the components \r
175 integrated into SALOME platform. The SComponent interface is a specialization of the SObject\r
176  class. It inherits the most of its methods from the SObject class which are used for management of the SComponents.</p>\r
177 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponent.html">here</a>.</p>\r
178 <h3><a name="3_6"></a>3.6 ChildIterator class</h3>\r
179 <p>It is one of the tools destined for exploration of the study. This class contains a set of methods allowing to get \r
180 the access to all identified objects which are sons of another identifiedobject.</p>\r
181 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1ChildIterator.html">here</a>.</p>\r
182 <h3><a name="3_7"></a>3.7 SComponentIterator</h3>\r
183 <p>This is the second tool destined for exploration of the study. This interface contains the methods allowing to iterate over all SComponents in the list.\r
184  The search is started from the first SComponent in the list. </p>\r
185 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponentIterator.html">here</a>.</p> \r
186  \r
187 <h3><a name="3_8"></a>3.8 GenericAttribute class </h3>\r
188  <p>GenericAttribute represents a base class for all attributes which can be assigned to the SObjects created in the study. All attribute classes \r
189  derive from this classe and inherit its methods. </p>\r
190  <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1GenericAttribute.html">here</a>.</p> \r
191  \r
192 <p>In SALOME application a SObject can possess the following attributes:</p>\r
193 <table width="48%" border="0">\r
194   <tr>\r
195     <td width="44%" height="241"> \r
196       <ul>\r
197         <li><a href="interfaceSALOMEDS_1_1AttributeName.html">AttributeName</a></li>\r
198  <li><a href="interfaceSALOMEDS_1_1AttributeComment.html">AttributeComment</a></li>\r
199  <li><a href="interfaceSALOMEDS_1_1AttributeIOR.html">AttributeIOR</a></li>\r
200  <li><a href="interfaceSALOMEDS_1_1AttributeReal.html">AttributeReal</a></li>\r
201  <li><a href="interfaceSALOMEDS_1_1AttributeInteger.html">AttributeInteger</a></li>\r
202  <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfReal.html">AttributeSequenceOfReal</a></li>\r
203  <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html">AttributeSequenceOfInteger</a></li>\r
204  <li><a href="interfaceSALOMEDS_1_1AttributePersistentRef.html">AttributePersistentRef</a></li>\r
205  <li><a href="interfaceSALOMEDS_1_1AttributeDrawable.html">AttributeDrawable</a></li>\r
206  <li><a href="interfaceSALOMEDS_1_1AttributeSelectable.html">AttributeSelectable</a></li>\r
207  <li><a href="interfaceSALOMEDS_1_1AttributeExpandable.html">AttributeExpandable</a></li>\r
208  <li><a href="interfaceSALOMEDS_1_1AttributeOpened.html">AttributeOpened</a></li>\r
209  </ul></td>\r
210     <td width="56%" height="241"> \r
211       <ul>\r
212  <li><a href="interfaceSALOMEDS_1_1AttributeTextColor.html">AttributeTextColor </a></li>\r
213  <li><a href="interfaceSALOMEDS_1_1AttributeTextHighlightColor.html">AttributeTextHighlightColor</a></li>\r
214  <li><a href="interfaceSALOMEDS_1_1AttributePixMap.html">AttributePixMap</a></li>\r
215  <li><a href="interfaceSALOMEDS_1_1AttributeTreeNode.html">AttributeTreeNode</a></li>\r
216  <li><a href="interfaceSALOMEDS_1_1AttributeLocalID.html">AttributeLocalID</a></li>\r
217  <li><a href="interfaceSALOMEDS_1_1AttributeUserID.html">AttributeUserID</a></li>\r
218  <li><a href="interfaceSALOMEDS_1_1AttributeTarget.html">AttributeTarget</a></li>\r
219  <li><a href="interfaceSALOMEDS_1_1AttributeTableOfInteger.html">AttributeTableOfInteger</a></li>\r
220  <li><a href="interfaceSALOMEDS_1_1AttributeTableOfReal.html">AttributeTableOfReal</a></li>\r
221  <li><a href="interfaceSALOMEDS_1_1AttributeTableOfString.html">AttributeTableOfString</a></li>\r
222  <li><a href="interfaceSALOMEDS_1_1AttributeStudyProperties.html">AttributeStudyProperties</a></li>\r
223  <li><a href="interfaceSALOMEDS_1_1AttributePythonObject.html">AttributePythonObject</a></li>   \r
224  </ul></td>\r
225   </tr>\r
226 </table>\r
227 <h3><a name="3_9"></a>3.9 UseCaseBuilder class</h3>\r
228 <p>UseCase in the study represents a user-defined subtree, containing all or some of the objects which currently exist \r
229 in the study. The UseCaseBuilder class contains a set of methods used for management (creation, deletion etc) of this sub-tree in the study. </p>\r
230 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseBuilder.html">here</a>.</p>\r
231  \r
232 <h3><a name="3_10"></a>3.10 UseCaseIterator</h3>\r
233  <p>This class represents an exploration tool for the UseCase. It contains a set of methods used for iteration over the objects in the UseCase.</p> \r
234  <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseIterator.html">here</a>.</p>\r
235  \r
236 <h3><a name="3_11"></a>3.11 Callback class</h3>\r
237  <p>The StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class \r
238  Callback is created and this object is assigned to the newly created Builder as callback which should be called \r
239  when <i>adding</i> and <i>removing</i> the objects. </p>\r
240  <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Callback.html">here</a>.</p>\r
241  \r
242 <h3><a name="3_12"></a>3.12 Driver class</h3>\r
243  \r
244 <p>This class represents a common tool for all components integrated into SALOME \r
245   application, that allows them to communicate with the study. It contains a set \r
246   of methods which can be called by any component and which provide the following \r
247   functionality:\r
248 <ul>\r
249   <li>publishing in the study of the objects created by a definite component </li>\r
250   <li>saving/loading of the data created by a definite component. These methods \r
251     are called by the StudyManager when loading/saving a study containing the \r
252     data created by a definite component.</li>\r
253   <li>transforming of the transient references into persistant references (or \r
254     vice versa) of the SObjects when saving (or loading) a study</li>\r
255   <li>copy/paste common functionality. These methods can be called by any component \r
256     in order to copy/paste its object created in the study</li>\r
257 </ul>\r
258 <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Driver.html">here</a>.</p>\r
259 <p><a href="#cont"><b><i>Back to the contents</i></b></a></p>\r
260 </body>\r
261 </html>\r