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