1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SALOMEDS.idl
23 // Author : Yves FRICAUD
26 /*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces
27 for the attributes which can be assigned to %SObject
29 #ifndef _SALOMEDS_AttributesIDL_
30 #define _SALOMEDS_AttributesIDL_
32 #include "SALOMEDS.idl"
36 /*! Sequence of double values
38 typedef sequence <double> DoubleSeq;
39 /*! Sequence of long values
41 typedef sequence <long> LongSeq;
42 /*! Sequence of string values
44 typedef sequence <string> StringSeq;
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.
60 //==========================================================================
61 /*! \brief Attribute allowing to store a real value
63 Attribute allowing to store a real value
65 //==========================================================================
67 interface AttributeReal : GenericAttribute
70 Returns the value of this attribute.
72 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
76 Sets the value of this attribute.
78 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
80 void SetValue(in double value);
83 //==========================================================================
84 /*! \brief Attribute allowing to store an integer value
86 Attribute allowing to store an integer value
88 //==========================================================================
89 interface AttributeInteger : GenericAttribute
92 Returns the value of this attribute
94 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
98 Sets the value of this attribute
100 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
102 void SetValue(in long value);
104 //==========================================================================
105 /*! \brief Attribute - sequence of real values
107 Attribute - sequence of real values, indexing from 1 (like in CASCADE).
109 //==========================================================================
110 interface AttributeSequenceOfReal : GenericAttribute
113 Initialization of the attribute with initial data.
114 \param other Initially assigned sequence of real numbers.
116 void Assign (in DoubleSeq other);
118 Returns the sequence of real numbers stored in the attribute.
120 DoubleSeq CorbaSequence();
122 Adds to the end of the sequence a real number.
124 \param value A real number added to the sequence.
126 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
128 void Add (in double value);
130 Removes a real number with a definite index
131 from the sequence of real numbers stored in the Attribute.
133 \param index The index of the given real number
135 void Remove(in long index);
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.
141 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
144 void ChangeValue(in long index, in double value);
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.
150 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
152 double Value(in short index);
154 Returns the length of the sequence of real numbers stored in the Attribute.
156 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
161 //==========================================================================
162 /*! \brief Attribute - sequence of integer
164 Attribute - sequence of integer, indexing from 1 (like in CASCADE)
166 //==========================================================================
167 interface AttributeSequenceOfInteger : GenericAttribute
170 Initialisation of the attribute with initial data.
171 \param other Initially assigned sequence of integer numbers.
173 void Assign (in LongSeq other);
175 Returns the sequence of integer numbers stored in the Attribute.
177 LongSeq CorbaSequence();
179 Adds to the end of the sequence an integer number.
180 \param value An integer number added to the sequence.
182 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
185 void Add (in long value);
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.
191 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
194 void Remove(in long index);
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.
201 void ChangeValue(in long index, in long value);
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.
207 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
209 long Value(in short index);
211 Returns the length of the sequence of integer numbers stored in the Attribute.
213 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
219 //==========================================================================
220 /*! \brief Name attribute
222 This attribute stores a string value, which corresponds to the name of the %SObject
223 or to the name of corresponding object.
225 //==========================================================================
227 interface AttributeName : GenericAttribute
230 Returns the value of this attribute
232 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
236 Sets the value of this attribute
238 \param value This parameter defines the value of this attribute.
240 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
242 void SetValue(in string value);
245 //==========================================================================
246 /*! \brief Comment attribute
248 This attribute stores a string value containing supplementary information about
249 the %SObject. In particular it contains the data type of the %SComponent.
251 //==========================================================================
252 interface AttributeComment : GenericAttribute
255 Returns the value of this attribute
257 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
261 Sets the value of this attribute
262 \param value This string parameter defines the value of this attribute - a description of a %SObject.
264 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
266 void SetValue(in string value);
268 //==========================================================================
269 /*! \brief IOR attribute
271 This attribute stores a string value identifying a runtime object.In particular
272 it contains CORBA Interoperable Object Reference.
274 //==========================================================================
275 interface AttributeIOR : GenericAttribute
278 Returns the value of this attribute
280 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
284 Sets the value of this attribute
285 \param value This parameter defines the value of this attribute - IOR of a %SObject.
287 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
289 void SetValue(in string value);
292 //==========================================================================
293 /*! \brief Persistent reference attribute
295 This attribute stores a persistent identifier of the object.
297 //==========================================================================
298 interface AttributePersistentRef : GenericAttribute
301 Returns the value of this attribute
303 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
307 Sets the value of this attribute
308 \param value This parameter defines the value of this attribute.
310 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
312 void SetValue(in string value);
315 //==========================================================================
316 /*! \brief External File definition
318 This attribute stores a path to an External File.
320 //==========================================================================
321 interface AttributeExternalFileDef: GenericAttribute
324 Returns the value of this attribute
325 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
329 Sets the value of this attribute
330 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
332 void SetValue(in string value);
335 //==========================================================================
336 /*! \brief File Type definition
338 This attribute stores an external File Type (see ExternalFileDef attribute).
340 //==========================================================================
341 interface AttributeFileType: GenericAttribute
344 Returns the value of this attribute
345 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
349 Sets the value of this attribute
350 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
352 void SetValue(in string value);
355 //==========================================================================
356 //Below the list of presentation attributes for display study tree in browser
357 //==========================================================================
360 //==========================================================================
361 /*! \brief Drawable flag Attribute.
363 This is a presentation attribute necessary for display of a study tree in the browser.
364 The item associated to a %SObject is created/displayed if TRUE.
366 //==========================================================================
367 interface AttributeDrawable : GenericAttribute
370 Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
372 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
375 boolean IsDrawable();
377 Sets the item to be drawable.
379 \param value If the value of this boolean parameter is TRUE (default) the item will be drawable.
381 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
384 void SetDrawable(in boolean value);
387 //==========================================================================
388 /*! \brief Selectable flag Attribute.
390 This is a presentation attribute necessary for display of the study tree in the browser.
391 The item is selectable by %SALOME selection mechanism if TRUE.
393 //==========================================================================
394 interface AttributeSelectable : GenericAttribute
397 Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
400 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
403 boolean IsSelectable();
405 Sets the item to be selectable
407 \param value If the value of this parameter is TRUE (the default) the item will be set as selectable.
409 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
412 void SetSelectable(in boolean value);
415 //==========================================================================
416 /*! \brief Expandable flag Attribute.
418 This is a presentation attribute necessary for display of the study tree in the browser.
419 It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE
420 expandable only if it has children.
422 //==========================================================================
423 interface AttributeExpandable : GenericAttribute
426 Returns TRUE if this item is expandable even when it has no children.
428 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
431 boolean IsExpandable();
432 /*! Sets this item to be expandable even if it has no children.
434 \param value If the value of this boolean parameter is TRUE, this item will be set as expandable.
436 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
439 void SetExpandable(in boolean value);
442 //==========================================================================
443 /*! \brief Opened flag Attribute.
445 This is a presentation attribute necessary for display of the study tree in the browser.
446 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
447 are not visible) if bool is FALSE.
449 //==========================================================================
450 interface AttributeOpened : GenericAttribute
453 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
455 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
460 Sets this item to be open (its children are visible)
462 \param value If the value of this boolean parameter is TRUE this item will be set as open,
463 and as closed if FALSE.
465 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
468 void SetOpened(in boolean value);
470 //==========================================================================
471 /*! \brief TextColorAttribute.
473 This attribute sets the color of an item.
475 //==========================================================================
476 interface AttributeTextColor : GenericAttribute
479 Returns the color of an item.
481 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
486 Sets the color of an item.
488 \param value This parameter defines the color of the item.
490 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
493 void SetTextColor(in Color value);
496 //==========================================================================
497 /*! \brief TextHighlightColorAttribute.
499 This attribute sets the highlight color of an item.
501 //==========================================================================
502 interface AttributeTextHighlightColor : GenericAttribute
505 Returns the highlight color of an item.
509 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
512 Color TextHighlightColor();
514 Sets the highlight color of an item.
515 \param value This parameter defines the highlight color of the item.
517 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
520 void SetTextHighlightColor(in Color value);
522 //==========================================================================
523 /*! \brief PixMapAttribute.
525 This attribute stores an icon which is put before the name of an item.
527 //==========================================================================
528 interface AttributePixMap : GenericAttribute
531 Returns True if there is an icon before the name of the given item.
535 Returns the name of the icon in the format of a string.
537 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
542 Sets the name of the icon.
543 \param value This string parameter defines the name of the icon.
545 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
548 void SetPixMap(in string value);
551 //==========================================================================
552 /*! \brief TreeNodeAttribute.
554 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
555 tree whith its own structure and identifier. The quantity of such trees with different
556 identifiers can be arbitrary.
558 <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>
561 //==========================================================================
562 interface AttributeTreeNode : GenericAttribute
565 Assigns the father tree node to this tree node.
567 void SetFather(in AttributeTreeNode value);
569 Returns True if there is a father tree node of this tree node.
573 Returns the father tree node of this tree node.
575 AttributeTreeNode GetFather();
577 Assigns the previous brother tree node to the given tree node.
579 void SetPrevious(in AttributeTreeNode value);
581 Returns True if there is the previous brother tree node of this tree node.
583 boolean HasPrevious();
585 Returns the previous brother tree node of this tree node.
587 AttributeTreeNode GetPrevious();
589 Sets the next brother tree node to this tree node.
591 void SetNext(in AttributeTreeNode value);
593 Returns True if there is the next brother tree node of this tree node.
597 Returns the previous brother tree node of this tree node.
599 AttributeTreeNode GetNext();
601 Sets the first child tree node to this tree node.
603 void SetFirst(in AttributeTreeNode value);
605 Returns True if there is the first child tree node of this tree node.
609 Returns the first child tree node of this tree node.
611 AttributeTreeNode GetFirst();
614 \param value String parameter defining the ID of a tree.
615 \note <br>Tree nodes of one tree have the same ID.
617 void SetTreeID(in string value);
620 \return An ID of a tree in the format of a string.
625 Adds a child tree node to the end of the list of children of this tree node.
627 void Append(in AttributeTreeNode value);
629 Adds a child tree node to the beginning of the list of children of this tree node.
632 void Prepend(in AttributeTreeNode value);
634 Adds a brother tree node before this tree node.
635 In this case the both tree nodes will belong to the same father.
637 void InsertBefore(in AttributeTreeNode value);
639 Adds a brother tree node after this tree node.
640 In this case the both tree nodes will belong to the same father.
642 void InsertAfter(in AttributeTreeNode value);
646 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
652 Returns the depth of the tree node in the
653 structure, it means the number of fathers of the given tree node.
654 (i.e.: the depth of the root tree node is 0).
658 Returns True if it is a root tree node.
662 Returns True if this tree node is a descendant of the tree node.
664 boolean IsDescendant(in AttributeTreeNode value);
666 Returns True if this tree node is the father of the tree node.
668 boolean IsFather(in AttributeTreeNode value);
670 Returns True if this tree node is a child of the tree node.
672 boolean IsChild(in AttributeTreeNode value);
674 Returns ID of the according %SObject.
678 //==========================================================================
679 /*! \brief LocalID attribute
681 Attribute describing the link between a %SObject and a local object in the component.
683 //==========================================================================
684 interface AttributeLocalID : GenericAttribute
687 Returns the value of this attribute.
689 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
693 Sets the value of this attribute.
695 \param value This parameter defines the local ID which will be set.
697 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
699 void SetValue(in long value);
702 //==========================================================================
703 /*! \brief Attribute storing GUID
705 Attribute allowing to store GUID
707 //==========================================================================
708 interface AttributeUserID : GenericAttribute
711 Returns the value of this attribute
713 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
717 Sets the value of this attribute
719 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
721 void SetValue(in string value);
724 //==========================================================================
725 /*! \brief %AttributeTarget iterface
727 This attribute stores the list of all %SObjects that refer
728 to this %SObject. This attribute is used for inner purposes of the application.
729 It is also needed for optimization.
731 //==========================================================================
733 interface AttributeTarget : GenericAttribute
736 Adds a %SObject to the list of %SObjects which refer to this %SObject.
738 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
741 void Add(in SObject anObject);
743 Returns a list of %SObjects which refer to this %SObject.
745 SALOMEDS::Study::ListOfSObject Get();
747 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
749 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
752 void Remove(in SObject anObject);
754 //==========================================================================
755 /*! \brief %AttributeTableOfInteger interface
757 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
758 and string titles of this table, of each row, of each column.
760 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
763 //==========================================================================
765 interface AttributeTableOfInteger : GenericAttribute
768 This exception is raised when an incorrect index is passed as parameter.
770 exception IncorrectIndex {};
772 This exception is raised when an incorrect length of the argument is passed as parameter.
774 exception IncorrectArgumentLength {};
776 // titles: for table, for each row, for each column
778 Sets the title of the table.
780 void SetTitle(in string theTitle);
782 Returns the title of the table.
786 Sets the title of a row with a definite index.
788 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
790 Sets the titles for all rows of the table.
792 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
794 Returns the titles of all rows of the table.
796 StringSeq GetRowTitles();
798 Sets the title of a column with a definite index.
800 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
802 Sets the titles for all columns of the table.
804 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
806 Returns the titles of all columns of the table.
808 StringSeq GetColumnTitles();
812 Sets the unit of a row with a definite index.
814 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
816 Sets the units for all rows of the table.
818 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
820 Returns the units of all rows of the table.
822 StringSeq GetRowUnits();
826 Returns the number of rows of the table.
830 Returns the number of columns of the table.
834 // operations with rows
836 Adds a row to the end of the table.
837 \param theData A sequence of long values which will be set as elements of the added row.
839 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
841 Sets the elements of a definite row.
842 \param theRow The number of the row.
843 \param theData A sequence of long values which will be set as elements of this row.
846 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
848 Gets the row of the table.
850 \param theRow The number of the row.
851 \return A sequence of long values which are set as elements of this row.
853 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
855 // operations with columns
857 Adds a column to the end of the table.
859 \param theData A sequence of long values which will be set as elements of this column.
861 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
863 Sets the values of all elements of the column.
865 \param theData A sequence of long values which will be set as elements of this column.
867 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
869 Returns the column of the table.
871 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
873 // operations with elements
875 Puts a value in the table.
876 \param theRow The row, where the value will be placed.
877 \param theColumn The column, where the value will be placed.
879 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
881 Returns True if there is a value in the table.
882 \param theRow The row containing the value
883 \param theColumn The column containing the value
885 boolean HasValue(in long theRow, in long theColumn);
887 Returns the value from the table.
888 \param theRow The row containing the value
889 \param theColumn The column containing the value
891 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
894 Sets the max number of colums in the table.
895 \note It'd better to set it before filling the table.
897 void SetNbColumns(in long theNbColumns);
900 Returns the indices of the row where the values are defined.
902 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
903 // operations with files
905 Reads a table from a file.
907 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
909 Saves a table into a file.
911 SALOMEDS::TMPFile SaveToFile();
914 //==========================================================================
915 /*! \brief %AttributeTableOfReal interface
917 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
918 and string titles of this table, of each row, of each column.
919 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
922 //==========================================================================
924 interface AttributeTableOfReal : GenericAttribute
927 This exception is raised when an incorrect index is passed as parameter.
929 exception IncorrectIndex {};
931 This exception is raised when an incorrect length of the argument is passed as parameter.
933 exception IncorrectArgumentLength {};
935 // titles: for table, for each row, for each column
937 Sets the title of the table.
939 void SetTitle(in string theTitle);
941 Returns the title of the table.
945 Sets the title of a row with a definite index.
947 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
949 Sets the titles for all rows of the table.
951 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
953 Returns the titles of all rows of the table.
955 StringSeq GetRowTitles();
957 Sets the title of a column with a definite index.
959 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
961 Sets the titles for all columns of the table.
963 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
965 Returns the titles of all columns of the table.
967 StringSeq GetColumnTitles();
971 Sets the unit of a row with a definite index.
973 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
975 Sets the units for all rows of the table.
977 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
979 Returns the units of all rows of the table.
981 StringSeq GetRowUnits();
985 Returns the number of rows of the table.
989 Returns the number of columns of the table.
993 // operations with rows
995 Adds a row to the end of the table.
997 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
999 Sets the values of all elements of the row.
1001 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1003 Returns the row of the table.
1005 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1007 // operations with columns
1009 Adds a column to the end of the table.
1011 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1013 Sets the values of all elements of the column.
1015 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1017 Returns the column of the table.
1019 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1021 // operations with elements
1023 Puts a value in the table.
1024 \param theRow The row, where the value will be placed.
1025 \param theColumn The column, where the value will be placed.
1027 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1029 Returns True if there is a value in the table.
1030 \param theRow The row containing the value
1031 \param theColumn The column containing the value
1033 boolean HasValue(in long theRow, in long theColumn);
1035 Returns the value from the table.
1036 \param theRow The row containing the value
1037 \param theColumn The column containing the value
1039 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1042 Sets the max number of colums in the table.
1043 \note It'd better to set it before filling the table.
1045 void SetNbColumns(in long theNbColumns);
1048 Returns the indices of the row where the values are defined.
1050 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1051 // operations with files
1053 Reads a table from a file.
1055 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1057 Saves a table into a file.
1059 SALOMEDS::TMPFile SaveToFile();
1064 //==========================================================================
1065 /*! \brief %AttributeTableOfString interface
1067 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1068 and string titles of this table, of each row, of each column.
1069 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1072 //==========================================================================
1074 interface AttributeTableOfString : GenericAttribute
1077 This exception is raised when an incorrect index is passed as parameter.
1079 exception IncorrectIndex {};
1081 This exception is raised when an incorrect length of the argument is passed as parameter.
1083 exception IncorrectArgumentLength {};
1085 // titles: for table, for each row, for each column
1087 Sets the title of the table.
1089 void SetTitle(in string theTitle);
1091 Returns the title of the table.
1095 Sets the title of a row with a definite index.
1097 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1099 Sets the titles for all rows of the table.
1101 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1103 Returns the titles of all rows of the table.
1105 StringSeq GetRowTitles();
1107 Sets the title of a column with a definite index.
1109 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1111 Sets the titles for all columns of the table.
1113 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1115 Returns the titles of all columns of the table.
1117 StringSeq GetColumnTitles();
1121 Sets the unit of a row with a definite index.
1123 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1125 Sets the units for all rows of the table.
1127 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1129 Returns the units of all rows of the table.
1131 StringSeq GetRowUnits();
1133 // table information
1135 Returns the number of rows of the table.
1139 Returns the number of columns of the table.
1141 long GetNbColumns();
1143 // operations with rows
1145 Adds a row to the end of the table.
1147 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1149 Sets the values of all elements of the row.
1151 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1153 Returns the row of the table.
1155 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1157 // operations with columns
1159 Adds a column to the end of the table.
1161 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1163 Sets the values of all elements of the column.
1165 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1167 Returns the column of the table.
1169 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1171 // operations with elements
1173 Puts a value in the table.
1174 \param theRow The row, where the value will be placed.
1175 \param theColumn The column, where the value will be placed.
1177 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1179 Returns True if there is a value in the table.
1180 \param theRow The row containing the value
1181 \param theColumn The column containing the value
1183 boolean HasValue(in long theRow, in long theColumn);
1185 Returns the value from the table.
1186 \param theRow The row containing the value
1187 \param theColumn The column containing the value
1189 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1192 Sets the max number of colums in the table.
1193 \note It'd better to set it before filling the table.
1195 void SetNbColumns(in long theNbColumns);
1198 Returns the indices of the row where the values are defined.
1200 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1201 // operations with files
1203 Reads a table from a file.
1205 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1207 Saves a table into a file.
1209 SALOMEDS::TMPFile SaveToFile();
1213 //==========================================================================
1214 /*! \brief %AttributeStudyProperties interface
1216 This attribute allows to store study properties: user name, creation date, creation
1217 mode, modified flag, locked flag.
1218 <BR><VAR>See also <A href=exemple/Example20.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1221 //==========================================================================
1223 interface AttributeStudyProperties : GenericAttribute
1226 Sets the name of the author of the %Study
1228 void SetUserName(in string theName);
1230 Returns the name of the user of the %Study.
1231 \note <BR>It returns a null string, if user name is not set
1233 string GetUserName();
1235 Sets creation date of the %Study.
1237 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1239 Returns creation date of the %Study and True if creation date is set.
1241 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1243 Sets creation mode of the %Study.
1244 \note <BR>Creation mode must be: "from scratch" or "copy from".
1246 void SetCreationMode(in string theMode);
1248 Returns creation mode: "from scratch", "copy from", or null string
1249 if creation mode is not set
1251 string GetCreationMode();
1253 Sets the number of transactions executed after the last saving of the document.
1255 void SetModified(in long theModified);
1257 Returns True, if the document has been modified and not saved.
1259 boolean IsModified();
1261 Returns the number of transactions executed after the last saving of the document.
1265 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1267 void SetLocked(in boolean theLocked);
1269 Returns True if the document is locked for modifications.
1273 Appends modification parameters to the modifications list.
1275 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1277 Returns a list of mosdifiers user names, modification dates.
1278 /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.
1280 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1282 //==========================================================================
1283 /*! \brief %AttributePythonObject interface
1285 Attribute allowing to store pyton objects as a sequence of chars.
1287 //==========================================================================
1289 interface AttributePythonObject : GenericAttribute
1292 Sets in the attribute a Python object converted into a sequence of chars.
1293 \param theSequence A sequence of chars.
1294 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1296 void SetObject(in string theSequence, in boolean IsScript);
1298 Returns a Python object stored in the attribute as a sequence of chars.
1302 Returns True if the sequence of bytes stored in the attribute corresponds