Salome HOME
fca28960a879f96105352d06cf3075534c05c830
[modules/kernel.git] / idl / SALOMEDS_Attributes.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : SALOMEDS.idl
23 //  Author : Yves FRICAUD
24 //  $Header$
25
26 /*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces
27     for the attributes which can be assigned to %SObject
28 */
29 #ifndef _SALOMEDS_AttributesIDL_
30 #define _SALOMEDS_AttributesIDL_
31
32 #include "SALOMEDS.idl"
33
34 module SALOMEDS
35 {
36 /*! Sequence of double values
37 */
38   typedef sequence <double> DoubleSeq;
39 /*! Sequence of long values
40 */
41   typedef sequence <long>   LongSeq;
42 /*! Sequence of string values
43 */
44   typedef sequence <string> StringSeq;
45 /*! \struct Color 
46    This structure stores a set of elements defining the color based on RGB.
47 */
48   struct Color {
49 /*! Red color
50 */  
51    double R;
52 /*! Green color
53 */ 
54    double G;
55 /*! Blue color
56 */ 
57    double B;
58   };
59   //==========================================================================
60 /*! \brief Attribute allowing to store a real value
61
62     Attribute allowing to store a real value
63 */
64  //==========================================================================
65   interface AttributeReal : GenericAttribute
66   {
67 /*!
68     Returns the value of this attribute.
69 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
70 */
71     double Value();
72 /*!
73    Sets the value of this attribute.
74 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
75 */
76     void   SetValue(in double value);
77   };
78   //==========================================================================
79 /*! \brief Attribute allowing to store an integer value
80
81    Attribute allowing to store an integer value
82 */
83   //==========================================================================
84   interface AttributeInteger : GenericAttribute
85   {
86 /*!
87     Returns the value of this attribute
88 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
89 */
90     long   Value();
91 /*!
92    Sets the value of this attribute
93 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
94 */
95     void   SetValue(in long value);
96   };
97   //==========================================================================
98 /*! \brief Attribute - sequence of real values
99
100   Attribute - sequence of real values, indexing from 1 (like in CASCADE).
101 */
102   //==========================================================================
103   interface AttributeSequenceOfReal : GenericAttribute
104   {
105 /*!
106    Initialization of the attribute with initial data.
107    \param other    Initially assigned sequence of real numbers.
108 */
109     void      Assign (in DoubleSeq other);
110 /*!
111    Returns the sequence of real numbers stored in the attribute.
112 */
113     DoubleSeq CorbaSequence();
114 /*!
115    Adds to the end of the sequence a real number.
116    \param value    A real number added to the sequence.
117
118 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
119 */
120     void      Add (in double value);
121 /*!
122     Removes a real number with a definite index
123     from the sequence of real numbers stored in the Attribute.
124 */
125     void      Remove(in long index);
126 /*!
127     Substitutes a real number with a definite index for another real number.
128 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
129
130 */
131     void      ChangeValue(in long index, in double value);
132 /*!
133   Returns a real number with a definite index
134     in the sequence of real numbers stored in the Attribute.
135 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
136 */
137     double    Value(in short index);
138 /*!
139     Returns the length of the sequence of real numbers stored in the Attribute.
140 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
141
142 */
143     long      Length();
144   };
145   //==========================================================================
146 /*! \brief Attribute - sequence of integer
147
148   Attribute - sequence of integer, indexing from 1 (like in CASCADE)
149 */
150   //==========================================================================
151   interface AttributeSequenceOfInteger : GenericAttribute
152   {
153 /*!
154    Initialization of the attribute with initial data.
155    \param other    Initially assigned sequence of integer numbers.
156 */
157     void      Assign (in LongSeq other);
158 /*!
159    Returns the sequence of integer numbers stored in the Attribute.
160 */
161     LongSeq CorbaSequence();
162 /*!
163    Adds to the end of the sequence an integer number.
164    \param value    An integer number added to the sequence.
165
166 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
167
168 */
169     void      Add (in long value);
170 /*!
171     Removes an integer number with a definite index
172     from the sequence of integer numbers stored in the Attribute.
173 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
174
175 */
176     void      Remove(in long index);
177 /*!
178     Substitutes an integer number with a definite index for another integer number.
179 */
180     void      ChangeValue(in long index, in long value);
181 /*!
182    Returns an integer number with a definite index
183     in the sequence of integer numbers stored in the Attribute.
184 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
185 */
186     long      Value(in short index);
187 /*!
188     Returns the length of the sequence of integer numbers stored in the Attribute.
189 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
190
191 */
192     long      Length();
193   };
194
195   //==========================================================================
196 /*! \brief Name attribute
197
198    This attribute stores a string value, which corresponds to the name of the %SObject
199    or to the name of corresponding object.
200 */
201   //==========================================================================
202
203   interface AttributeName : GenericAttribute
204   {
205 /*!
206     Returns the value of this attribute
207 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
208 */
209     string Value();
210 /*!
211    Sets the value of this attribute
212 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
213 */
214     void   SetValue(in string value);
215   };
216
217   //==========================================================================
218 /*! \brief Comment attribute
219
220     This attribute stores a string value containing supplementary information about
221     the %SObject. In particular it contains the data type of the %SComponent.
222 */
223   //==========================================================================
224   interface AttributeComment : GenericAttribute
225   {
226 /*!
227     Returns the value of this attribute
228 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
229 */
230     string Value();
231 /*!
232    Sets the value of this attribute
233 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
234 */
235     void   SetValue(in string value);
236   };
237   //==========================================================================
238 /*! \brief IOR attribute
239
240     This attribute stores a string value identifying a runtime object.In particular
241     it contains CORBA Interoperable Object Reference.
242 */
243  //==========================================================================
244   interface AttributeIOR : GenericAttribute
245   {
246 /*!
247     Returns the value of this attribute
248 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
249 */
250     string Value();
251 /*!
252    Sets the value of this attribute
253 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
254 */
255     void   SetValue(in string value);
256   };
257
258   //==========================================================================
259 /*! \brief Persistent reference attribute
260
261      This attribute stores a persistent identifier of the object.
262 */
263   //==========================================================================
264   interface AttributePersistentRef : GenericAttribute
265   {
266 /*!
267     Returns the value of this attribute
268 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
269 */
270     string Value();
271 /*!
272    Sets the value of this attribute
273 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
274 */
275     void   SetValue(in string value);
276   };
277
278   //==========================================================================
279 /*! \brief External File definition
280
281      This attribute stores a path to an External File.
282 */
283   //==========================================================================
284   interface AttributeExternalFileDef: GenericAttribute
285   {
286 /*!
287     Returns the value of this attribute
288 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
289 */
290     string Value();
291 /*!
292    Sets the value of this attribute
293 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
294 */
295     void   SetValue(in string value);
296   };
297
298   //==========================================================================
299 /*! \brief File Type definition
300
301      This attribute stores an external File Type (see ExternalFileDef attribute).
302 */
303   //==========================================================================
304   interface AttributeFileType: GenericAttribute
305   {
306 /*!
307     Returns the value of this attribute
308 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
309 */
310     string Value();
311 /*!
312    Sets the value of this attribute
313 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
314 */
315     void   SetValue(in string value);
316   };
317
318   //==========================================================================
319   //Below the list of presentation attributes for display study tree in browser
320   //==========================================================================
321
322
323   //==========================================================================
324 /*! \brief Drawable flag Attribute.
325
326    This is a presentation attribute necessary for display of the study tree in the browser.
327    The item associated to SObject is created/displayed if TRUE.
328 */
329   //==========================================================================
330   interface AttributeDrawable : GenericAttribute
331   {
332 /*!
333    Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
334 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
335
336 */
337     boolean IsDrawable();
338 /*!
339 Sets the items to be drawable if <VAR>value</VAR> is TRUE (the default) or not to be selectable if <VAR>value</VAR>is FALSE.
340 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
341
342 */
343     void   SetDrawable(in boolean value);
344   };
345
346   //==========================================================================
347 /*! \brief Selectable flag Attribute.
348
349   This is a presentation attribute necessary for display of the study tree in the browser.
350   The item is selectable by %SALOME selection mechanism if TRUE.
351 */
352   //==========================================================================
353   interface AttributeSelectable : GenericAttribute
354   {
355 /*!
356    Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
357 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
358
359 */
360     boolean IsSelectable();
361 /*!
362 Sets the items to be selectable if <VAR>value</VAR> is TRUE (the default) or not to be selectable if <VAR>value</VAR>is FALSE.
363 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
364
365 */
366     void   SetSelectable(in boolean value);
367   };
368
369   //==========================================================================
370 /*! \brief Expandable flag Attribute.
371
372  This is a presentation attribute necessary for display of the study tree in the browser.
373  It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE
374  expandable only if it has children.
375 */
376   //==========================================================================
377   interface AttributeExpandable : GenericAttribute
378   {
379 /*!
380     Returns TRUE if this item is expandable even when it has no children.
381 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
382
383 */
384     boolean IsExpandable();
385 /*!
386    Sets this item to be expandable even if it has no children if <VAR>value</VAR> is TRUE, and to be
387    expandable only if it has children if <VAR>value</VAR> is FALSE (the default).
388 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
389
390 */
391     void   SetExpandable(in boolean value);
392   };
393
394   //==========================================================================
395 /*! \brief Opened flag Attribute.
396
397    This is a presentation attribute necessary for display of the study tree in the browser.
398    It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
399    are not visible) if bool is FALSE.
400 */
401   //==========================================================================
402   interface AttributeOpened : GenericAttribute
403   {
404 /*!
405     Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
406 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
407
408 */
409     boolean IsOpened();
410 /*!
411    Sets this item to be open (its children are visible) if <VAR>value</VAR> is TRUE, and to be closed
412 (its children are not visible) if <VAR>value</VAR> is FALSE.
413 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
414
415 */
416     void   SetOpened(in boolean value);
417   };
418   //==========================================================================
419 /*! \brief TextColorAttribute.
420
421      This attribute sets the color of an item.
422 */
423   //==========================================================================
424   interface AttributeTextColor : GenericAttribute
425   {
426 /*!
427    Returns the color of an item.
428 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
429
430 */
431     Color TextColor();
432 /*!
433    Sets the color of an item.
434 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
435
436 */
437     void   SetTextColor(in Color value);
438   };
439
440   //==========================================================================
441   /*! \brief TextHighlightColorAttribute.
442
443      This attribute sets the highlight color of an item.
444 */
445   //==========================================================================
446   interface AttributeTextHighlightColor : GenericAttribute
447   {
448 /*!
449    Returns the highlight color of an item.
450 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
451
452 */
453     Color TextHighlightColor();
454 /*!
455    Sets the highlight color of an item.
456 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
457
458 */
459     void   SetTextHighlightColor(in Color value);
460   };
461   //==========================================================================
462 /*! \brief PixMapAttribute.
463
464     This attribute stores an icon which is put before the name of an item.
465 */
466   //==========================================================================
467   interface AttributePixMap : GenericAttribute
468   {
469 /*!
470    Returns True if there is an icon before the name of the item.
471 */
472     boolean HasPixMap();
473 /*!
474    Returns the name of the icon.
475 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
476
477 */
478     string  GetPixMap();
479 /*!
480    Sets the name of the icon.
481 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
482
483 */
484     void    SetPixMap(in string value);
485   };
486
487   //==========================================================================
488 /*! \brief TreeNodeAttribute.
489
490    A set of these attributes on the %SObjects of the %study forms an inner auxiliary
491    tree whith its own structure and identifier. The quantity of such trees with different
492    identifiers can be arbitrary.
493 <BR><VAR>See also <A href=exemple/Example18.html> an example </A> of usage of the methods of this interface in batchmode of %SALOME application.</VAR>
494
495 */
496   //==========================================================================
497   interface AttributeTreeNode : GenericAttribute
498   {
499 /*!
500   Sets the father TreeNode to this TreeNode.
501 */
502     void              SetFather(in AttributeTreeNode value);
503 /*!
504   Returns True if there is the father TreeNode of this TreeNode.
505 */
506     boolean           HasFather();
507 /*!
508   Returns the father Treenode of this TreeNode.
509 */
510     AttributeTreeNode GetFather();
511 /*!
512   Sets the previous brother TreeNode to this treeNode.
513 */
514     void              SetPrevious(in AttributeTreeNode value);
515 /*!
516   Returns True if there is the previous brother TreeNode of this TreeNode.
517 */
518     boolean           HasPrevious();
519 /*!
520   Returns the previous brother TreeNode of this TreeNode.
521 */
522     AttributeTreeNode GetPrevious();
523 /*!
524   Sets the next brother TreeNode to this treeNode.
525 */
526     void              SetNext(in AttributeTreeNode value);
527 /*!
528   Returns True if there is the next brother TreeNode of this TreeNode.
529 */
530     boolean           HasNext();
531 /*!
532   Returns the previous brother TreeNode of this TreeNode.
533 */
534     AttributeTreeNode GetNext();
535 /*!
536   Sets the first child TreeNode to this treeNode.
537 */
538     void              SetFirst(in AttributeTreeNode value);
539 /*!
540   Returns True if there is the first child TreeNode of this TreeNode.
541 */
542     boolean           HasFirst();
543 /*!
544   Returns the first child TreeNode of this TreeNode.
545 */
546     AttributeTreeNode GetFirst();
547 /*!
548   Sets ID of the tree. TreeNodes of one tree have the same ID.
549 */
550     void              SetTreeID(in string value);
551 /*!
552   Gets ID of the tree.
553 */
554     string            GetTreeID();
555
556 /*!
557    Adds a child TreeNode to the end of the list of children of this Treenode.
558 */
559     void              Append(in AttributeTreeNode value);
560 /*!
561    Adds a child TreeNode to the beginning of the list of children of this Treenode.
562
563 */
564     void              Prepend(in AttributeTreeNode value);
565 /*!
566    Adds a brother TreeNode before this Treenode.
567     In this case the both TreeNodes will belong to the same father.
568 */
569     void              InsertBefore(in AttributeTreeNode value);
570 /*!
571    Adds a brother TreeNode after this Treenode.
572     In this case the both TreeNodes will belong to the same father.
573 */
574     void              InsertAfter(in AttributeTreeNode value);
575 /*!
576    Deletes a TreeNode.
577 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
578
579 */
580     void              Remove();
581
582 /*!
583    Returns  the  depth  of the TreeNode in the
584    structure, it means the  number of  fathers of the given TreeNode.
585    (i.e.: the depth of the root TreeNode is 0).
586 */
587     long              Depth();
588 /*!
589     Returns True if it is a root TreeNode.
590 */
591     boolean           IsRoot();
592 /*!
593     Returns True if this TreeNode is a descendant of the TreeNode.
594 */
595     boolean           IsDescendant(in AttributeTreeNode value);
596 /*!
597     Returns True if this TreeNode is the father of the TreeNode.
598 */
599     boolean           IsFather(in AttributeTreeNode value);
600 /*!
601     Returns True if this TreeNode is a child of the TreeNode.
602 */
603     boolean           IsChild(in AttributeTreeNode value);
604 /*!
605    Returns ID of the according %SObject.
606 */
607     string            Label();
608   };
609   //==========================================================================
610 /*! \brief LocalID attribute
611
612    Attribute describing the link between a %SObject and a local object in the component.
613 */
614   //==========================================================================
615   interface AttributeLocalID : GenericAttribute
616   {
617 /*!
618    Returns the value of this attribute.
619 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
620 */
621     long   Value();
622 /*!
623    Sets the value of this attribute.
624 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
625 */
626     void   SetValue(in long value);
627   };
628
629   //==========================================================================
630 /*! \brief Attribute storing GUID
631
632     Attribute allowing to store GUID
633 */
634   //==========================================================================
635   interface AttributeUserID : GenericAttribute
636   {
637 /*!
638    Returns the value of this attribute
639 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
640 */
641     string Value();
642 /*!
643    Sets the value of this attribute
644 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
645 */
646     void   SetValue(in string value);
647   };
648
649   //==========================================================================
650 /*! \brief %AttributeTarget iterface
651
652    This attribute stores the list of all %SObjects that refer
653    to this %SObject. This attribute is used for inner purposes of the application.
654    It is also needed for optimization.
655 */
656   //==========================================================================
657
658   interface AttributeTarget : GenericAttribute
659   {
660 /*!
661     Adds a %SObject to the list of %SObjects which refer to this %SObject.
662
663 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
664
665 */
666     void          Add(in SObject anObject);
667 /*!
668     Returns the list of %SObjects which refer to this %SObject.
669 */
670     SALOMEDS::Study::ListOfSObject Get();
671 /*!
672     Deletes a %SObject from the list of %SObjects which refer to this %SObject.
673
674 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
675
676 */
677     void          Remove(in SObject anObject);
678   };
679   //==========================================================================
680   /*! \brief %AttributeTableOfInteger interface
681
682    This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
683     and string titles of this table, of each row, of each column.
684 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
685
686 */
687   //==========================================================================
688
689   interface AttributeTableOfInteger : GenericAttribute
690   {
691 /*!
692    This exception is raised when an incorrect index is passed as parameter.
693 */
694     exception IncorrectIndex {};
695 /*!
696    This exception is raised when an incorrect length of the argument is passed as parameter.
697 */
698     exception IncorrectArgumentLength {};
699
700     // titles: for table, for each row, for each column
701 /*!
702    Sets the title of the table.
703 */
704     void SetTitle(in string theTitle);
705 /*!
706   Returns the title of the table.
707 */
708     string GetTitle();
709 /*!
710    Sets the title of a row with a definite index.
711 */
712     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
713 /*!
714    Sets the titles for all rows of the table.
715 */
716     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
717 /*!
718    Returns the titles of all rows of the table.
719 */
720     StringSeq GetRowTitles();
721 /*!
722    Sets the title of a column with a definite index.
723 */
724     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
725 /*!
726    Sets the titles for all columns of the table.
727 */
728     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
729 /*!
730    Returns the titles of all columns of the table.
731 */
732     StringSeq GetColumnTitles();
733
734     //Rows units
735 /*!
736    Sets the unit of a row with a definite index.
737 */
738     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
739 /*!
740    Sets the units for all rows of the table.
741 */
742     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
743 /*!
744    Returns the units of all rows of the table.
745 */
746     StringSeq GetRowUnits();
747
748     // table information
749 /*!
750    Returns the number of rows of the table.
751 */
752     long GetNbRows();
753 /*!
754    Returns the number of columns of the table.
755 */
756     long GetNbColumns();
757
758     // operations with rows
759 /*!
760    Adds a row to the end of the table.
761 */
762     void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
763 /*!
764    Sets the values of all elements of the row.
765 */
766     void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
767 /*!
768    Returns the row of the table.
769 */
770     LongSeq GetRow(in long theRow) raises(IncorrectIndex);
771
772     // operations with columns
773 /*!
774    Adds a column to the end of the table.
775 */
776     void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
777 /*!
778    Sets the values of all elements of the column.
779 */
780     void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
781 /*!
782    Returns the column of the table.
783 */
784     LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
785
786     // operations with elements
787 /*!
788     Puts a value in the table.
789     \param theRow      The row, where the value will be placed.
790     \param theColumn   The column, where the value will be placed.
791 */
792     void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
793 /*!
794     Returns True if there is a value in the table.
795     \param theRow      The row containing the value
796     \param theColumn   The column containing the value
797 */
798     boolean HasValue(in long theRow, in long theColumn);
799 /*!
800     Returns the value from the table.
801     \param theRow      The row containing the value
802     \param theColumn   The column containing the value
803 */
804     long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
805
806 /*!
807     Sets the max number of colums in the table.
808     \note It'd better to set it before filling the table.
809 */
810     void SetNbColumns(in long theNbColumns);
811
812 /*!
813     Returns the indices of the row where the values are defined.
814 */
815     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
816     // operations with files
817 /*!
818    Reads a table from a file.
819 */
820     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
821 /*!
822    Saves a table into a file.
823 */
824     SALOMEDS::TMPFile SaveToFile();
825   };
826
827   //==========================================================================
828 /*! \brief %AttributeTableOfReal interface
829
830    This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
831     and string titles of this table, of each row, of each column.
832 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
833
834 */
835   //==========================================================================
836
837   interface AttributeTableOfReal : GenericAttribute
838   {
839 /*!
840    This exception is raised when an incorrect index is passed as parameter.
841 */
842     exception IncorrectIndex {};
843 /*!
844    This exception is raised when an incorrect length of the argument is passed as parameter.
845 */
846     exception IncorrectArgumentLength {};
847
848     // titles: for table, for each row, for each column
849 /*!
850    Sets the title of the table.
851 */
852     void SetTitle(in string theTitle);
853 /*!
854   Returns the title of the table.
855 */
856     string GetTitle();
857 /*!
858    Sets the title of a row with a definite index.
859 */
860     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
861 /*!
862    Sets the titles for all rows of the table.
863 */
864     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
865 /*!
866    Returns the titles of all rows of the table.
867 */
868     StringSeq GetRowTitles();
869 /*!
870    Sets the title of a column with a definite index.
871 */
872     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
873 /*!
874    Sets the titles for all columns of the table.
875 */
876     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
877 /*!
878    Returns the titles of all columns of the table.
879 */
880     StringSeq GetColumnTitles();
881
882     //Rows units
883 /*!
884    Sets the unit of a row with a definite index.
885 */
886     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
887 /*!
888    Sets the units for all rows of the table.
889 */
890     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
891 /*!
892    Returns the units of all rows of the table.
893 */
894     StringSeq GetRowUnits();
895
896     // table information
897 /*!
898    Returns the number of rows of the table.
899 */
900     long GetNbRows();
901 /*!
902    Returns the number of columns of the table.
903 */
904     long GetNbColumns();
905
906     // operations with rows
907 /*!
908    Adds a row to the end of the table.
909 */
910     void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
911 /*!
912    Sets the values of all elements of the row.
913 */
914     void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
915 /*!
916    Returns the row of the table.
917 */
918     DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
919
920     // operations with columns
921 /*!
922    Adds a column to the end of the table.
923 */
924     void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
925 /*!
926    Sets the values of all elements of the column.
927 */
928     void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
929 /*!
930    Returns the column of the table.
931 */
932     DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
933
934     // operations with elements
935 /*!
936     Puts a value in the table.
937     \param theRow      The row, where the value will be placed.
938     \param theColumn   The column, where the value will be placed.
939 */
940     void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
941 /*!
942     Returns True if there is a value in the table.
943     \param theRow      The row containing the value
944     \param theColumn   The column containing the value
945 */
946     boolean HasValue(in long theRow, in long theColumn);
947 /*!
948     Returns the value from the table.
949     \param theRow      The row containing the value
950     \param theColumn   The column containing the value
951 */
952     double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
953
954 /*!
955     Sets the max number of colums in the table.
956     \note It'd better to set it before filling the table.
957 */
958     void SetNbColumns(in long theNbColumns);
959
960 /*!
961     Returns the indices of the row where the values are defined.
962 */
963     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
964     // operations with files
965 /*!
966    Reads a table from a file.
967 */
968     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
969 /*!
970    Saves a table into a file.
971 */
972     SALOMEDS::TMPFile SaveToFile();
973   };
974
975
976
977   //==========================================================================
978 /*! \brief %AttributeTableOfString interface
979
980    This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
981     and string titles of this table, of each row, of each column.
982 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
983
984 */
985   //==========================================================================
986
987   interface AttributeTableOfString : GenericAttribute
988   {
989 /*!
990    This exception is raised when an incorrect index is passed as parameter.
991 */
992     exception IncorrectIndex {};
993 /*!
994    This exception is raised when an incorrect length of the argument is passed as parameter.
995 */
996     exception IncorrectArgumentLength {};
997
998     // titles: for table, for each row, for each column
999 /*!
1000    Sets the title of the table.
1001 */
1002     void SetTitle(in string theTitle);
1003 /*!
1004   Returns the title of the table.
1005 */
1006     string GetTitle();
1007 /*!
1008    Sets the title of a row with a definite index.
1009 */
1010     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1011 /*!
1012    Sets the titles for all rows of the table.
1013 */
1014     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1015 /*!
1016    Returns the titles of all rows of the table.
1017 */
1018     StringSeq GetRowTitles();
1019 /*!
1020    Sets the title of a column with a definite index.
1021 */
1022     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1023 /*!
1024    Sets the titles for all columns of the table.
1025 */
1026     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1027 /*!
1028    Returns the titles of all columns of the table.
1029 */
1030     StringSeq GetColumnTitles();
1031
1032     //Rows units
1033 /*!
1034    Sets the unit of a row with a definite index.
1035 */
1036     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1037 /*!
1038    Sets the units for all rows of the table.
1039 */
1040     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1041 /*!
1042    Returns the units of all rows of the table.
1043 */
1044     StringSeq GetRowUnits();
1045
1046     // table information
1047 /*!
1048    Returns the number of rows of the table.
1049 */
1050     long GetNbRows();
1051 /*!
1052    Returns the number of columns of the table.
1053 */
1054     long GetNbColumns();
1055
1056     // operations with rows
1057 /*!
1058    Adds a row to the end of the table.
1059 */
1060     void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1061 /*!
1062    Sets the values of all elements of the row.
1063 */
1064     void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1065 /*!
1066    Returns the row of the table.
1067 */
1068     StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1069
1070     // operations with columns
1071 /*!
1072    Adds a column to the end of the table.
1073 */
1074     void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1075 /*!
1076    Sets the values of all elements of the column.
1077 */
1078     void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1079 /*!
1080    Returns the column of the table.
1081 */
1082     StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1083
1084     // operations with elements
1085 /*!
1086     Puts a value in the table.
1087     \param theRow      The row, where the value will be placed.
1088     \param theColumn   The column, where the value will be placed.
1089 */
1090     void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1091 /*!
1092     Returns True if there is a value in the table.
1093     \param theRow      The row containing the value
1094     \param theColumn   The column containing the value
1095 */
1096     boolean HasValue(in long theRow, in long theColumn);
1097 /*!
1098     Returns the value from the table.
1099     \param theRow      The row containing the value
1100     \param theColumn   The column containing the value
1101 */
1102     string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1103
1104 /*!
1105     Sets the max number of colums in the table.
1106     \note It'd better to set it before filling the table.
1107 */
1108     void SetNbColumns(in long theNbColumns);
1109
1110 /*!
1111     Returns the indices of the row where the values are defined.
1112 */
1113     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1114     // operations with files
1115 /*!
1116    Reads a table from a file.
1117 */
1118     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1119 /*!
1120    Saves a table into a file.
1121 */
1122     SALOMEDS::TMPFile SaveToFile();
1123   };
1124
1125
1126   //==========================================================================
1127 /*! \brief %AttributeStudyProperties interface
1128
1129    This attribute allows to store study properties: user name, creation date, creation
1130    mode, modified flag, locked flag.
1131 <BR><VAR>See also <A href=exemple/Example20.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1132
1133 */
1134   //==========================================================================
1135
1136   interface AttributeStudyProperties : GenericAttribute
1137   {
1138 /*!
1139    Sets the name of the author of the %Study
1140 */
1141     void SetUserName(in string theName);
1142 /*!
1143      Returns the name of the user of the %Study.
1144     \note <BR>It returns a null string, if user name is not set
1145 */
1146     string GetUserName();
1147 /*!
1148    Sets creation date of the %Study.
1149 */
1150     void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1151 /*!
1152      Returns creation date of the %Study and True if creation date is set.
1153 */
1154     boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1155 /*!
1156    Sets creation mode of the %Study.
1157    \note <BR>Creation mode must be: "from scratch" or "copy from".
1158 */
1159     void SetCreationMode(in string theMode);
1160 /*!
1161    Returns creation mode: "from scratch", "copy from", or null string
1162    if creation mode is not set
1163 */
1164     string GetCreationMode();
1165 /*!
1166    Sets the number of transactions executed after the last saving of the document.
1167 */
1168     void SetModified(in long theModified);
1169 /*!
1170     Returns True, if the document has been modified and not saved.
1171 */
1172     boolean IsModified();
1173 /*!
1174   Returns the number of transactions executed after the last saving of the document.
1175 */
1176     long GetModified();
1177 /*!
1178     Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1179 */
1180     void SetLocked(in boolean theLocked);
1181 /*!
1182     Returns True if the document is locked for modifications.
1183 */
1184     boolean IsLocked();
1185 /*!
1186    Appends modification parameters to the modifications list.
1187 */
1188     void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1189 /*!
1190    Returns a list of mosdifiers user names, modification dates.
1191    /note <BR>If <VAR>theWithCreator</VAR> is True, then the output list will also contain the name of the author and the date of creation.
1192 */
1193     void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1194   };
1195   //==========================================================================
1196 /*! \brief %AttributePythonObject interface
1197
1198     Attribute allowing to store pyton objects as a sequence of chars.
1199 */
1200   //==========================================================================
1201
1202   interface AttributePythonObject : GenericAttribute
1203   {
1204 /*!
1205    Sets in the attribute a Python object converted into a sequence of chars.
1206    \param theSequence    A sequence of chars.
1207    \param IsScript       Defines (if True) whether this sequence of chars is a Python script.
1208 */
1209     void SetObject(in string theSequence, in boolean IsScript);
1210 /*!
1211     Returns a Python object stored in the attribute as a sequence of chars.
1212 */
1213     string GetObject();
1214 /*!
1215     Returns True if the sequence of bytes stored in the attribute corresponds
1216     to a Python script.
1217 */
1218     boolean IsScript();
1219   };
1220 };
1221 #endif