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.
59 //==========================================================================
60 /*! \brief Attribute allowing to store a real value
62 Attribute allowing to store a real value
64 //==========================================================================
65 interface AttributeReal : GenericAttribute
68 Returns the value of this attribute.
69 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
73 Sets the value of this attribute.
74 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
76 void SetValue(in double value);
78 //==========================================================================
79 /*! \brief Attribute allowing to store an integer value
81 Attribute allowing to store an integer value
83 //==========================================================================
84 interface AttributeInteger : GenericAttribute
87 Returns the value of this attribute
88 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
92 Sets the value of this attribute
93 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
95 void SetValue(in long value);
97 //==========================================================================
98 /*! \brief Attribute - sequence of real values
100 Attribute - sequence of real values, indexing from 1 (like in CASCADE).
102 //==========================================================================
103 interface AttributeSequenceOfReal : GenericAttribute
106 Initialization of the attribute with initial data.
107 \param other Initially assigned sequence of real numbers.
109 void Assign (in DoubleSeq other);
111 Returns the sequence of real numbers stored in the attribute.
113 DoubleSeq CorbaSequence();
115 Adds to the end of the sequence a real number.
116 \param value A real number added to the sequence.
118 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
120 void Add (in double value);
122 Removes a real number with a definite index
123 from the sequence of real numbers stored in the Attribute.
125 void Remove(in long index);
127 Substitutes a real number with a definite index for another real number.
128 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
131 void ChangeValue(in long index, in double value);
133 Returns a real number with a definite index
134 in the sequence of real numbers stored in the Attribute.
135 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
137 double Value(in short index);
139 Returns the length of the sequence of real numbers stored in the Attribute.
140 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
145 //==========================================================================
146 /*! \brief Attribute - sequence of integer
148 Attribute - sequence of integer, indexing from 1 (like in CASCADE)
150 //==========================================================================
151 interface AttributeSequenceOfInteger : GenericAttribute
154 Initialization of the attribute with initial data.
155 \param other Initially assigned sequence of integer numbers.
157 void Assign (in LongSeq other);
159 Returns the sequence of integer numbers stored in the Attribute.
161 LongSeq CorbaSequence();
163 Adds to the end of the sequence an integer number.
164 \param value An integer number added to the sequence.
166 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
169 void Add (in long value);
171 Removes an integer number with a definite index
172 from the sequence of integer numbers stored in the Attribute.
173 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
176 void Remove(in long index);
178 Substitutes an integer number with a definite index for another integer number.
180 void ChangeValue(in long index, in long value);
182 Returns an integer number with a definite index
183 in the sequence of integer numbers stored in the Attribute.
184 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
186 long Value(in short index);
188 Returns the length of the sequence of integer numbers stored in the Attribute.
189 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
195 //==========================================================================
196 /*! \brief Name attribute
198 This attribute stores a string value, which corresponds to the name of the %SObject
199 or to the name of corresponding object.
201 //==========================================================================
203 interface AttributeName : GenericAttribute
206 Returns the value of this attribute
207 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
211 Sets the value of this attribute
212 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
214 void SetValue(in string value);
217 //==========================================================================
218 /*! \brief Comment attribute
220 This attribute stores a string value containing supplementary information about
221 the %SObject. In particular it contains the data type of the %SComponent.
223 //==========================================================================
224 interface AttributeComment : GenericAttribute
227 Returns the value of this attribute
228 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
232 Sets the value of this attribute
233 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
235 void SetValue(in string value);
237 //==========================================================================
238 /*! \brief IOR attribute
240 This attribute stores a string value identifying a runtime object.In particular
241 it contains CORBA Interoperable Object Reference.
243 //==========================================================================
244 interface AttributeIOR : GenericAttribute
247 Returns the value of this attribute
248 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
252 Sets the value of this attribute
253 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
255 void SetValue(in string value);
258 //==========================================================================
259 /*! \brief Persistent reference attribute
261 This attribute stores a persistent identifier of the object.
263 //==========================================================================
264 interface AttributePersistentRef : GenericAttribute
267 Returns the value of this attribute
268 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
272 Sets the value of this attribute
273 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
275 void SetValue(in string value);
278 //==========================================================================
279 /*! \brief External File definition
281 This attribute stores a path to an External File.
283 //==========================================================================
284 interface AttributeExternalFileDef: GenericAttribute
287 Returns the value of this attribute
288 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
292 Sets the value of this attribute
293 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
295 void SetValue(in string value);
298 //==========================================================================
299 /*! \brief File Type definition
301 This attribute stores an external File Type (see ExternalFileDef attribute).
303 //==========================================================================
304 interface AttributeFileType: GenericAttribute
307 Returns the value of this attribute
308 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
312 Sets the value of this attribute
313 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
315 void SetValue(in string value);
318 //==========================================================================
319 //Below the list of presentation attributes for display study tree in browser
320 //==========================================================================
323 //==========================================================================
324 /*! \brief Drawable flag Attribute.
326 This is a presentation attribute necessary for display of the study tree in the browser.
327 The item associated to SObject is created/displayed if TRUE.
329 //==========================================================================
330 interface AttributeDrawable : GenericAttribute
333 Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
334 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
337 boolean IsDrawable();
339 Sets the items to be drawable if <VAR>value</VAR> is TRUE (the default) or not to be selectable if <VAR>value</VAR>is FALSE.
340 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
343 void SetDrawable(in boolean value);
346 //==========================================================================
347 /*! \brief Selectable flag Attribute.
349 This is a presentation attribute necessary for display of the study tree in the browser.
350 The item is selectable by %SALOME selection mechanism if TRUE.
352 //==========================================================================
353 interface AttributeSelectable : GenericAttribute
356 Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
357 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
360 boolean IsSelectable();
362 Sets the items to be selectable if <VAR>value</VAR> is TRUE (the default) or not to be selectable if <VAR>value</VAR>is FALSE.
363 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
366 void SetSelectable(in boolean value);
369 //==========================================================================
370 /*! \brief Expandable flag Attribute.
372 This is a presentation attribute necessary for display of the study tree in the browser.
373 It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE
374 expandable only if it has children.
376 //==========================================================================
377 interface AttributeExpandable : GenericAttribute
380 Returns TRUE if this item is expandable even when it has no children.
381 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
384 boolean IsExpandable();
386 Sets this item to be expandable even if it has no children if <VAR>value</VAR> is TRUE, and to be
387 expandable only if it has children if <VAR>value</VAR> is FALSE (the default).
388 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
391 void SetExpandable(in boolean value);
394 //==========================================================================
395 /*! \brief Opened flag Attribute.
397 This is a presentation attribute necessary for display of the study tree in the browser.
398 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
399 are not visible) if bool is FALSE.
401 //==========================================================================
402 interface AttributeOpened : GenericAttribute
405 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
406 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
411 Sets this item to be open (its children are visible) if <VAR>value</VAR> is TRUE, and to be closed
412 (its children are not visible) if <VAR>value</VAR> is FALSE.
413 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
416 void SetOpened(in boolean value);
418 //==========================================================================
419 /*! \brief TextColorAttribute.
421 This attribute sets the color of an item.
423 //==========================================================================
424 interface AttributeTextColor : GenericAttribute
427 Returns the color of an item.
428 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
433 Sets the color of an item.
434 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
437 void SetTextColor(in Color value);
440 //==========================================================================
441 /*! \brief TextHighlightColorAttribute.
443 This attribute sets the highlight color of an item.
445 //==========================================================================
446 interface AttributeTextHighlightColor : GenericAttribute
449 Returns the highlight color of an item.
450 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
453 Color TextHighlightColor();
455 Sets the highlight color of an item.
456 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
459 void SetTextHighlightColor(in Color value);
461 //==========================================================================
462 /*! \brief PixMapAttribute.
464 This attribute stores an icon which is put before the name of an item.
466 //==========================================================================
467 interface AttributePixMap : GenericAttribute
470 Returns True if there is an icon before the name of the item.
474 Returns the name of the icon.
475 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
480 Sets the name of the icon.
481 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
484 void SetPixMap(in string value);
487 //==========================================================================
488 /*! \brief TreeNodeAttribute.
490 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
491 tree whith its own structure and identifier. The quantity of such trees with different
492 identifiers can be arbitrary.
493 <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>
496 //==========================================================================
497 interface AttributeTreeNode : GenericAttribute
500 Sets the father TreeNode to this TreeNode.
502 void SetFather(in AttributeTreeNode value);
504 Returns True if there is the father TreeNode of this TreeNode.
508 Returns the father Treenode of this TreeNode.
510 AttributeTreeNode GetFather();
512 Sets the previous brother TreeNode to this treeNode.
514 void SetPrevious(in AttributeTreeNode value);
516 Returns True if there is the previous brother TreeNode of this TreeNode.
518 boolean HasPrevious();
520 Returns the previous brother TreeNode of this TreeNode.
522 AttributeTreeNode GetPrevious();
524 Sets the next brother TreeNode to this treeNode.
526 void SetNext(in AttributeTreeNode value);
528 Returns True if there is the next brother TreeNode of this TreeNode.
532 Returns the previous brother TreeNode of this TreeNode.
534 AttributeTreeNode GetNext();
536 Sets the first child TreeNode to this treeNode.
538 void SetFirst(in AttributeTreeNode value);
540 Returns True if there is the first child TreeNode of this TreeNode.
544 Returns the first child TreeNode of this TreeNode.
546 AttributeTreeNode GetFirst();
548 Sets ID of the tree. TreeNodes of one tree have the same ID.
550 void SetTreeID(in string value);
557 Adds a child TreeNode to the end of the list of children of this Treenode.
559 void Append(in AttributeTreeNode value);
561 Adds a child TreeNode to the beginning of the list of children of this Treenode.
564 void Prepend(in AttributeTreeNode value);
566 Adds a brother TreeNode before this Treenode.
567 In this case the both TreeNodes will belong to the same father.
569 void InsertBefore(in AttributeTreeNode value);
571 Adds a brother TreeNode after this Treenode.
572 In this case the both TreeNodes will belong to the same father.
574 void InsertAfter(in AttributeTreeNode value);
577 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
583 Returns the depth of the TreeNode in the
584 structure, it means the number of fathers of the given TreeNode.
585 (i.e.: the depth of the root TreeNode is 0).
589 Returns True if it is a root TreeNode.
593 Returns True if this TreeNode is a descendant of the TreeNode.
595 boolean IsDescendant(in AttributeTreeNode value);
597 Returns True if this TreeNode is the father of the TreeNode.
599 boolean IsFather(in AttributeTreeNode value);
601 Returns True if this TreeNode is a child of the TreeNode.
603 boolean IsChild(in AttributeTreeNode value);
605 Returns ID of the according %SObject.
609 //==========================================================================
610 /*! \brief LocalID attribute
612 Attribute describing the link between a %SObject and a local object in the component.
614 //==========================================================================
615 interface AttributeLocalID : GenericAttribute
618 Returns the value of this attribute.
619 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
623 Sets the value of this attribute.
624 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
626 void SetValue(in long value);
629 //==========================================================================
630 /*! \brief Attribute storing GUID
632 Attribute allowing to store GUID
634 //==========================================================================
635 interface AttributeUserID : GenericAttribute
638 Returns the value of this attribute
639 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
643 Sets the value of this attribute
644 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
646 void SetValue(in string value);
649 //==========================================================================
650 /*! \brief %AttributeTarget iterface
652 This attribute stores the list of all %SObjects that refer
653 to this %SObject. This attribute is used for inner purposes of the application.
654 It is also needed for optimization.
656 //==========================================================================
658 interface AttributeTarget : GenericAttribute
661 Adds a %SObject to the list of %SObjects which refer to this %SObject.
663 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
666 void Add(in SObject anObject);
668 Returns the list of %SObjects which refer to this %SObject.
670 SALOMEDS::Study::ListOfSObject Get();
672 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
674 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
677 void Remove(in SObject anObject);
679 //==========================================================================
680 /*! \brief %AttributeTableOfInteger interface
682 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
683 and string titles of this table, of each row, of each column.
684 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
687 //==========================================================================
689 interface AttributeTableOfInteger : GenericAttribute
692 This exception is raised when an incorrect index is passed as parameter.
694 exception IncorrectIndex {};
696 This exception is raised when an incorrect length of the argument is passed as parameter.
698 exception IncorrectArgumentLength {};
700 // titles: for table, for each row, for each column
702 Sets the title of the table.
704 void SetTitle(in string theTitle);
706 Returns the title of the table.
710 Sets the title of a row with a definite index.
712 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
714 Sets the titles for all rows of the table.
716 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
718 Returns the titles of all rows of the table.
720 StringSeq GetRowTitles();
722 Sets the title of a column with a definite index.
724 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
726 Sets the titles for all columns of the table.
728 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
730 Returns the titles of all columns of the table.
732 StringSeq GetColumnTitles();
736 Sets the unit of a row with a definite index.
738 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
740 Sets the units for all rows of the table.
742 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
744 Returns the units of all rows of the table.
746 StringSeq GetRowUnits();
750 Returns the number of rows of the table.
754 Returns the number of columns of the table.
758 // operations with rows
760 Adds a row to the end of the table.
762 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
764 Sets the values of all elements of the row.
766 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
768 Returns the row of the table.
770 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
772 // operations with columns
774 Adds a column to the end of the table.
776 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
778 Sets the values of all elements of the column.
780 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
782 Returns the column of the table.
784 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
786 // operations with elements
788 Puts a value in the table.
789 \param theRow The row, where the value will be placed.
790 \param theColumn The column, where the value will be placed.
792 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
794 Returns True if there is a value in the table.
795 \param theRow The row containing the value
796 \param theColumn The column containing the value
798 boolean HasValue(in long theRow, in long theColumn);
800 Returns the value from the table.
801 \param theRow The row containing the value
802 \param theColumn The column containing the value
804 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
807 Sets the max number of colums in the table.
808 \note It'd better to set it before filling the table.
810 void SetNbColumns(in long theNbColumns);
813 Returns the indices of the row where the values are defined.
815 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
816 // operations with files
818 Reads a table from a file.
820 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
822 Saves a table into a file.
824 SALOMEDS::TMPFile SaveToFile();
827 //==========================================================================
828 /*! \brief %AttributeTableOfReal interface
830 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
831 and string titles of this table, of each row, of each column.
832 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
835 //==========================================================================
837 interface AttributeTableOfReal : GenericAttribute
840 This exception is raised when an incorrect index is passed as parameter.
842 exception IncorrectIndex {};
844 This exception is raised when an incorrect length of the argument is passed as parameter.
846 exception IncorrectArgumentLength {};
848 // titles: for table, for each row, for each column
850 Sets the title of the table.
852 void SetTitle(in string theTitle);
854 Returns the title of the table.
858 Sets the title of a row with a definite index.
860 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
862 Sets the titles for all rows of the table.
864 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
866 Returns the titles of all rows of the table.
868 StringSeq GetRowTitles();
870 Sets the title of a column with a definite index.
872 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
874 Sets the titles for all columns of the table.
876 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
878 Returns the titles of all columns of the table.
880 StringSeq GetColumnTitles();
884 Sets the unit of a row with a definite index.
886 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
888 Sets the units for all rows of the table.
890 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
892 Returns the units of all rows of the table.
894 StringSeq GetRowUnits();
898 Returns the number of rows of the table.
902 Returns the number of columns of the table.
906 // operations with rows
908 Adds a row to the end of the table.
910 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
912 Sets the values of all elements of the row.
914 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
916 Returns the row of the table.
918 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
920 // operations with columns
922 Adds a column to the end of the table.
924 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
926 Sets the values of all elements of the column.
928 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
930 Returns the column of the table.
932 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
934 // operations with elements
936 Puts a value in the table.
937 \param theRow The row, where the value will be placed.
938 \param theColumn The column, where the value will be placed.
940 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
942 Returns True if there is a value in the table.
943 \param theRow The row containing the value
944 \param theColumn The column containing the value
946 boolean HasValue(in long theRow, in long theColumn);
948 Returns the value from the table.
949 \param theRow The row containing the value
950 \param theColumn The column containing the value
952 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
955 Sets the max number of colums in the table.
956 \note It'd better to set it before filling the table.
958 void SetNbColumns(in long theNbColumns);
961 Returns the indices of the row where the values are defined.
963 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
964 // operations with files
966 Reads a table from a file.
968 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
970 Saves a table into a file.
972 SALOMEDS::TMPFile SaveToFile();
977 //==========================================================================
978 /*! \brief %AttributeTableOfString interface
980 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
981 and string titles of this table, of each row, of each column.
982 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
985 //==========================================================================
987 interface AttributeTableOfString : GenericAttribute
990 This exception is raised when an incorrect index is passed as parameter.
992 exception IncorrectIndex {};
994 This exception is raised when an incorrect length of the argument is passed as parameter.
996 exception IncorrectArgumentLength {};
998 // titles: for table, for each row, for each column
1000 Sets the title of the table.
1002 void SetTitle(in string theTitle);
1004 Returns the title of the table.
1008 Sets the title of a row with a definite index.
1010 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1012 Sets the titles for all rows of the table.
1014 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1016 Returns the titles of all rows of the table.
1018 StringSeq GetRowTitles();
1020 Sets the title of a column with a definite index.
1022 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1024 Sets the titles for all columns of the table.
1026 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1028 Returns the titles of all columns of the table.
1030 StringSeq GetColumnTitles();
1034 Sets the unit of a row with a definite index.
1036 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1038 Sets the units for all rows of the table.
1040 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1042 Returns the units of all rows of the table.
1044 StringSeq GetRowUnits();
1046 // table information
1048 Returns the number of rows of the table.
1052 Returns the number of columns of the table.
1054 long GetNbColumns();
1056 // operations with rows
1058 Adds a row to the end of the table.
1060 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1062 Sets the values of all elements of the row.
1064 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1066 Returns the row of the table.
1068 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1070 // operations with columns
1072 Adds a column to the end of the table.
1074 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1076 Sets the values of all elements of the column.
1078 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1080 Returns the column of the table.
1082 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1084 // operations with elements
1086 Puts a value in the table.
1087 \param theRow The row, where the value will be placed.
1088 \param theColumn The column, where the value will be placed.
1090 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1092 Returns True if there is a value in the table.
1093 \param theRow The row containing the value
1094 \param theColumn The column containing the value
1096 boolean HasValue(in long theRow, in long theColumn);
1098 Returns the value from the table.
1099 \param theRow The row containing the value
1100 \param theColumn The column containing the value
1102 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1105 Sets the max number of colums in the table.
1106 \note It'd better to set it before filling the table.
1108 void SetNbColumns(in long theNbColumns);
1111 Returns the indices of the row where the values are defined.
1113 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1114 // operations with files
1116 Reads a table from a file.
1118 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1120 Saves a table into a file.
1122 SALOMEDS::TMPFile SaveToFile();
1126 //==========================================================================
1127 /*! \brief %AttributeStudyProperties interface
1129 This attribute allows to store study properties: user name, creation date, creation
1130 mode, modified flag, locked flag.
1131 <BR><VAR>See also <A href=exemple/Example20.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1134 //==========================================================================
1136 interface AttributeStudyProperties : GenericAttribute
1139 Sets the name of the author of the %Study
1141 void SetUserName(in string theName);
1143 Returns the name of the user of the %Study.
1144 \note <BR>It returns a null string, if user name is not set
1146 string GetUserName();
1148 Sets creation date of the %Study.
1150 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1152 Returns creation date of the %Study and True if creation date is set.
1154 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1156 Sets creation mode of the %Study.
1157 \note <BR>Creation mode must be: "from scratch" or "copy from".
1159 void SetCreationMode(in string theMode);
1161 Returns creation mode: "from scratch", "copy from", or null string
1162 if creation mode is not set
1164 string GetCreationMode();
1166 Sets the number of transactions executed after the last saving of the document.
1168 void SetModified(in long theModified);
1170 Returns True, if the document has been modified and not saved.
1172 boolean IsModified();
1174 Returns the number of transactions executed after the last saving of the document.
1178 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1180 void SetLocked(in boolean theLocked);
1182 Returns True if the document is locked for modifications.
1186 Appends modification parameters to the modifications list.
1188 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1190 Returns a list of mosdifiers user names, modification dates.
1191 /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.
1193 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1195 //==========================================================================
1196 /*! \brief %AttributePythonObject interface
1198 Attribute allowing to store pyton objects as a sequence of chars.
1200 //==========================================================================
1202 interface AttributePythonObject : GenericAttribute
1205 Sets in the attribute a Python object converted into a sequence of chars.
1206 \param theSequence A sequence of chars.
1207 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1209 void SetObject(in string theSequence, in boolean IsScript);
1211 Returns a Python object stored in the attribute as a sequence of chars.
1215 Returns True if the sequence of bytes stored in the attribute corresponds