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