Salome HOME
3a222d6114b8723c81295ba33448887741447845
[modules/kernel.git] / idl / SALOMEDS_Attributes.idl
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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
23 //  File   : SALOMEDS_Attributes.idl
24 //  Author : Yves FRICAUD
25 //  $Header$
26 //
27 /*! \file SALOMEDS_Attributes.idl 
28     \brief This file contains a set of interfaces
29     for the attributes which can be assigned to SObject
30 */
31 #ifndef _SALOMEDS_AttributesIDL_
32 #define _SALOMEDS_AttributesIDL_
33
34 #include "SALOMEDS.idl"
35
36 module SALOMEDS
37 {
38   //! Sequence of double values
39   typedef sequence <double> DoubleSeq;
40   //! Sequence of long values
41   typedef sequence <long>   LongSeq;
42   //! Sequence of string values
43   typedef sequence <string> StringSeq;
44
45   /*!
46     \brief Represents the color based on RGB palette.
47     
48     Used by different interfaces to specify the color attributes of different items.
49   */
50   struct Color {
51     //! Red component of the color
52     double R;
53     //! Green component of the color
54     double G;
55     //! Blue component  of the color
56     double B;
57   };
58
59   //==========================================================================
60   /*!
61     \brief Attribute allowing to store a real value
62
63     <em>See \ref example1 for an example of this attribute usage in batchmode of %SALOME application.</em>
64
65     \sa AttributeInteger, AttributeString
66   */
67   //==========================================================================
68   interface AttributeReal : GenericAttribute
69   {
70     /*!
71       \brief Returns the value of the attribute.
72       \return attribute value
73     */
74     double Value();
75     /*!
76       \brief Sets the value of the attribute
77       \param value value being set to the attribute
78     */
79     void   SetValue(in double value);
80
81   };
82
83   //==========================================================================
84   /*!
85     \brief Attribute allowing to store an %integer value
86
87     <em>See \ref example17 for an example of this attribute usage in batchmode of %SALOME application.</em>
88
89     \sa AttributeReal, AttributeString
90   */
91   //==========================================================================
92   interface AttributeInteger : GenericAttribute
93   {
94     /*!
95       \brief Returns the value of the attribute.
96       \return attribute value
97     */
98     long   Value();
99
100     /*!
101       \brief Sets the value of the attribute
102       \param value value being set to the attribute
103     */
104     void   SetValue(in long value);
105   };
106
107   //==========================================================================
108   /*!
109     \brief Attribute allowing to store a sequence of real values.
110     \note The indices in the sequence start from 1.
111
112     <em>See \ref example3 for an example of this attribute usage in batchmode of %SALOME application.</em>
113
114     \sa AttributeSequenceOfInteger
115   */
116   //==========================================================================
117   interface AttributeSequenceOfReal : GenericAttribute
118   {
119     /*!
120       \brief Initialization of the attribute with initial data.
121       \param other sequence of values assigned to the attribute
122     */
123     void      Assign (in DoubleSeq other);
124     /*! 
125       \brief Returns the sequence of values stored in the attribute.
126       \return sequence of values
127     */
128     DoubleSeq CorbaSequence();
129     /*!
130       \brief Adds new value to the end of the sequence.
131       \param value value being added to the sequence
132     */
133     void      Add (in double value);
134     /*!
135       \brief Removes a value by the specified \a index
136              from the sequence stored in the attribute.
137       \param index index of the value in the sequence to be removed
138     */
139     void      Remove(in long index);
140     /*!
141       \brief Sets new value to the sequence by the specified \a index.
142       \param index index in the sequence
143       \param value new value being set to the sequence by specified \a index
144     */
145     void      ChangeValue(in long index, in double value);
146     /*!
147       \brief Returns a value in the sequence specified by its \a index.
148       \param index index in the sequence
149       \return value specified by \a index
150     */
151     double    Value(in short index);
152     /*!
153       \brief Returns the length of the sequence stored in the attribute.
154       \return sequence length
155     */
156     long      Length();
157   };
158   
159   //==========================================================================
160   /*!
161     \brief Attribute allowing to store a sequence of %integer values.
162     \note The indices in the sequence start from 1.
163
164     <em>See \ref example4 for an example of this attribute usage in batchmode of %SALOME application.</em>
165
166     \sa AttributeSequenceOfReal
167    */
168   //==========================================================================
169   interface AttributeSequenceOfInteger : GenericAttribute
170   {
171     /*!
172       \brief Initialization of the attribute with initial data.
173       \param other sequence of values assigned to the attribute
174     */
175     void      Assign (in LongSeq other);
176     /*! 
177       \brief Returns the sequence of values stored in the attribute.
178       \return sequence of values
179     */
180     LongSeq   CorbaSequence();
181     /*!
182       \brief Adds new value to the end of the sequence.
183       \param value value being added to the sequence
184     */
185     void      Add (in long value);
186     /*!
187       \brief Removes an value by the specified \a index
188              from the sequence stored in the attribute.
189       \param index index of the value in the sequence to be removed
190     */
191     void      Remove(in long index);
192     /*!
193       \brief Sets new value to the sequence by the specified \a index.
194       \param index index in the sequence
195       \param value new value being set to the sequence by specified \a index
196     */
197     void      ChangeValue(in long index, in long value);
198     /*!
199       \brief Returns a value in the sequence specified by its \a index.
200       \param index index in the sequence
201       \return value specified by \a index
202     */
203     long      Value(in short index);
204     /*!
205       \brief Returns the length of the sequence stored in the attribute.
206       \return sequence length
207     */
208     long      Length();
209   };
210
211   //==========================================================================
212   /*!
213     \brief Name attribute
214
215     The attribute stores a string value, which corresponds to the name of the SObject
216     or to the name of corresponding %object.
217
218     <em>See \ref example5 for an example of this attribute usage in batchmode of %SALOME application.</em>
219     
220     \sa AttributeComment
221   */
222   //==========================================================================
223   interface AttributeName : GenericAttribute
224   {
225     /*!
226       \brief Returns the value assigned to the attribute.
227       \return attribute value
228     */
229     string Value();
230     /*!
231       \brief Sets the value of the attribute (name of a SObject).
232       \param value value being set to the attribute
233     */
234     void   SetValue(in string value);
235   };
236
237   //==========================================================================
238   /*!
239     \brief Comment attribute
240
241     The attribute stores arbitrary string value containing supplementary information about
242     the SObject. This is common-usage attribute that can be used for any purpose.
243
244     There is only one explicit limitation: for the SComponent %object representing
245     the root item of the SALOME component tree, the AttributeComment is used to store
246     component data type value. This attribute is automatically set with NewComponent()
247     function of StudyBuilder. Also, the value of this attribute is returned by the 
248     ComponentDataType() function of SComponent interface.
249     
250     <em>See \ref example6 for an example of this attribute usage in batchmode of %SALOME application.</em>
251       
252     \sa AttributeName
253   */
254   //==========================================================================
255   interface AttributeComment : GenericAttribute
256   {
257     /*!
258       \brief Returns the value of the attribute.
259       \return attribute value
260     */
261     string Value();
262     /*!
263       \brief Sets the value of the attribute (description of a SObject).
264       \param value value being set to the attribute
265     */
266     void   SetValue(in string value);
267   };
268
269   //==========================================================================
270   /*!
271     \brief String attribute
272     
273     The attribute stores a string value containing arbitrary information.
274     \sa AttributeInteger, AttributeReal
275   */
276   //==========================================================================
277   interface AttributeString : GenericAttribute
278   {
279     /*!
280       \brief Returns the value of the attribute.
281       \return attribute value
282     */
283     string Value();
284     /*!
285       \brief Sets the value of the attribute.
286       \param value value being set to the attribute
287     */
288     void   SetValue(in string value);
289   };
290
291   //==========================================================================
292   /*!
293     \brief IOR attribute
294     
295     The attribute stores a string value identifying a runtime %object. 
296     In particular it contains CORBA Interoperable Object Reference.
297
298     <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
299
300     \sa AttributePersistentRef
301   */
302   //==========================================================================
303   interface AttributeIOR : GenericAttribute
304   {
305     /*!
306       \brief Returns the value of the attribute.
307       \return attribute value
308     */
309     string Value();
310     /*!
311       \brief Sets the value of the attribute (IOR of a SObject).
312       \param value value being set to the attribute.
313     */
314     void   SetValue(in string value);
315   };
316
317   //==========================================================================
318   /*!
319     \brief Persistent reference attribute
320     
321     The attribute stores a persistent identifier of the %object. It is a part
322     of SALOME persistence mechanism .
323
324     <em>See \ref example7 for an example of this method usage in batchmode of %SALOME application.</em>
325
326     \sa AttributeIOR
327   */
328   //==========================================================================
329   interface AttributePersistentRef : GenericAttribute
330   {
331     /*!
332       \brief Returns the value of the attribute.
333       \return attribute value
334     */
335     string Value();
336     /*!
337       \brief Sets the value of the attribute.
338       \param value Value being set to the attribute
339     */
340     void   SetValue(in string value);
341   };
342
343   //==========================================================================
344   /*!
345     \brief External file definition.
346     
347     The attribute stores a path to an external file.
348     
349     \sa AttributeFileType
350   */
351   //==========================================================================
352   interface AttributeExternalFileDef: GenericAttribute
353   {
354     /*!
355       \brief Returns the value of the attribute.
356       \return attribute value
357     */
358     string Value();
359     /*!
360       \brief Sets the value of the attribute.
361       \param value value being set to the attribute
362     */
363     void   SetValue(in string value);
364   };
365
366   //==========================================================================
367   /*!
368     \brief External file type definition.
369
370     The attribute stores an external file type.
371
372     \sa AttributeExternalFileDef
373   */
374   //==========================================================================
375   interface AttributeFileType: GenericAttribute
376   {
377     /*!
378       \brief Returns the value of the attribute.
379       \return attribute value
380     */
381     string Value();
382     /*!
383       \brief Sets the value of the attribute.
384       \param value value being set to the attribute
385     */
386     void   SetValue(in string value);
387   };
388
389   //==========================================================================
390   // Presentation attributes (parameters of the object displaying in the Object browser)
391   //==========================================================================
392
393   //==========================================================================
394   /*!
395     \brief Drawable flag attribute.
396
397     This presentation attribute specifies if the parent SObject should be displayed
398     in the study tree in the Object browser.
399
400     If this attribute is defined for the parent %object and set to \c false, the item
401     is not displayed in the Object browser. By default, the item is always displayed.
402
403     <em>See \ref example8 for an example of this attribute usage in batchmode of %SALOME application.</em>
404
405     \sa AttributeExpandable, AttributeSelectable
406   */
407   //==========================================================================
408   interface AttributeDrawable : GenericAttribute
409   {
410     /*!
411       \brief Returns the value of the attribute.
412       \return \c true if the item is drawable or \c false otherwise
413     */
414     boolean IsDrawable();
415     /*!
416       \brief Sets the value of the attribute.
417       \param value value being set to the attribute (\c true if item should be drawable or \c false otherwise)
418     */
419     void    SetDrawable(in boolean value);
420   };
421
422   //==========================================================================
423   /*!
424     \brief Selectable flag attribute.
425
426     This presentation attribute specifies if the parent SObject is selectable
427     by the user in the Object browser.
428     If this attribute is defined for the parent %object and set to \c false, the item
429     is not selectable in the Object browser. By default, the item is always selectable.
430
431     <em>See \ref example9 for an example of this attribute usage in batchmode of %SALOME application.</em>
432
433     \sa AttributeDrawable, AttributeExpandable
434   */
435   //==========================================================================
436   interface AttributeSelectable : GenericAttribute
437   {
438     /*!
439       \brief Returns the value of the attribute.
440       \return \c true if the item is selectable or \c false otherwise
441     */
442     boolean IsSelectable();
443     /*!
444       \brief Sets the value of the attribute.
445       \param value value being set to the attribute (\c true if item should be selectable or \c false otherwise)
446     */
447     void    SetSelectable(in boolean value);
448   };
449
450   //==========================================================================
451   /*!
452     \brief Expandable flag attribute.
453
454     This presentation attribute specifies if the parent SObject can be expanded
455     by the user in the Object browser (to show its child objects).
456     If this attribute is defined for the parent %object and set to \c false, the item
457     is not expandable in the Object browser. By default, the item is always expandable
458     (if it has children).
459     
460     <em>See \ref example10 for an example of this attribute usage in batchmode of %SALOME application.</em>
461
462     \sa AttributeDrawable, AttributeSelectable
463   */
464   //==========================================================================
465   interface AttributeExpandable : GenericAttribute
466   {
467     /*!
468       \brief Returns the value of the attribute.
469       \return \c true if the item is expandable or \c false otherwise
470     */
471     boolean IsExpandable();
472     /*!
473       \brief Sets the value of the attribute.
474       \param value value being set to the attribute (\c true if item should be expandable or \c false otherwise)
475     */
476     void    SetExpandable(in boolean value);
477   };
478
479   //==========================================================================
480   /*!
481     \brief Flags attribute.
482
483     The interface is intended for storing different %object attributes that
484     have only two states: 0 (\c false) or 1 (\c true).
485     \note The interpretation of the flag values attribute is a matter of the user.
486     \note The total number of flags which can be stored in a single attribute
487     is defined by the size of CORBA::Long data type.
488   */
489   //==========================================================================
490
491   interface AttributeFlags : GenericAttribute
492   {
493     /*!
494       \brief Returns the value of the attribute.
495       \return set of flags currently set to the attribute
496     */
497     long    GetFlags();
498     /*!
499       \brief Sets the value of the attribute.
500       \param flags new set of flags to be stored in the attribute
501     */
502     void    SetFlags(in long flags);
503     /*!
504       \brief Test the value for the specified flag or set of flags.
505       \param flags flag or set of flags being tested.
506       \return \c true if all bits correspoding to the \a flags are currently set or \c false otherwise
507     */
508     boolean Get(in long flags);
509     /*!
510       \brief Set/clear specific flag or set of flags.
511       \param flags flag or set of flags being set / cleared
512       \param value \c true if all bits correspoding to the \a flags should be set
513               or \c false if flag(s) should be cleared
514     */
515     void    Set(in long flags, in boolean value);
516   };
517
518   //==========================================================================
519   /*!
520     \brief Graphic attribute.
521
522     This interface is intended for storing information about graphical representation
523     of the %object in different views.
524   */
525   //==========================================================================
526   interface AttributeGraphic : GenericAttribute
527   {
528     /*!
529       \brief Set / clear visibility flag of the parent SObject for the view
530              specified by \a viewId.
531       \param viewId view identifier
532       \param value visibility flag value being set to the attribute
533     */
534     void     SetVisibility(in long viewId, in boolean value);
535     /*!
536       \brief Get visibility flag of the parent SObject for the view
537              specified by \a viewId.
538       \param viewId view identifier
539       \return visibility flag currently set to the attribute for the specified view
540     */
541     boolean  GetVisibility(in long viewId);
542   };  
543
544   //==========================================================================
545   /*!
546     \brief Opened flag Attribute
547     \warning Deprecated interface. Not used since version 3.0.
548
549     This presentation attribute specifies if the item corresponding to the
550     parent SObject in the Object browser is currently opened (expanded) or no.
551   */
552   //==========================================================================
553   interface AttributeOpened : GenericAttribute
554   {
555     /*!
556       \brief Returns the value of the attribute.
557       \obsolete
558       \return \c true if the item is opened (expanded) in the Object browser or \c false otherwise
559     */
560     boolean IsOpened();
561     /*!
562       \brief Sets the value of the attribute.
563       \obsolete
564       \param value value being set to the attribute (\c true if item should 
565                    be opened (expanded) or \c false otherwise)
566     */
567     void    SetOpened(in boolean value);
568   };
569
570   //==========================================================================
571   /*!
572     \brief Text color attribute.
573
574     This attribute allows to specify the text color to be used to render the item
575     in the Object browser. If the attribute is not set for the SObject, default
576     value (GUI specific) is used.
577
578     <em>See \ref example12 for an example of this attribute usage in batchmode of %SALOME application.</em>
579
580     \sa AttributeTextHighlightColor, AttributePixMap
581   */
582   //==========================================================================
583   interface AttributeTextColor : GenericAttribute
584   {
585     /*!
586       \brief Returns the value of the attribute.
587       \return text color assigned to the attribute
588     */
589     Color  TextColor();
590     /*!
591       \brief Sets the value of the attribute.
592       \param value text color value being set to the attribute
593     */
594     void   SetTextColor(in Color value);
595   };
596
597   //==========================================================================
598   /*!
599     \brief Text highlight color attribute.
600     
601     This attribute allows to specify the highlight color to be used to render
602     the item in the Object browser (used only when the item is selected).
603     If the attribute is not set for the SObject, default value (GUI specific) is used.
604
605     <em>See \ref example13 for an example of this attribute usage in batchmode of %SALOME application.</em>
606
607     \sa AttributeTextColor, AttributePixMap
608   */
609   //==========================================================================
610   interface AttributeTextHighlightColor : GenericAttribute
611   {
612     /*!
613       \brief Returns the value of the attribute.
614       \return highlight color assigned to the attribute
615     */
616     Color  TextHighlightColor();
617     /*!
618       \brief Sets the value of the attribute.
619       \param value highlight color value being set to the attribute
620     */
621     void   SetTextHighlightColor(in Color value);
622   };
623
624   //==========================================================================
625   /*!
626     \brief Icon attribute.
627     
628     This attribute is used to specifiy the name (file name) of an icon which
629     should be drawn in the Object browser when rendering an item.
630
631     <em>See \ref example14 for an example of this attribute usage in batchmode of %SALOME application.</em>
632
633     \sa AttributeTextColor, AttributeTextHighlightColor
634   */
635   //==========================================================================
636   interface AttributePixMap : GenericAttribute
637   {
638     /*!
639       Checks if the pixmap is assigned to the attribute.
640       \return \c true if an icon file name is set to the attribute
641     */
642     boolean HasPixMap();
643     /*!
644       \brief Returns the value of the attribute.
645       \return icon file name assigned to the attribute (empty string if not set)
646     */
647     string  GetPixMap();
648     /*!
649       \brief Sets the value of the attribute.
650       \param icom file name being set to the attribute
651     */
652     void    SetPixMap(in string value);
653   };
654
655   //==========================================================================
656   /*!
657     \brief Tree node attribute.
658
659     By specifying the tree node attributes for the SObjects it is possible to
660     create internal auxillary %object tree with its own structure and identifier.
661
662     Since each such tree is specfied by the unique identifier, it is possible
663     to create as many trees as it is required.
664     
665     <em>See \ref example18 for an example of usage of this attribute in batchmode of %SALOME application.</em>
666   */
667   //==========================================================================
668   interface AttributeTreeNode : GenericAttribute
669   {
670     /*!
671       \brief Assigns the father tree node to this tree node.
672       \param father tree node attribute being set as a parent of this tree node
673     */
674     void              SetFather(in AttributeTreeNode father);
675     /*!
676       \brief Checks if father tree node attribute is set for this tree node.
677       \return \c true if father tree node attribute is defined or \c false otherwise
678     */
679     boolean           HasFather();
680     /*!
681       \brief Returns the father tree node of this tree node.
682       \return father tree node attribute
683     */
684     AttributeTreeNode GetFather();
685     /*!
686       \brief Assigns the previous sibling tree node to this tree node.
687       \param sibling tree node attribute being set as a previous sibling of this tree node
688     */
689     void              SetPrevious(in AttributeTreeNode sibling);
690     /*!
691       \brief Checks if previous sibling tree node attribute is set for this tree node.
692       \return \c true if previous sibling tree node attribute is defined or \c false otherwise
693     */
694     boolean           HasPrevious();
695     /*!
696       \brief Returns the previous sibling tree node of this tree node.
697       \return previous sibling tree node attribute
698     */
699     AttributeTreeNode GetPrevious();
700     /*!
701       \brief Assigns the next sibling tree node to this tree node.
702       \param sibling tree node attribute being set as a next sibling of this tree node
703     */
704     void              SetNext(in AttributeTreeNode sibling);
705     /*!
706       \brief Checks if next sibling tree node attribute is set for this tree node.
707       \return \c true if next sibling tree node attribute is defined or \c false otherwise
708     */
709     boolean           HasNext();
710     /*!
711       \brief Returns the next sibling tree node of this tree node.
712       \return next sibling tree node attribute
713     */
714     AttributeTreeNode GetNext();
715     /*!
716       \brief Sets the specified tree node as a first child of this tree node.
717       \param child tree node attribute being set filrst child of this tree node
718     */
719     void              SetFirst(in AttributeTreeNode child);
720     /*!
721       \brief Checks if first child tree node attribute is set for this tree node.
722       \return \c true if first child tree node attribute is defined or \c false otherwise
723     */
724     boolean           HasFirst();
725     /*!
726       \brief Returns the first child tree node of this tree node.
727       \return first child tree node attribute
728     */
729     AttributeTreeNode GetFirst();
730     /*!
731       \brief Sets identifier of the parent tree to this tree node.
732       \note All tree nodes which belong to the same tree, should have the same identifier.
733       \param ID identifier (arbitrary non-empty string) being set for this tree node
734     */
735     void              SetTreeID(in string ID);
736     /*!
737       \brief Returns identifier of the parent tree.
738       \return parent tree identifier
739     */
740     string            GetTreeID();
741     /*!
742       \brief Appends specified tree node to the end of the children list of this tree node.
743       \param child tree node being added to the list of children
744     */
745     void              Append(in AttributeTreeNode child);
746     /*!
747       \brief Puts specified tree node to the beginning of the children list of this tree node.
748       \param child tree node being added to the list of children
749     */
750     void              Prepend(in AttributeTreeNode child);
751     /*!
752       \brief Insert specified tree node as a previous child in the parent tree node's children list.
753       \param child tree node being inserted to the parent tree node
754     */
755     void              InsertBefore(in AttributeTreeNode child);
756     /*!
757       \brief Insert specified tree node as a next child in the parent tree node's children list.
758       \param child tree node being inserted to the parent tree node
759     */
760     void              InsertAfter(in AttributeTreeNode child);
761     /*!
762       \brief Removes this tree node.
763     */
764     void              Remove();
765     /*!
766       \brief Returns the depth of the tree node in the tree structure. The resulting value
767       it equal to the number of the fathers of this tree node.
768       \note The depth of the root tree node is 0.
769       \return tree node's depth
770     */
771     long              Depth();
772     /*!
773       \brief Checks if the tree node is a root of the tree.
774       \return \c true if it is a root tree node or \c false otherwise
775     */
776     boolean           IsRoot();
777     /*!
778       \brief Checks if the tree node is a descendant of the specified tree node.
779       \param other tree node that is tested for being ancestor of this tree node
780       \return \c true if this node is descendant of the \a other node or \c false otherwise
781     */
782     boolean           IsDescendant(in AttributeTreeNode other);
783     /*!
784       \brief Checks if this tree node is a parent of the specified tree node \a other.
785       \param other tree node that is tested for being father of this tree node
786       \return \c true if this node is father of the \a other node or \c false otherwise
787     */
788     boolean           IsFather(in AttributeTreeNode other);
789     /*!
790       \brief Checks if this tree node is a child of the specified tree node \a other.
791       \param other tree node that is tested for being child of this tree node
792       \return \c true if this node is child of the \a other node or \c false otherwise
793     */
794     boolean           IsChild(in AttributeTreeNode other);
795     /*!
796       \brief Returns string identifier of the owner SObject (e.g. "0:1:2").
797       \return string entry of the owner SObject
798     */
799     string            Label();
800   };
801
802   //==========================================================================
803   /*!
804     \brief Local identifier attribute
805     
806     This attribute can be used for identification of the SObject (for example by type).
807
808     <em>See \ref example15 for an example of this atrtibute usage in batchmode of %SALOME application.</em>
809
810     \sa AttributeUserID
811   */
812   //==========================================================================
813   interface AttributeLocalID : GenericAttribute
814   {
815     /*!
816       \brief Returns the value of the attribute.
817       \return attribute value
818     */
819     long   Value();
820     /*!
821       \brief Sets the value of the attribute
822       \param value value being set to the attribute
823     */
824     void   SetValue(in long value);
825   };
826
827   //==========================================================================
828   /*!
829     \brief Attribute storing GUID.
830     
831     This attribute can be used to store arbitrary GUID. Attribute allowing to store GUID.
832     In contrast to any other atribute (e.g. AttributeLocalID), it is possible to
833     define as many GUID attributes for the same SObject as it is required provided that
834     they have different GUID values.
835
836     \sa AttributeLocalID
837   */
838   //==========================================================================
839   interface AttributeUserID : GenericAttribute
840   {
841     /*!
842       \brief Returns the value of the attribute.
843       \return attribute value
844     */
845     string Value();
846     /*!
847       \brief Sets the value of the attribute
848       \param value value being set to the attribute
849     */
850     void   SetValue(in string value);
851   };
852
853   //==========================================================================
854   /*!
855     \brief Back references attribute.
856     \internal
857
858    This attribute is used to store back references to all the SObjects that refer
859    to the owner SObject.
860    
861    This attribute is used for inner purposes (in particular, for performance 
862    optimization).
863   */
864   //==========================================================================
865
866   interface AttributeTarget : GenericAttribute
867   {
868     /*!
869       Adds specified SObject to the list of SObjects which refer to the owner SObject.
870       \param refobj %SObject being added to the list
871     */
872     void          Add(in SObject refobj);
873     /*!
874       Returns a list of SObjects which refer to the owner SObject.
875       \return list of SObject referencing to the owher SObject
876     */
877     SALOMEDS::Study::ListOfSObject Get();
878     /*!
879       Removes specified SObject from the list of SObjects which refer to the owner SObject.
880       \param refobj %SObject being removed to the list
881     */
882     void          Remove(in SObject anObject);
883   };
884   
885   //==========================================================================
886   /*!
887     \brief Generic table attribute.
888
889     Used as base interface for the AttributeTableOfInteger, AttributeTableOfReal
890     and AttributeTableOfString. Provides functions which are common for all table
891     attributes.
892
893     \note The indices of rows and columns in the table start from 1.
894     \sa AttributeTableOfInteger, AttributeTableOfReal, AttributeTableOfString
895   */
896   //==========================================================================
897
898   interface AttributeTable : GenericAttribute
899   {
900     //! This exception is raised when an invalid (out of range) index is passed as parameter.
901     exception IncorrectIndex {};
902     //! This exception is raised when sequence of incorrect length is passed as parameter.
903     exception IncorrectArgumentLength {};
904
905     //! Sort order
906     enum SortOrder { 
907       AscendingOrder,  //!< The items are sorted ascending
908       DescendingOrder  //!< The items are sorted descending
909     };
910
911     //! Sort policy (specifies how empty cells are taken into account when sorting)
912     enum SortPolicy {
913       EmptyLowest,     //!< Empty cells are considered as lowest values
914       EmptyHighest,    //!< Empty cells are considered as highest values
915       EmptyFirst,      //!< Empty cells are always first
916       EmptyLast,       //!< Empty cells are always last
917       EmptyIgnore      //!< Empty cells are ignored (stay at initial positions)
918     };
919
920     /*!
921       \brief Sets the main title of the table.
922       \param title title being set to the table
923       \sa GetTitle()
924     */
925     void SetTitle(in string title);
926     /*!
927       \brief Returns the title of the table.
928       \return table title (empty string if not set)
929       \sa SetTitle()
930     */
931     string GetTitle();
932     /*!
933       \brief Sets the title of a row with specified index.
934
935       Raises an exception if \a row is out of range.
936
937       \param row row index
938       \param title title being set to the row
939       \sa GetRowTitle()
940     */
941     void SetRowTitle(in long row, in string title) raises(IncorrectIndex);
942     /*!
943       \brief Returns the title of a row with specified index.
944
945       Raises an exception if \a row is out of range.
946
947       \param row row index
948       \return row title (empty string if not set)
949       \sa SetRowTitle()
950     */
951     string GetRowTitle(in long row) raises(IncorrectIndex);
952     /*!
953       \brief Sets the titles for all rows in the table.
954
955       Raises an exception if length of the \a titles parameter is not equal
956       to the number of rows in the table.
957
958       \param titles titles being set to the table rows
959       \sa GetRowTitles()
960     */
961     void SetRowTitles(in StringSeq titles) raises(IncorrectArgumentLength);
962     /*!
963       \brief Returns the titles of all rows of the table.
964       \return list of all rows titles
965       \sa SetRowTitles()
966     */
967     StringSeq GetRowTitles();
968     /*!
969       \brief Sets the title of a column with specified index.
970
971       Raises an exception if \a column is out of range.
972
973       \param column column index
974       \param title title being set to the column
975       \sa GetColumnTitle()
976     */
977     void SetColumnTitle(in long column, in string title) raises(IncorrectIndex);
978     /*!
979       \brief Returns the title of a column with specified index.
980
981       Raises an exception if \a column is out of range.
982
983       \param column column index
984       \return column title (empty string if not set)
985       \sa SetColumnTitle()
986     */
987     string GetColumnTitle(in long column) raises(IncorrectIndex);
988     /*!
989       \brief Sets the titles for all columns in the table.
990
991       Raises an exception if length of the \a titles parameter is not equal
992       to the number of columns in the table.
993
994       \param titles titles being set to the table columns
995       \sa GetColumnTitles()
996     */
997     void SetColumnTitles(in StringSeq titles) raises(IncorrectArgumentLength);
998     /*!
999       \brief Returns the titles of all columns of the table.
1000       \return list of all columns titles
1001       \sa SetColumnTitles()
1002     */
1003     StringSeq GetColumnTitles();
1004     /*!
1005       \brief Assigns the unit label to the row with specified index.
1006
1007       Raises an exception if \a row is out of range.
1008
1009       \param row row index
1010       \param unit unit label being set to the row
1011       \sa GetRowUnit()
1012     */
1013     void SetRowUnit(in long row, in string unit) raises(IncorrectIndex);
1014     /*!
1015       \brief Returns the unit label of a row with specified index.
1016
1017       Raises an exception if \a row is out of range.
1018
1019       \param row row index
1020       \return row unit label (empty string if not set)
1021       \sa SetRowUnit()
1022     */
1023     string GetRowUnit(in long row) raises(IncorrectIndex);
1024     /*!
1025       \brief Sets the unit labels for all rows in the table.
1026
1027       Raises an exception if length of the \a units parameter is not equal
1028       to the number of rows in the table.
1029
1030       \param units unit labels being set to the table rows
1031       \sa GetRowUnits()
1032     */
1033     void SetRowUnits(in StringSeq units) raises(IncorrectArgumentLength);
1034     /*!
1035       \brief Returns the unit labels of all rows of the table.
1036       \return list of all rows unit labels
1037       \sa SetRowUnits()
1038     */
1039     StringSeq GetRowUnits();
1040     /*!
1041       \brief Returns the number of rows of the table.
1042       \return rows count
1043       \sa GetNbColumns()
1044     */
1045     long GetNbRows();
1046     /*!
1047       \brief Returns the number of columns of the table.
1048       \return columns count
1049       \sa GetNbRows(), SetNbColumns()
1050     */
1051     long GetNbColumns();
1052     /*!
1053       \brief Check if the value is set for the cell with specified \a row and \a column indices.
1054       \param row    row index
1055       \param column column index
1056       \return \c true if value is set for the specified cell or \c false otherwise
1057               (or if row/column index is/are out of range)
1058     */
1059     boolean HasValue(in long row, in long column);
1060     /*!
1061       \brief Clear value in the specified table cell.
1062       
1063       Raises an exception if \a row or \a column is out of range.
1064
1065       \param row    row index
1066       \param column column index
1067       \sa HasValue()
1068     */
1069     void RemoveValue(in long row, in long column) raises(IncorrectIndex);
1070     /*!
1071       \brief Sets the maximum number of colums in the table.
1072
1073       If new number of columns is less than the current one, the table is truncated
1074       (extra columns are removed).
1075
1076       \note It is recommended to set number of columns before assigning data to the table.
1077
1078       \param columns total number of columns being set for the table
1079       \sa GetNbColumns()
1080     */
1081     void SetNbColumns(in long columns);
1082     /*!
1083       \brief Returns the indices of the columns in the specified \a row for which
1084       values are set.
1085
1086       Raises an exception if \a row is out of range.
1087
1088       \param row    row index
1089       \return list of column indices
1090     */
1091     LongSeq GetRowSetIndices(in long row) raises(IncorrectIndex);
1092     /*!
1093       \brief Sort values in the specified table row.
1094       
1095       Sort order is specified by the \a order parameter. The \a policy
1096       specifies how to process empty cells (put to the first place, ignore, etc).
1097
1098       Raises an exception if \a row is out of range.
1099
1100       \note Other table rows are not affected.
1101       
1102       \param row row index
1103       \param order sort order (ascending/descending)
1104       \param policy sort policy (specifies how to process empty cells)
1105       \return list of mixed column indices
1106     */
1107     LongSeq SortRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1108     /*!
1109       \brief Sort values in the specified table column.
1110       
1111       Sort order is specified by the \a order parameter. The \a policy
1112       specifies how to process empty cells (put to the first place, ignore, etc).
1113
1114       Raises an exception if \a column is out of range.
1115
1116       \note Other table columns are not affected.
1117       
1118       \param column column index
1119       \param order sort order (ascending/descending)
1120       \param policy sort policy (specifies how to process empty cells)
1121       \return list of mixed row indices
1122     */
1123     LongSeq SortColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1124     /*!
1125       \brief Sort table columns by the specified row.
1126       
1127       All the table columns are sorted according to the values in the specified
1128       row. Sort order is specified by the \a order parameter. The \a policy
1129       specifies how to process empty cells (put to the first place, ignore, etc).
1130       
1131       Raises an exception if \a row is out of range.
1132
1133       \param row row index
1134       \param order sort order (ascending/descending)
1135       \param policy sort policy (specifies how to process empty cells)
1136       \return list of mixed column indices
1137     */
1138     LongSeq SortByRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1139     /*!
1140       \brief Sort table rows by the specified column.
1141       
1142       All the table rows are sorted according to the values in the specified
1143       column. Sort order is specified by the \a order parameter. The \a policy
1144       specifies how to process empty cells (put to the first place, ignore, etc).
1145       
1146       Raises an exception if \a column is out of range.
1147
1148       \param column column index
1149       \param order sort order (ascending/descending)
1150       \param policy sort policy (specifies how to process empty cells)
1151       \return list of mixed row indices
1152     */
1153     LongSeq SortByColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1154     /*!
1155       \brief Swap values in two table cells.
1156
1157       Raises an exception if any specified index is out of range.
1158
1159       \param row1    first cell's row index
1160       \param column1 first cell's column index
1161       \param row2    second cell's row index
1162       \param column2 second cell's column index
1163     */
1164     void SwapCells(in long row1, in long column1, in long row2, in long column2) raises(IncorrectIndex);
1165     /*!
1166       \brief Swap two table rows.
1167
1168       Raises an exception if any \a row1 or \a row2 is out of range.
1169
1170       \param row1 first row's index
1171       \param row2 second row's index
1172     */
1173     void SwapRows(in long row1, in long row2) raises(IncorrectIndex);
1174     /*!
1175       \brief Swap two table columns.
1176
1177       Raises an exception if any \a column1 or \a column2 is out of range.
1178
1179       \param column1 first column's index
1180       \param column2 second column's index
1181     */
1182     void SwapColumns(in long column1, in long column2) raises(IncorrectIndex);
1183     /*!
1184       \brief Reads a table from a byte stream.
1185       \param fileStream byte stream
1186       \return \c true if table is successfully read or \c false otherwise
1187       \sa SaveToFile()
1188     */
1189     boolean ReadFromFile(in SALOMEDS::TMPFile fileStream);
1190     /*!
1191       \brief Saves a table into a byte stream.
1192       \return byte stream with table representation
1193       \sa ReadFromFile()
1194     */
1195     SALOMEDS::TMPFile SaveToFile();
1196   };
1197
1198   //==========================================================================
1199   /*!
1200     \brief Table of %integer values
1201
1202     This attribute allows to store a table of %integer values. It is possible 
1203     to specify titles for rows and columns. In addition, the unis labels can be
1204     assigned to the rows. And finally, the table iself can have title.
1205
1206     \note The indices of rows and columns in the table start from 1.
1207
1208     <em>See \ref example21 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1209
1210     \sa AttributeTable, AttributeTableOfReal, AttributeTableOfString
1211   */
1212   //==========================================================================
1213
1214   interface AttributeTableOfInteger : AttributeTable
1215   {
1216     /*!
1217       \brief Appends new row to the table.
1218       
1219       If the length of the \a data parameter is greater than current number of columns
1220       in the table, the table is automatically resized.
1221       
1222       \param data sequence of values which will be set as elements of the added row
1223       \sa SetRow(), GetRow(), AddColumn()
1224     */
1225     void AddRow(in LongSeq data) raises(IncorrectArgumentLength);
1226     /*!
1227       \brief Replaces all the elements of the specified \a row with new values.
1228
1229       Raises an exception if \a row is out of range or if the length of the
1230       \a data parameter is not equal to the number of columns in the table.
1231
1232       \param row row index
1233       \param data sequence of values being set as values of the row
1234       \sa GetRow(), AddRow(), SetColumn()
1235     */
1236     void SetRow(in long row, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1237     /*!
1238       \brief Returns all the values of the specified row in the table.
1239
1240       Raises an exception if \a row is out of range.
1241       
1242       \note For empty cells 0 value is returned.
1243
1244       \param row row index
1245       \return sequence of values which are set as elements of the row.
1246       \sa SetRow(), AddRow()
1247     */
1248     LongSeq GetRow(in long row) raises(IncorrectIndex);
1249     /*!
1250       \brief Appends new column to the table.
1251       
1252       If the length of the \a data parameter is greater than current number of rows
1253       in the table, the table is automatically resized.
1254       
1255       \param data sequence of values which will be set as elements of the added column
1256       \sa SetColumn(), GetColumn(), AddRow()
1257     */
1258     void AddColumn(in LongSeq data) raises(IncorrectArgumentLength);
1259     /*!
1260       \brief Replaces all the elements of the specified column with new values.
1261
1262       Raises an exception if \a column is out of range or if the length of the
1263       \a data parameter is not equal to the number of rows in the table.
1264
1265       \param column column index
1266       \param data sequence of values being set as values of the column
1267       \sa GetColumn(), AddColumn(), SetRow()
1268     */
1269     void SetColumn(in long column, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1270     /*!
1271       \brief Returns all the values of the specified column in the table.
1272
1273       Raises an exception if \a column is out of range.
1274       
1275       \note For empty cells 0 value is returned.
1276       
1277       \param column column index
1278       \return sequence of values which are set as elements of the column.
1279       \sa SetColumn(), AddColumn()
1280     */
1281     LongSeq GetColumn(in long column) raises(IncorrectIndex);
1282     /*!
1283       \brief Puts a value to the table cell specified by \a row and \a column indices.
1284
1285       If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1286       in the table, the table is automatically resized.
1287       
1288       \param value  value being set to the table cell
1289       \param row    row index
1290       \param column column index
1291       \sa GetValue(), HasValue()
1292     */
1293     void PutValue(in long value, in long row, in long column) raises(IncorrectIndex);
1294     /*!
1295       \brief Returns the value from the cell table.
1296
1297       Raises an exception if \a row or \a column is out of range or 
1298       if value is not set for the specified table cell.
1299       
1300       \param row    row index
1301       \param column column index
1302       \return value assigned to the table cell
1303       \sa PutValue(), HasValue()
1304     */
1305     long GetValue(in long row, in long column) raises(IncorrectIndex);
1306   };
1307
1308   //==========================================================================
1309   /*!
1310     \brief Table of real values
1311
1312     This attribute allows to store a table of real values. It is possible 
1313     to specify titles for rows and columns. In addition, the unis labels can be
1314     assigned to the rows. And finally, the table iself can have title.
1315
1316     \note The indices of rows and columns in the table start from 1.
1317
1318     <em>See \ref example22 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1319
1320     \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfString
1321   */
1322   //==========================================================================
1323
1324   interface AttributeTableOfReal : AttributeTable
1325   {
1326     /*!
1327       \brief Appends new row to the table.
1328       
1329       If the length of the \a data parameter is greater than current number of columns
1330       in the table, the table is automatically resized.
1331       
1332       \param data sequence of values which will be set as elements of the added row
1333       \sa SetRow(), GetRow(), AddColumn()
1334     */
1335     void AddRow(in DoubleSeq data) raises(IncorrectArgumentLength);
1336     /*!
1337       \brief Replaces all the elements of the specified \a row with new values.
1338
1339       Raises an exception if \a row is out of range or if the length of the
1340       \a data parameter is not equal to the number of columns in the table.
1341
1342       \param row row index
1343       \param data sequence of values being set as values of the row
1344       \sa GetRow(), AddRow(), SetColumn()
1345     */
1346     void SetRow(in long row, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1347     /*!
1348       \brief Returns all the values of the specified row in the table.
1349
1350       Raises an exception if \a row is out of range.
1351       
1352       \note For empty cells 0.0 value is returned.
1353       
1354       \param row row index
1355       \return sequence of values which are set as elements of the row.
1356       \sa SetRow(), AddRow()
1357     */
1358     DoubleSeq GetRow(in long row) raises(IncorrectIndex);
1359     /*!
1360       \brief Appends new column to the table.
1361       
1362       If the length of the \a data parameter is greater than current number of rows
1363       in the table, the table is automatically resized.
1364       
1365       \param data sequence of values which will be set as elements of the added column
1366       \sa SetColumn(), GetColumn(), AddRow()
1367     */
1368     void AddColumn(in DoubleSeq data) raises(IncorrectArgumentLength);
1369     /*!
1370       \brief Replaces all the elements of the specified column with new values.
1371
1372       Raises an exception if \a column is out of range or if the length of the
1373       \a data parameter is not equal to the number of rows in the table.
1374
1375       \param column column index
1376       \param data sequence of values being set as values of the column
1377       \sa GetColumn(), AddColumn(), SetRow()
1378     */
1379     void SetColumn(in long column, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1380     /*!
1381       \brief Returns all the values of the specified column in the table.
1382
1383       Raises an exception if \a column is out of range.
1384       
1385       \note For empty cells 0.0 value is returned.
1386
1387       \param column column index
1388       \return sequence of values which are set as elements of the column.
1389       \sa SetColumn(), AddColumn()
1390     */
1391     DoubleSeq GetColumn(in long column) raises(IncorrectIndex);
1392     /*!
1393       \brief Puts a value to the table cell specified by \a row and \a column indices.
1394
1395       If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1396       in the table, the table is automatically resized.
1397       
1398       \param value  value being set to the table cell
1399       \param row    row index
1400       \param column column index
1401       \sa GetValue(), HasValue()
1402     */
1403     void PutValue(in double value, in long row, in long volumn) raises(IncorrectIndex);
1404     /*!
1405       \brief Returns the value from the cell table.
1406
1407       Raises an exception if \a row or \a column is out of range or 
1408       if value is not set for the specified table cell.
1409       
1410       \param row    row index
1411       \param column column index
1412       \return value assigned to the table cell
1413       \sa PutValue(), HasValue()
1414     */
1415     double GetValue(in long row, in long column) raises(IncorrectIndex);
1416   };
1417
1418   //==========================================================================
1419   /*!
1420     \brief Table of string values
1421
1422     This attribute allows to store a table of string values. It is possible 
1423     to specify titles for rows and columns. In addition, the unis labels can be
1424     assigned to the rows. And finally, the table iself can have title.
1425
1426     \note The indices of rows and columns in the table start from 1.
1427     \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfReal
1428   */
1429   //==========================================================================
1430   interface AttributeTableOfString : AttributeTable
1431   {
1432     /*!
1433       \brief Appends new row to the table.
1434       
1435       If the length of the \a data parameter is greater than current number of columns
1436       in the table, the table is automatically resized.
1437       
1438       \param data sequence of values which will be set as elements of the added row
1439       \sa SetRow(), GetRow(), AddColumn()
1440     */
1441     void AddRow(in StringSeq data) raises(IncorrectArgumentLength);
1442     /*!
1443       \brief Replaces all the elements of the specified \a row with new values.
1444
1445       Raises an exception if \a row is out of range or if the length of the
1446       \a data parameter is not equal to the number of columns in the table.
1447
1448       \param row row index
1449       \param data sequence of values being set as values of the row
1450       \sa GetRow(), AddRow(), SetColumn()
1451     */
1452     void SetRow(in long row, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1453     /*!
1454       \brief Returns all the values of the specified row in the table.
1455
1456       Raises an exception if \a row is out of range.
1457       
1458       \note For empty cells empty string is returned.
1459
1460       \param row row index
1461       \return sequence of values which are set as elements of the row.
1462       \sa SetRow(), AddRow()
1463     */
1464     StringSeq GetRow(in long row) raises(IncorrectIndex);
1465     /*!
1466       \brief Appends new column to the table.
1467       
1468       If the length of the \a data parameter is greater than current number of rows
1469       in the table, the table is automatically resized.
1470       
1471       \param data sequence of values which will be set as elements of the added column
1472       \sa SetColumn(), GetColumn(), AddRow()
1473     */
1474     void AddColumn(in StringSeq data) raises(IncorrectArgumentLength);
1475     /*!
1476       \brief Replaces all the elements of the specified column with new values.
1477
1478       Raises an exception if \a column is out of range or if the length of the
1479       \a data parameter is not equal to the number of rows in the table.
1480
1481       \param column column index
1482       \param data sequence of values being set as values of the column
1483       \sa GetColumn(), AddColumn(), SetRow()
1484     */
1485     void SetColumn(in long column, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1486     /*!
1487       \brief Returns all the values of the specified column in the table.
1488
1489       Raises an exception if \a column is out of range.
1490       
1491       \note For empty cells empty string is returned.
1492
1493       \param column column index
1494       \return sequence of values which are set as elements of the column.
1495       \sa SetColumn(), AddColumn()
1496     */
1497     StringSeq GetColumn(in long column) raises(IncorrectIndex);
1498     /*!
1499       \brief Puts a value to the table cell specified by \a row and \a column indices.
1500
1501       If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1502       in the table, the table is automatically resized.
1503       
1504       \param value  value being set to the table cell
1505       \param row    row index
1506       \param column column index
1507       \sa GetValue(), HasValue()
1508     */
1509     void PutValue(in string value, in long row, in long column) raises(IncorrectIndex);
1510     /*!
1511       \brief Returns the value from the cell table.
1512
1513       Raises an exception if \a row or \a column is out of range or 
1514       if value is not set for the specified table cell.
1515       
1516       \param row    row index
1517       \param column column index
1518       \return value assigned to the table cell
1519       \sa PutValue(), HasValue()
1520     */
1521     string GetValue(in long row, in long column) raises(IncorrectIndex);
1522   };
1523
1524   //==========================================================================
1525   /*!
1526     \brief %Study properties attribute
1527     
1528     This attribute is used to store study properties: user name, creation date,
1529     creation mode, modified flag, locked flag.
1530
1531     <em>See \ref example20 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1532   */
1533   //==========================================================================
1534   interface AttributeStudyProperties : GenericAttribute
1535   {
1536     /*!
1537       \brief Sets the name of the study author to the attribute.
1538       \param author study author name
1539     */
1540     void SetUserName(in string author);
1541     /*!
1542       \brief Returns the name of the study author.
1543       \return study author name (empty string if not set)
1544     */
1545     string GetUserName();
1546     /*!
1547       \brief Sets creation date of the study.
1548       \param minute minutes part of the date
1549       \param hour   hour part of the date
1550       \param day    day number part of the date
1551       \param month  month part of the date
1552       \param year   year part of the date
1553     */
1554     void SetCreationDate(in long minute, in long hour, in long day, in long month, in long year);
1555     /*!
1556       \brief Returns creation date of the study.
1557       \param minute used to return minutes part of the date (undefined if creation date is not set)
1558       \param hour   used to return hour part of the date (undefined if creation date is not set)
1559       \param day    used to return day number part of the date (undefined if creation date is not set)
1560       \param month  used to return month part of the date (undefined if creation date is not set)
1561       \param year   used to return year part of the date (undefined if creation date is not set)
1562       \return \c true if creation date is set or \c false otherwise
1563     */
1564     boolean GetCreationDate(out long minute, out long hour, out long day, out long month, out long year);
1565     /*!
1566       \brief Sets creation mode of the study.
1567       \note Creation mode must be either "from scratch" or "copy from".
1568       \param mode creation mode description
1569     */
1570     void SetCreationMode(in string mode);
1571     /*!
1572       \brief Returns creation mode of the study.
1573       
1574       \brief The following values are allowed for creation mode: "from scratch", "copy from",
1575       empty string (if not set).
1576
1577       \return creation mode description
1578     */
1579     string GetCreationMode();
1580     /*!
1581       \brief Sets the number of transactions executed after the last saving of the study.
1582       \param modified transaction count
1583     */
1584     void SetModified(in long modified);
1585     /*!
1586       \brief Check if study has been modified since last saving operation.
1587       \return \c true, if the study has been modified and not saved or \c false otherwise
1588     */
1589     boolean IsModified();
1590     /*!
1591       \brief Returns the number of transactions executed after the last saving of the study.
1592       \return transaction count
1593     */
1594     long GetModified();
1595     /*!
1596       \brief Lock/unlock the study for modifications.
1597       \note This parameter is not recursive.
1598       \note If the study is locked, any attempt to modify study contents leads to the raising
1599       of the LockProtection exception.
1600       \param lock \c true if study should be locked or \c false if study should be unlocked
1601     */
1602     void SetLocked(in boolean lock);
1603     /*!
1604       \brief Check if study is locked.
1605       \return \c true if study is locked or \c false otherwise
1606     */
1607     boolean IsLocked();
1608     /*!
1609       \brief Appends modification record to the list of study modifications.
1610       \param author author of the modification
1611       \param minute minutes part of the modification date
1612       \param hour   hour part of the modification date
1613       \param day    day number part of the modification date
1614       \param month  month part of the modification date
1615       \param year   year part of the modification date
1616     */
1617     void SetModification(in string author, in long minute, in long hour, in long day, in long month, in long year);
1618     /*!
1619       \brief Returns list of all the study modification records.
1620       \param authors     used to return authors of the modification records
1621       \param minutes     used to return minutes parts of the modification records
1622       \param hours       used to return hour parts of the modification records
1623       \param days        used to return day number parts of the modification records
1624       \param months      used to return month parts of the modification records
1625       \param years       used to return year parts of the modification records
1626       \param withCreator \c true if creation record should be also added to the resulting list or \c false otherwise
1627     */
1628     void GetModificationsList(out StringSeq authors, out LongSeq minutes, out LongSeq hours, out LongSeq days, out LongSeq months, out LongSeq years, in boolean withCreator);
1629
1630     /*!
1631       \brief Sets the comment of the study.
1632       \param comment comment of the study.
1633     */
1634     void SetComment(in string comment);
1635
1636     /*!
1637       \brief Returns comment of the study.      
1638       \return comment
1639     */
1640     string GetComment();
1641
1642     /*!
1643       \brief Sets the units of the study.
1644       \param units units of the study.
1645     */
1646     void SetUnits(in string units);
1647
1648     /*!
1649       \brief Returns units of the study.      
1650       \return units
1651     */
1652     string GetUnits();
1653
1654     /*!
1655       \brief Returns list of components which data was stored
1656       (after previous sessions) in the study.
1657       \return list of component names
1658     */
1659     StringSeq GetStoredComponents();
1660
1661     /*!
1662       \brief Returns version of component data stored in the study
1663       \param comp component name
1664       \return version of stored component data
1665     */
1666     string GetComponentVersion( in string comp );
1667
1668     /*!
1669       \brief Returns all versions of component data stored in the study
1670       \param comp component name
1671       \return versions of stored component data
1672     */
1673     StringSeq GetComponentVersions( in string comp );
1674   };
1675
1676   //==========================================================================
1677   /*!
1678     \brief Python %object attribute
1679
1680     This attribute is used to store pyton objects as a sequence of characters.
1681   */
1682   //==========================================================================
1683   interface AttributePythonObject : GenericAttribute
1684   {
1685     /*!
1686       \brief Sets a Python %object converted into a sequence of characters to the attribute.
1687       \param pyObject sequence of characters representing the encoded Python %object
1688       \param isScript if \c true, the \a pyObject parameter specifies a Python script
1689     */
1690     void SetObject(in string pyObject, in boolean isScript);
1691     /*!
1692       \brief Returns a Python %object stored in the attribute as a sequence of characters.
1693       \return encoded Python %object stored in the attribute (empty string if not set)
1694     */
1695     string GetObject();
1696     /*!
1697       \brief Check if the value stored in the attribute is a Python script
1698       \return \c true if the sequence of characters stored in the attribute corresponds
1699       to a Python script or \c false otherwise
1700     */
1701     boolean IsScript();
1702   };
1703
1704   //==========================================================================
1705   /*!
1706     \brief Parameter attribute
1707     
1708     This attribute is a universal container of arbitrary data of basic types
1709     (%integer, real, string, array, etc).
1710     
1711     Each parameter is identified by the unique name. Only one value of the
1712     specific type can be assigned to the parameter, though it is allowed to
1713     assign values of different types to the same name.
1714   */
1715   //==========================================================================
1716   interface AttributeParameter : GenericAttribute
1717   {
1718     //! This exception is raised when an invalid identifier is passed as parameter.
1719     exception InvalidIdentifier {};
1720
1721     /*!
1722       \brief Associates %integer value with the unique identifier.
1723       \param ID    parameter name
1724       \param value parameter value
1725     */
1726     void SetInt(in string ID, in long value);
1727     /*!
1728       \brief Returns %integer value associated with the specified identifier.
1729
1730       Raises an exception if %integer parameter is not set for the specified
1731       parameter.
1732
1733       \param ID parameter name
1734       \return   %integer value assigned to the parameter
1735     */
1736     long GetInt(in string ID) raises(InvalidIdentifier);
1737     /*!
1738       \brief Associates real value with the unique identifier.
1739       \param ID    parameter name
1740       \param value parameter value
1741     */
1742     void SetReal(in string ID, in double value);
1743     /*!
1744       \brief Returns real value associated with the specified identifier.
1745
1746       Raises an exception if real parameter is not set for the specified
1747       parameter.
1748
1749       \param ID parameter name
1750       \return   real value assigned to the parameter
1751     */
1752     double GetReal(in string ID) raises(InvalidIdentifier);
1753     /*!
1754       \brief Associates string value with the unique identifier.
1755       \param ID    parameter name
1756       \param value parameter value
1757     */
1758     void SetString(in string ID, in string value);
1759     /*!
1760       \brief Returns string value associated with the specified identifier.
1761
1762       Raises an exception if string parameter is not set for the specified
1763       parameter.
1764
1765       \param ID parameter name
1766       \return   string value assigned to the parameter
1767     */
1768     string GetString(in string ID) raises(InvalidIdentifier);
1769     /*!
1770       \brief Associates boolean value with the unique identifier.
1771       \param ID    parameter name
1772       \param value parameter value
1773     */
1774     void SetBool(in string ID, in boolean value);
1775     /*!
1776       \brief Returns boolean value associated with the specified identifier.
1777
1778       Raises an exception if boolean parameter is not set for the specified
1779       parameter.
1780
1781       \param ID parameter name
1782       \return   boolean value assigned to the parameter
1783     */
1784     boolean GetBool(in string ID) raises(InvalidIdentifier);
1785     /*!
1786       \brief Associates real array value with the unique identifier.
1787       \param ID    parameter name
1788       \param value parameter value
1789     */
1790     void SetRealArray(in string ID, in DoubleSeq value);
1791     /*!
1792       \brief Returns real array value associated with the specified identifier.
1793
1794       Raises an exception if real array parameter is not set for the specified
1795       parameter.
1796
1797       \param ID parameter name
1798       \return   real array value assigned to the parameter
1799     */
1800     DoubleSeq GetRealArray(in string ID) raises(InvalidIdentifier);
1801     /*!
1802       \brief Associates %integer array value with the unique identifier.
1803       \param ID    parameter name
1804       \param value parameter value
1805     */
1806     void SetIntArray(in string ID, in LongSeq value);
1807     /*!
1808       \brief Returns %integer array value associated with the specified identifier.
1809
1810       Raises an exception if %integer array parameter is not set for the specified
1811       parameter.
1812
1813       \param ID parameter name
1814       \return   %integer array value assigned to the parameter
1815     */
1816     LongSeq GetIntArray(in string ID) raises(InvalidIdentifier);
1817     /*!
1818       \brief Associates string array value with the unique identifier.
1819       \param ID    parameter name
1820       \param value parameter value
1821     */
1822     void SetStrArray(in string ID, in StringSeq value);
1823     /*!
1824       \brief Returns string array value associated with the specified identifier.
1825
1826       Raises an exception if string array parameter is not set for the specified
1827       parameter.
1828
1829       \param ID parameter name
1830       \return   string array value assigned to the parameter
1831     */
1832     StringSeq GetStrArray(in string ID) raises(InvalidIdentifier);
1833     /*!
1834       \brief Checks if the value of specified type is set for the identifier.
1835       \param ID    parameter name
1836       \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), 
1837                    4(real array), 5(%integer array), 6(string array)]
1838       \returns \c true if the value of type \a ptype is associated with the parameter \a ID
1839     */
1840     boolean IsSet(in string ID, in long ptype);
1841     /*!
1842       \brief Removes value of specified type from the named parameter.
1843       \param ID    parameter name
1844       \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), 
1845                    4(real array), 5(%integer array), 6(string array)]
1846       \return \c true if value is successfully removed or \c false otherwise
1847     */
1848     boolean RemoveID(in string ID, in long ptype);
1849     /*!
1850       \brief Returns a father attribute of this attribute.
1851       \return father parameter attribute
1852     */
1853     AttributeParameter GetFather();
1854     /*!
1855       \brief Check if this attribute has parent parameter attribute.
1856       \return \c true if this attribute has parent parameter attribute
1857     */
1858     boolean HasFather();
1859     /*!
1860       \brief Check if this attribute is a root (top-level) parameter attribute.
1861       \return \c true if this attribute is a root parameter attribute
1862     */
1863     boolean IsRoot();
1864     /*!
1865       \brief Clears the content of the attribute.
1866     */
1867     void Clear();
1868     /*!   
1869       \brief Returns a sequence of parameters identifiers of the specified type
1870       stored in the attribute.
1871       \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string), 
1872                    4(real array), 5(%integer array), 6(string array)]
1873       \return list of parameters identifier
1874     */ 
1875     StringSeq GetIDs(in long ptype);
1876   };
1877 };
1878 #endif