Salome HOME
CCAR: remove debug prints from the standard trace and put these prints
[modules/kernel.git] / idl / SALOMEDS_Attributes.idl
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SALOMEDS_Attributes.idl
23 //  Author : Yves FRICAUD
24 //  $Header$
25 //
26 /*! \file SALOMEDS_Attributes.idl 
27     \brief This file contains a set of interfaces
28     for the attributes which can be assigned to %SObject
29 */
30 #ifndef _SALOMEDS_AttributesIDL_
31 #define _SALOMEDS_AttributesIDL_
32
33 #include "SALOMEDS.idl"
34
35 module SALOMEDS
36 {
37 //! Sequence of double values
38   typedef sequence <double> DoubleSeq;
39 //! Sequence of long values
40   typedef sequence <long>   LongSeq;
41 //! Sequence of string values
42   typedef sequence <string> StringSeq;
43 /*! \brief  This structure stores a set of elements defining the color based on RGB palette. 
44    
45    These elements are
46    used as input parameters for methods necessary for color definition of different items.
47 */
48   struct Color {
49 //! Red color
50    double R;
51 //! Green color
52    double G;
53 //! Blue color
54    double B;
55   };
56   //==========================================================================
57 /*! \brief Attribute allowing to store a real value
58
59     Attribute allowing to store a real value
60 */
61  //==========================================================================
62
63   interface AttributeReal : GenericAttribute
64   {
65 //! Returns the value of this attribute.
66 /*!
67
68 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
69 */
70     double Value();
71  //! Sets the value of this attribute.
72 /*!
73
74 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
75 */
76     void   SetValue(in double value);
77
78   };
79   //==========================================================================
80 /*! \brief Attribute allowing to store an integer value
81
82    Attribute allowing to store an integer value
83 */
84   //==========================================================================
85   interface AttributeInteger : GenericAttribute
86   {
87   //!  Returns the value of this attribute
88 /*!
89
90 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
91 */
92     long   Value();
93
94    //! Sets the value of this attribute
95 /*!
96
97 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
98 */
99     void   SetValue(in long value);
100   };
101   //==========================================================================
102 /*! \brief Attribute - sequence of real values
103
104   Attribute - sequence of real values, indexing from 1 (like in CASCADE).
105 */
106   //==========================================================================
107   interface AttributeSequenceOfReal : GenericAttribute
108   {
109  //!  Initialization of the attribute with initial data.
110 /*!
111    \param other    Initially assigned sequence of real numbers.
112 */
113     void      Assign (in DoubleSeq other);
114 //!  Returns the sequence of real numbers stored in the attribute.
115     DoubleSeq CorbaSequence();
116 /*! \brief Adds to the end of the sequence a real number.
117
118    \param value    A real number added to the sequence.
119
120 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
121 */
122     void      Add (in double value);
123 /*! \brief  Removes a real number with a definite index
124     from the sequence of real numbers stored in the Attribute.
125
126     \param index The index of the given real number
127 */
128     void      Remove(in long index);
129 /*! \brief Substitutes a given real number with a definite index for another real number.
130
131     \param index The index of the given real number.
132     \param value The value of another real number.
133
134 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
135
136 */
137     void      ChangeValue(in long index, in double value);
138 /*! \brief Returns a given real number with a definite index in the sequence of real numbers stored in the Attribute.
139
140     \param index The index of the given real number.
141
142 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
143 */
144     double    Value(in short index);
145 /*! \brief Returns the length of the sequence of real numbers stored in the Attribute.
146
147 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
148
149 */
150     long      Length();
151   };
152   //==========================================================================
153 /*! \brief Attribute - sequence of integer
154
155   Attribute - sequence of integer, indexing from 1 (like in CASCADE)
156 */
157   //==========================================================================
158   interface AttributeSequenceOfInteger : GenericAttribute
159   {
160 /*! \brief Initialisation of the attribute with initial data.
161    \param other    Initially assigned sequence of integer numbers.
162 */
163     void      Assign (in LongSeq other);
164 //!  Returns the sequence of integer numbers stored in the Attribute.
165     LongSeq CorbaSequence();
166 /*! \brief  Adds to the end of the sequence an integer number.
167
168    \param value    An integer number added to the sequence.
169
170 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
171
172 */
173     void      Add (in long value);
174 /*! \brief Removes an integer number with a definite index from the sequence of integer numbers stored in the Attribute.
175
176     \param index The index of the given integer number.
177
178 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
179
180 */
181     void      Remove(in long index);
182 /*! \brief Substitutes an integer number with a definite index for another integer number.
183
184     \param index The index of the given integer number.
185     \param value The value of another integer number.
186
187 */
188     void      ChangeValue(in long index, in long value);
189 /*!  \brief Returns a given integer number with a definite index in the sequence of integer numbers stored in the Attribute.
190     \param index The index of the given integer number.
191
192 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
193 */
194     long      Value(in short index);
195 /*! \brief  Returns the length of the sequence of integer numbers stored in the Attribute.
196
197 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
198
199 */
200     long      Length();
201   };
202
203   //==========================================================================
204 /*! \brief Name attribute
205
206    This attribute stores a string value, which corresponds to the name of the %SObject
207    or to the name of corresponding object.
208 */
209   //==========================================================================
210
211   interface AttributeName : GenericAttribute
212   {
213 /*! \brief  Returns the value of this attribute
214
215 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
216 */
217     string Value();
218 /*! \brief Sets the value of this attribute
219
220    \param value This parameter defines the value of this attribute.
221
222 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
223 */
224     void   SetValue(in string value);
225   };
226
227   //==========================================================================
228 /*! \brief Comment attribute
229
230     This attribute stores a string value containing supplementary information about
231     the %SObject. In particular it contains the data type of the %SComponent.
232 */
233   //==========================================================================
234   interface AttributeComment : GenericAttribute
235   {
236 /*! \brief Returns the value of this attribute
237
238 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
239 */
240     string Value();
241 /*! \brief Sets the value of this attribute
242    \param value This string parameter defines the value of this attribute - a description of a %SObject.
243
244 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
245 */
246     void   SetValue(in string value);
247   };
248   //==========================================================================
249 /*! \brief String attribute
250
251     This attribute stores a string value containing arbitrary information.
252 */
253   //==========================================================================
254   interface AttributeString : GenericAttribute
255   {
256 /*!
257     Returns the value of this attribute
258 */
259     string Value();
260 /*!
261    Sets the value of this attribute
262    \param value This string parameter defines the value of this attribute.
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
324 */
325     string Value();
326 /*!
327    Sets the value of this attribute
328 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
344 */
345     string Value();
346 /*!
347    Sets the value of this attribute
348 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
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 <em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
435
436 */
437     void   SetExpandable(in boolean value);
438   };
439
440   //==========================================================================
441 /*! \brief Flags Attribute.
442
443    This interface is intended for storing different object attributes that
444    have only two states (0 and 1).
445 */
446   //==========================================================================
447
448   interface AttributeFlags : GenericAttribute
449   {
450     long    GetFlags();
451     void    SetFlags( in long theFlags );
452
453     boolean Get( in long theFlag );
454     void    Set( in long theFlag, in boolean theValue );
455   };
456
457   //==========================================================================
458 /*! \brief Graphic Attribute.
459    This class is intended for storing information about
460    graphic representation of objects in dirrent views
461 */
462   //==========================================================================
463
464   interface AttributeGraphic : GenericAttribute
465   {
466     void     SetVisibility( in long theViewId, in boolean theValue );
467     boolean  GetVisibility( in long theViewId );
468   };  
469
470   //==========================================================================
471 /*! \brief Opened flag Attribute.
472
473    This is a presentation attribute necessary for display of the study tree in the browser.
474    It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
475    are not visible) if bool is FALSE.
476 */
477   //==========================================================================
478   interface AttributeOpened : GenericAttribute
479   {
480 /*!
481     Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
482
483 <em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
484
485 */
486     boolean IsOpened();
487 /*!
488    Sets this item to be open (its children are visible)
489
490    \param value If the value of this boolean parameter is TRUE this item will be set as open,
491     and as closed if FALSE.
492
493 <em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
494
495 */
496     void   SetOpened(in boolean value);
497   };
498   //==========================================================================
499 /*! \brief TextColorAttribute.
500
501      This attribute sets the color of an item.
502 */
503   //==========================================================================
504   interface AttributeTextColor : GenericAttribute
505   {
506 /*!
507    Returns the color of an item.
508
509 <em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
510
511 */
512     Color TextColor();
513 /*!
514    Sets the color of an item.
515
516    \param value This parameter defines the color of the item.
517
518 <em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
519
520 */
521     void   SetTextColor(in Color value);
522   };
523
524   //==========================================================================
525   /*! \brief TextHighlightColorAttribute.
526
527      This attribute sets the highlight color of an item.
528 */
529   //==========================================================================
530   interface AttributeTextHighlightColor : GenericAttribute
531   {
532 /*!
533    Returns the highlight color of an item.
534
535
536
537 <em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
538
539 */
540     Color TextHighlightColor();
541 /*!
542    Sets the highlight color of an item.
543    \param value This parameter defines the highlight color of the item.
544
545 <em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
546
547 */
548     void   SetTextHighlightColor(in Color value);
549   };
550   //==========================================================================
551 /*! \brief PixMapAttribute.
552
553     This attribute stores an icon which is put before the name of an item.
554 */
555   //==========================================================================
556   interface AttributePixMap : GenericAttribute
557   {
558 /*!
559    Returns True if there is an icon before the name of the given item.
560 */
561     boolean HasPixMap();
562 /*!
563    Returns the name of the icon in the format of a string.
564
565 <em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
566
567 */
568     string  GetPixMap();
569 /*!
570    Sets the name of the icon.
571    \param value This string parameter defines the name of the icon.
572
573 <em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
574
575 */
576     void    SetPixMap(in string value);
577   };
578
579   //==========================================================================
580 /*! \brief TreeNodeAttribute.
581
582    A set of these attributes on the %SObjects of the %study forms an inner auxiliary
583    tree whith its own structure and identifier. The quantity of such trees with different
584    identifiers can be arbitrary.
585
586 <em>See \ref example18 for an example of usage of the methods of this interface in batchmode of %SALOME application.</em>
587
588 */
589   //==========================================================================
590   interface AttributeTreeNode : GenericAttribute
591   {
592 /*!
593   Assigns the father tree node to this tree node.
594 */
595     void              SetFather(in AttributeTreeNode value);
596 /*!
597   Returns True if there is a father tree node of this tree node.
598 */
599     boolean           HasFather();
600 /*!
601   Returns the father tree node of this tree node.
602 */
603     AttributeTreeNode GetFather();
604 /*!
605   Assigns the previous brother tree node to the given tree node.
606 */
607     void              SetPrevious(in AttributeTreeNode value);
608 /*!
609   Returns True if there is the previous brother tree node of this tree node.
610 */
611     boolean           HasPrevious();
612 /*!
613   Returns the previous brother tree node of this tree node.
614 */
615     AttributeTreeNode GetPrevious();
616 /*!
617   Sets the next brother tree node to this tree node.
618 */
619     void              SetNext(in AttributeTreeNode value);
620 /*!
621   Returns True if there is the next brother tree node of this tree node.
622 */
623     boolean           HasNext();
624 /*!
625   Returns the previous brother tree node of this tree node.
626 */
627     AttributeTreeNode GetNext();
628 /*!
629   Sets the first child tree node to this tree node.
630 */
631     void              SetFirst(in AttributeTreeNode value);
632 /*!
633   Returns True if there is the first child tree node of this tree node.
634 */
635     boolean           HasFirst();
636 /*!
637   Returns the first child tree node of this tree node.
638 */
639     AttributeTreeNode GetFirst();
640 /*!
641   Sets ID of a tree.
642   \param value String parameter defining the ID of a tree.
643   \note <br>Tree nodes of one tree have the same ID.
644 */
645     void              SetTreeID(in string value);
646 /*!
647   Gets ID of a tree.
648   \return An ID of a tree in the format of a string.
649 */
650     string            GetTreeID();
651
652 /*!
653    Adds a child tree node to the end of the list of children of this tree node.
654 */
655     void              Append(in AttributeTreeNode value);
656 /*!
657    Adds a child tree node to the beginning of the list of children of this tree node.
658
659 */
660     void              Prepend(in AttributeTreeNode value);
661 /*!
662    Adds a brother tree node before this tree node.
663     In this case the both tree nodes will belong to the same father.
664 */
665     void              InsertBefore(in AttributeTreeNode value);
666 /*!
667    Adds a brother tree node after this tree node.
668     In this case the both tree nodes will belong to the same father.
669 */
670     void              InsertAfter(in AttributeTreeNode value);
671 /*!
672    Deletes a tree node.
673
674 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
675
676 */
677     void              Remove();
678
679 /*!
680    Returns  the  depth  of the tree node in the
681    structure, it means the  number of  fathers of the given tree node.
682    (i.e.: the depth of the root tree node is 0).
683 */
684     long              Depth();
685 /*!
686     Returns True if it is a root tree node.
687 */
688     boolean           IsRoot();
689 /*!
690     Returns True if this tree node is a descendant of the tree node.
691 */
692     boolean           IsDescendant(in AttributeTreeNode value);
693 /*!
694     Returns True if this tree node is the father of the tree node.
695 */
696     boolean           IsFather(in AttributeTreeNode value);
697 /*!
698     Returns True if this tree node is a child of the tree node.
699 */
700     boolean           IsChild(in AttributeTreeNode value);
701 /*!
702    Returns ID of the according %SObject.
703 */
704     string            Label();
705   };
706   //==========================================================================
707 /*! \brief LocalID attribute
708
709    Attribute describing the link between a %SObject and a local object in the component.
710 */
711   //==========================================================================
712   interface AttributeLocalID : GenericAttribute
713   {
714 /*!
715    Returns the value of this attribute.
716
717 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
718 */
719     long   Value();
720 /*!
721    Sets the value of this attribute.
722
723    \param value This parameter defines the local ID which will be set.
724
725 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
726 */
727     void   SetValue(in long value);
728   };
729
730   //==========================================================================
731 /*! \brief Attribute storing GUID
732
733     Attribute allowing to store GUID
734 */
735   //==========================================================================
736   interface AttributeUserID : GenericAttribute
737   {
738 /*!
739    Returns the value of this attribute
740
741 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
742 */
743     string Value();
744 /*!
745    Sets the value of this attribute
746
747 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
748 */
749     void   SetValue(in string value);
750   };
751
752   //==========================================================================
753 /*! \brief %AttributeTarget iterface
754
755    This attribute stores the list of all %SObjects that refer
756    to this %SObject. This attribute is used for inner purposes of the application.
757    It is also needed for optimization.
758 */
759   //==========================================================================
760
761   interface AttributeTarget : GenericAttribute
762   {
763 /*!
764     Adds a %SObject to the list of %SObjects which refer to this %SObject.
765
766 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
767
768 */
769     void          Add(in SObject anObject);
770 /*!
771     Returns a list of %SObjects which refer to this %SObject.
772 */
773     SALOMEDS::Study::ListOfSObject Get();
774 /*!
775     Deletes a %SObject from the list of %SObjects which refer to this %SObject.
776
777 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
778
779 */
780     void          Remove(in SObject anObject);
781   };
782   //==========================================================================
783   /*! \brief %AttributeTableOfInteger interface
784
785    This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
786     and string titles of this table, of each row, of each column.
787
788 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
789
790 */
791   //==========================================================================
792
793   interface AttributeTableOfInteger : GenericAttribute
794   {
795 //!  This exception is raised when an incorrect index is passed as parameter.
796     exception IncorrectIndex {};
797 //!  This exception is raised when an incorrect length of the argument is passed as parameter.
798     exception IncorrectArgumentLength {};
799
800     // titles: for table, for each row, for each column
801 /*!
802    Sets the title of the table.
803 */
804     void SetTitle(in string theTitle);
805 /*!
806   Returns the title of the table.
807 */
808     string GetTitle();
809 /*!
810    Sets the title of a row with a definite index.
811 */
812     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
813 /*!
814    Sets the titles for all rows of the table.
815 */
816     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
817 /*!
818    Returns the titles of all rows of the table.
819 */
820     StringSeq GetRowTitles();
821 /*!
822    Sets the title of a column with a definite index.
823 */
824     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
825 /*!
826    Sets the titles for all columns of the table.
827 */
828     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
829 /*!
830    Returns the titles of all columns of the table.
831 */
832     StringSeq GetColumnTitles();
833
834     //Rows units
835 /*!
836    Sets the unit of a row with a definite index.
837 */
838     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
839 /*!
840    Sets the units for all rows of the table.
841 */
842     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
843 /*!
844    Returns the units of all rows of the table.
845 */
846     StringSeq GetRowUnits();
847
848     // table information
849 /*!
850    Returns the number of rows of the table.
851 */
852     long GetNbRows();
853 /*!
854    Returns the number of columns of the table.
855 */
856     long GetNbColumns();
857
858     // operations with rows
859 /*!
860    Adds a row to the end of the table.
861    \param theData A sequence of long values which will be set as elements of the added row.
862 */
863     void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
864 /*!
865    Sets the elements of a definite row.
866    \param theRow The number of the row.
867    \param theData A sequence of long values which will be set as elements of this row.
868
869 */
870     void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
871 /*!
872    Gets the row of the table.
873
874    \param theRow The number of the row.
875    \return A sequence of long values which are set as elements of this row.
876 */
877     LongSeq GetRow(in long theRow) raises(IncorrectIndex);
878
879     // operations with columns
880 /*!
881    Adds a column to the end of the table.
882
883    \param theData A sequence of long values which will be set as elements of this column.
884 */
885     void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
886 /*!
887    Sets the values of all elements of the column.
888
889   \param theData A sequence of long values which will be set as elements of this column.
890 */
891     void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
892 /*!
893    Returns the column of the table.
894 */
895     LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
896
897     // operations with elements
898 /*!
899     Puts a value in the table.
900     \param theRow      The row, where the value will be placed.
901     \param theColumn   The column, where the value will be placed.
902 */
903     void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
904 /*!
905     Returns True if there is a value in the table.
906     \param theRow      The row containing the value
907     \param theColumn   The column containing the value
908 */
909     boolean HasValue(in long theRow, in long theColumn);
910 /*!
911     Returns the value from the table.
912     \param theRow      The row containing the value
913     \param theColumn   The column containing the value
914 */
915     long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
916
917 /*!
918     Sets the max number of colums in the table.
919     \note It'd better to set it before filling the table.
920 */
921     void SetNbColumns(in long theNbColumns);
922
923 /*!
924     Returns the indices of the row where the values are defined.
925 */
926     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
927     // operations with files
928 /*!
929    Reads a table from a file.
930 */
931     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
932 /*!
933    Saves a table into a file.
934 */
935     SALOMEDS::TMPFile SaveToFile();
936   };
937
938   //==========================================================================
939 /*! \brief %AttributeTableOfReal interface
940
941    This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
942     and string titles of this table, of each row, of each column.
943 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
944
945 */
946   //==========================================================================
947
948   interface AttributeTableOfReal : GenericAttribute
949   {
950 //!  This exception is raised when an incorrect index is passed as parameter.
951     exception IncorrectIndex {};
952 //!  This exception is raised when an incorrect length of the argument is passed as parameter.
953     exception IncorrectArgumentLength {};
954
955     // titles: for table, for each row, for each column
956 /*!
957    Sets the title of the table.
958 */
959     void SetTitle(in string theTitle);
960 /*!
961   Returns the title of the table.
962 */
963     string GetTitle();
964 /*!
965    Sets the title of a row with a definite index.
966 */
967     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
968 /*!
969    Sets the titles for all rows of the table.
970 */
971     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
972 /*!
973    Returns the titles of all rows of the table.
974 */
975     StringSeq GetRowTitles();
976 /*!
977    Sets the title of a column with a definite index.
978 */
979     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
980 /*!
981    Sets the titles for all columns of the table.
982 */
983     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
984 /*!
985    Returns the titles of all columns of the table.
986 */
987     StringSeq GetColumnTitles();
988
989     //Rows units
990 /*!
991    Sets the unit of a row with a definite index.
992 */
993     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
994 /*!
995    Sets the units for all rows of the table.
996 */
997     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
998 /*!
999    Returns the units of all rows of the table.
1000 */
1001     StringSeq GetRowUnits();
1002
1003     // table information
1004 /*!
1005    Returns the number of rows of the table.
1006 */
1007     long GetNbRows();
1008 /*!
1009    Returns the number of columns of the table.
1010 */
1011     long GetNbColumns();
1012
1013     // operations with rows
1014 /*!
1015    Adds a row to the end of the table.
1016 */
1017     void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
1018 /*!
1019    Sets the values of all elements of the row.
1020 */
1021     void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1022 /*!
1023    Returns the row of the table.
1024 */
1025     DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1026
1027     // operations with columns
1028 /*!
1029    Adds a column to the end of the table.
1030 */
1031     void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1032 /*!
1033    Sets the values of all elements of the column.
1034 */
1035     void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1036 /*!
1037    Returns the column of the table.
1038 */
1039     DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1040
1041     // operations with elements
1042 /*!
1043     Puts a value in the table.
1044     \param theRow      The row, where the value will be placed.
1045     \param theColumn   The column, where the value will be placed.
1046 */
1047     void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1048 /*!
1049     Returns True if there is a value in the table.
1050     \param theRow      The row containing the value
1051     \param theColumn   The column containing the value
1052 */
1053     boolean HasValue(in long theRow, in long theColumn);
1054 /*!
1055     Returns the value from the table.
1056     \param theRow      The row containing the value
1057     \param theColumn   The column containing the value
1058 */
1059     double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1060
1061 /*!
1062     Sets the max number of colums in the table.
1063     \note It'd better to set it before filling the table.
1064 */
1065     void SetNbColumns(in long theNbColumns);
1066
1067 /*!
1068     Returns the indices of the row where the values are defined.
1069 */
1070     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1071     // operations with files
1072 /*!
1073    Reads a table from a file.
1074 */
1075     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1076 /*!
1077    Saves a table into a file.
1078 */
1079     SALOMEDS::TMPFile SaveToFile();
1080   };
1081
1082
1083
1084   //==========================================================================
1085 /*! \brief %AttributeTableOfString interface
1086
1087    This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1088     and string titles of this table, of each row, of each column.
1089 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
1090
1091 */
1092   //==========================================================================
1093
1094   interface AttributeTableOfString : GenericAttribute
1095   {
1096 //!  This exception is raised when an incorrect index is passed as parameter.
1097     exception IncorrectIndex {};
1098 //!  This exception is raised when an incorrect length of the argument is passed as parameter.
1099     exception IncorrectArgumentLength {};
1100
1101     // titles: for table, for each row, for each column
1102 /*!
1103    Sets the title of the table.
1104 */
1105     void SetTitle(in string theTitle);
1106 /*!
1107   Returns the title of the table.
1108 */
1109     string GetTitle();
1110 /*!
1111    Sets the title of a row with a definite index.
1112 */
1113     void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1114 /*!
1115    Sets the titles for all rows of the table.
1116 */
1117     void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1118 /*!
1119    Returns the titles of all rows of the table.
1120 */
1121     StringSeq GetRowTitles();
1122 /*!
1123    Sets the title of a column with a definite index.
1124 */
1125     void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1126 /*!
1127    Sets the titles for all columns of the table.
1128 */
1129     void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1130 /*!
1131    Returns the titles of all columns of the table.
1132 */
1133     StringSeq GetColumnTitles();
1134
1135     //Rows units
1136 /*!
1137    Sets the unit of a row with a definite index.
1138 */
1139     void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1140 /*!
1141    Sets the units for all rows of the table.
1142 */
1143     void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1144 /*!
1145    Returns the units of all rows of the table.
1146 */
1147     StringSeq GetRowUnits();
1148
1149     // table information
1150 /*!
1151    Returns the number of rows of the table.
1152 */
1153     long GetNbRows();
1154 /*!
1155    Returns the number of columns of the table.
1156 */
1157     long GetNbColumns();
1158
1159     // operations with rows
1160 /*!
1161    Adds a row to the end of the table.
1162 */
1163     void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1164 /*!
1165    Sets the values of all elements of the row.
1166 */
1167     void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1168 /*!
1169    Returns the row of the table.
1170 */
1171     StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1172
1173     // operations with columns
1174 /*!
1175    Adds a column to the end of the table.
1176 */
1177     void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1178 /*!
1179    Sets the values of all elements of the column.
1180 */
1181     void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1182 /*!
1183    Returns the column of the table.
1184 */
1185     StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1186
1187     // operations with elements
1188 /*!
1189     Puts a value in the table.
1190     \param theRow      The row, where the value will be placed.
1191     \param theColumn   The column, where the value will be placed.
1192 */
1193     void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1194 /*!
1195     Returns True if there is a value in the table.
1196     \param theRow      The row containing the value
1197     \param theColumn   The column containing the value
1198 */
1199     boolean HasValue(in long theRow, in long theColumn);
1200 /*!
1201     Returns the value from the table.
1202     \param theRow      The row containing the value
1203     \param theColumn   The column containing the value
1204 */
1205     string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1206
1207 /*!
1208     Sets the max number of colums in the table.
1209     \note It'd better to set it before filling the table.
1210 */
1211     void SetNbColumns(in long theNbColumns);
1212
1213 /*!
1214     Returns the indices of the row where the values are defined.
1215 */
1216     LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1217     // operations with files
1218 /*!
1219    Reads a table from a file.
1220 */
1221     boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1222 /*!
1223    Saves a table into a file.
1224 */
1225     SALOMEDS::TMPFile SaveToFile();
1226   };
1227
1228
1229   //==========================================================================
1230 /*! \brief %AttributeStudyProperties interface
1231
1232    This attribute allows to store study properties: user name, creation date, creation
1233    mode, modified flag, locked flag.
1234 <em>See \ref example20 for an example of usage of these methods in batchmode of %SALOME application.</em>
1235
1236 */
1237   //==========================================================================
1238
1239   interface AttributeStudyProperties : GenericAttribute
1240   {
1241 /*!
1242    Sets the name of the author of the %Study
1243 */
1244     void SetUserName(in string theName);
1245 /*!
1246      Returns the name of the user of the %Study.
1247     \note <BR>It returns a null string, if user name is not set
1248 */
1249     string GetUserName();
1250 /*!
1251    Sets creation date of the %Study.
1252 */
1253     void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1254 /*!
1255      Returns creation date of the %Study and True if creation date is set.
1256 */
1257     boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1258 /*!
1259    Sets creation mode of the %Study.
1260    \note <BR>Creation mode must be: "from scratch" or "copy from".
1261 */
1262     void SetCreationMode(in string theMode);
1263 /*!
1264    Returns creation mode: "from scratch", "copy from", or null string
1265    if creation mode is not set
1266 */
1267     string GetCreationMode();
1268 /*!
1269    Sets the number of transactions executed after the last saving of the document.
1270 */
1271     void SetModified(in long theModified);
1272 /*!
1273     Returns True, if the document has been modified and not saved.
1274 */
1275     boolean IsModified();
1276 /*!
1277   Returns the number of transactions executed after the last saving of the document.
1278 */
1279     long GetModified();
1280 /*!
1281     Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1282 */
1283     void SetLocked(in boolean theLocked);
1284 /*!
1285     Returns True if the document is locked for modifications.
1286 */
1287     boolean IsLocked();
1288 /*!
1289    Appends modification parameters to the modifications list.
1290 */
1291     void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1292 /*!
1293    Returns a list of mosdifiers user names, modification dates.
1294    /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.
1295 */
1296     void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1297   };
1298   //==========================================================================
1299 /*! \brief %AttributePythonObject interface
1300
1301     Attribute allowing to store pyton objects as a sequence of chars.
1302 */
1303   //==========================================================================
1304
1305   interface AttributePythonObject : GenericAttribute
1306   {
1307 /*!
1308    Sets in the attribute a Python object converted into a sequence of chars.
1309    \param theSequence    A sequence of chars.
1310    \param IsScript       Defines (if True) whether this sequence of chars is a Python script.
1311 */
1312     void SetObject(in string theSequence, in boolean IsScript);
1313 /*!
1314     Returns a Python object stored in the attribute as a sequence of chars.
1315 */
1316     string GetObject();
1317 /*!
1318     Returns True if the sequence of bytes stored in the attribute corresponds
1319     to a Python script.
1320 */
1321     boolean IsScript();
1322   };
1323   //==========================================================================
1324 /*! \brief %AttributeParameter interface
1325
1326     Attribute is a universal container of basic types
1327 */
1328   //==========================================================================
1329   interface AttributeParameter : GenericAttribute
1330   {
1331 /*!
1332   Associates a integer value with the ID
1333   \param theID        An ID of a parameter.
1334   \param theValue     A value of the parameter
1335 */
1336     void SetInt(in string theID, in long theValue);
1337 /*!
1338   Returns a int value associated with the given ID
1339   \param theID        An ID of a parameter.
1340 */
1341     long GetInt(in string theID);
1342
1343 /*!
1344   Associates a real value with the ID
1345   \param theID        An ID of a parameter.
1346   \param theValue     A value of the parameter
1347 */
1348     void SetReal(in string theID, in double theValue);
1349 /*!
1350   Returns a real value associated with the given ID
1351   \param theID        An ID of a parameter.
1352 */
1353     double GetReal(in string theID);
1354
1355 /*!
1356   Associates a string value with the ID
1357   \param theID        An ID of a parameter.
1358   \param theValue     A value of the parameter
1359 */
1360     void SetString(in string theID, in string theValue);
1361 /*!
1362   Returns a string value associated with the given ID
1363   \param theID        An ID of a parameter.
1364 */
1365     string GetString(in string theID);
1366   
1367 /*!
1368   Associates a boolean value with the ID
1369   \param theID        An ID of a parameter.
1370   \param theValue     A value of the parameter
1371 */
1372     void SetBool(in string theID, in boolean theValue);
1373 /*!
1374   Returns a boolean value associated with the given ID
1375   \param theID        An ID of a parameter.
1376 */
1377     boolean GetBool(in string theID);
1378   
1379 /*!
1380   Associates an array of real values with the ID
1381   \param theID        An ID of a parameter.
1382   \param theArray     The array of real values
1383 */
1384     void SetRealArray(in string theID, in DoubleSeq theArray);
1385 /*!
1386   Returns an array of real values associated with the ID
1387   \param theID        An ID of a parameter.
1388 */
1389     DoubleSeq GetRealArray(in string theID);
1390
1391 /*!
1392   Associates an array of integer values with the ID
1393   \param theID        An ID of a parameter.
1394   \param theArray     The array of integer values
1395 */
1396     void SetIntArray(in string theID, in LongSeq theArray);
1397 /*!
1398   Returns an array of integer values associated with the ID
1399   \param theID        An ID of a parameter.
1400 */
1401     LongSeq GetIntArray(in string theID);
1402
1403 /*!
1404   Associates an array of string values with the ID
1405   \param theID        An ID of a parameter.
1406   \param theArray     The array of string values
1407 */
1408     void SetStrArray(in string theID, in StringSeq theArray);
1409 /*!
1410   Returns an array of string values associated with the ID
1411   \param theID        An ID of a parameter.
1412 */
1413     StringSeq GetStrArray(in string theID);
1414 /*!
1415   Returns True if for the ID of given type was assigned a value in the attribute
1416   \param theID        An ID of a parameter.
1417   \param theType      A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1418 */
1419     boolean IsSet(in string theID, in long theType);
1420 /*!
1421   Removes a parameter with given ID and Type, returns True if succeded
1422   \param theID        An ID of a parameter.
1423   \param theType      A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1424 */
1425     boolean RemoveID(in string theID, in long theType);
1426 /*!
1427    Returns a father attribute of this attribute
1428 */
1429     AttributeParameter GetFather();
1430 /*!
1431    Returns True if this attribute has a father attribute
1432 */
1433     boolean HasFather();
1434 /*!
1435    Returns True if this attribute is a root attribute
1436 */
1437     boolean IsRoot();
1438 /*!
1439    Clears the content of the attribute
1440 */
1441     void Clear();
1442 /*!   
1443   Returns a sequence of ID's of the give type
1444   \param theType      A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1445  */ 
1446     StringSeq GetIDs(in long theType);
1447   };
1448 };
1449 #endif