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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 String attribute
271 This attribute stores a string value containing arbitrary information.
273 //==========================================================================
274 interface AttributeString : GenericAttribute
277 Returns the value of this attribute
281 Sets the value of this attribute
282 \param value This string parameter defines the value of this attribute.
284 void SetValue(in string value);
286 //==========================================================================
287 /*! \brief IOR attribute
289 This attribute stores a string value identifying a runtime object.In particular
290 it contains CORBA Interoperable Object Reference.
292 //==========================================================================
293 interface AttributeIOR : GenericAttribute
296 Returns the value of this attribute
298 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
302 Sets the value of this attribute
303 \param value This parameter defines the value of this attribute - IOR of a %SObject.
305 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
307 void SetValue(in string value);
310 //==========================================================================
311 /*! \brief Persistent reference attribute
313 This attribute stores a persistent identifier of the object.
315 //==========================================================================
316 interface AttributePersistentRef : GenericAttribute
319 Returns the value of this attribute
321 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
325 Sets the value of this attribute
326 \param value This parameter defines the value of this attribute.
328 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
330 void SetValue(in string value);
333 //==========================================================================
334 /*! \brief External File definition
336 This attribute stores a path to an External File.
338 //==========================================================================
339 interface AttributeExternalFileDef: GenericAttribute
342 Returns the value of this attribute
343 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
347 Sets the value of this attribute
348 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
350 void SetValue(in string value);
353 //==========================================================================
354 /*! \brief File Type definition
356 This attribute stores an external File Type (see ExternalFileDef attribute).
358 //==========================================================================
359 interface AttributeFileType: GenericAttribute
362 Returns the value of this attribute
363 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
367 Sets the value of this attribute
368 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
370 void SetValue(in string value);
373 //==========================================================================
374 //Below the list of presentation attributes for display study tree in browser
375 //==========================================================================
378 //==========================================================================
379 /*! \brief Drawable flag Attribute.
381 This is a presentation attribute necessary for display of a study tree in the browser.
382 The item associated to a %SObject is created/displayed if TRUE.
384 //==========================================================================
385 interface AttributeDrawable : GenericAttribute
388 Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
390 <BR><VAR>See also <A href="exemple/Example8.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
393 boolean IsDrawable();
395 Sets the item to be drawable.
397 \param value If the value of this boolean parameter is TRUE (default) the item will be drawable.
399 <BR><VAR>See also <A href="exemple/Example8.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
402 void SetDrawable(in boolean value);
405 //==========================================================================
406 /*! \brief Selectable flag Attribute.
408 This is a presentation attribute necessary for display of the study tree in the browser.
409 The item is selectable by %SALOME selection mechanism if TRUE.
411 //==========================================================================
412 interface AttributeSelectable : GenericAttribute
415 Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
418 <BR><VAR>See also <A href="exemple/Example9.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
421 boolean IsSelectable();
423 Sets the item to be selectable
425 \param value If the value of this parameter is TRUE (the default) the item will be set as selectable.
427 <BR><VAR>See also <A href="exemple/Example9.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
430 void SetSelectable(in boolean value);
433 //==========================================================================
434 /*! \brief Expandable flag Attribute.
436 This is a presentation attribute necessary for display of the study tree in the browser.
437 It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE
438 expandable only if it has children.
440 //==========================================================================
441 interface AttributeExpandable : GenericAttribute
444 Returns TRUE if this item is expandable even when it has no children.
446 <BR><VAR>See also <A href="exemple/Example10.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
449 boolean IsExpandable();
450 /*! Sets this item to be expandable even if it has no children.
452 \param value If the value of this boolean parameter is TRUE, this item will be set as expandable.
454 <BR><VAR>See also <A href="exemple/Example10.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
457 void SetExpandable(in boolean value);
460 //==========================================================================
461 /*! \brief Flags Attribute.
463 This interface is intended for storing different object attributes that
464 have only two states (0 and 1).
466 //==========================================================================
468 interface AttributeFlags : GenericAttribute
471 void SetFlags( in long theFlags );
473 boolean Get( in long theFlag );
474 void Set( in long theFlag, in boolean theValue );
477 //==========================================================================
478 /*! \brief Graphic Attribute.
479 This class is intended for storing information about
480 graphic representation of objects in dirrent views
482 //==========================================================================
484 interface AttributeGraphic : GenericAttribute
486 void SetVisibility( in long theViewId, in boolean theValue );
487 boolean GetVisibility( in long theViewId );
490 //==========================================================================
491 /*! \brief Opened flag Attribute.
493 This is a presentation attribute necessary for display of the study tree in the browser.
494 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
495 are not visible) if bool is FALSE.
497 //==========================================================================
498 interface AttributeOpened : GenericAttribute
501 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
503 <BR><VAR>See also <A href="exemple/Example11.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
508 Sets this item to be open (its children are visible)
510 \param value If the value of this boolean parameter is TRUE this item will be set as open,
511 and as closed if FALSE.
513 <BR><VAR>See also <A href="exemple/Example11.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
516 void SetOpened(in boolean value);
518 //==========================================================================
519 /*! \brief TextColorAttribute.
521 This attribute sets the color of an item.
523 //==========================================================================
524 interface AttributeTextColor : GenericAttribute
527 Returns the color of an item.
529 <BR><VAR>See also <A href="exemple/Example12.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
534 Sets the color of an item.
536 \param value This parameter defines the color of the item.
538 <BR><VAR>See also <A href="exemple/Example12.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
541 void SetTextColor(in Color value);
544 //==========================================================================
545 /*! \brief TextHighlightColorAttribute.
547 This attribute sets the highlight color of an item.
549 //==========================================================================
550 interface AttributeTextHighlightColor : GenericAttribute
553 Returns the highlight color of an item.
557 <BR><VAR>See also <A href="exemple/Example13.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
560 Color TextHighlightColor();
562 Sets the highlight color of an item.
563 \param value This parameter defines the highlight color of the item.
565 <BR><VAR>See also <A href="exemple/Example13.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
568 void SetTextHighlightColor(in Color value);
570 //==========================================================================
571 /*! \brief PixMapAttribute.
573 This attribute stores an icon which is put before the name of an item.
575 //==========================================================================
576 interface AttributePixMap : GenericAttribute
579 Returns True if there is an icon before the name of the given item.
583 Returns the name of the icon in the format of a string.
585 <BR><VAR>See also <A href="exemple/Example14.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
590 Sets the name of the icon.
591 \param value This string parameter defines the name of the icon.
593 <BR><VAR>See also <A href="exemple/Example14.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
596 void SetPixMap(in string value);
599 //==========================================================================
600 /*! \brief TreeNodeAttribute.
602 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
603 tree whith its own structure and identifier. The quantity of such trees with different
604 identifiers can be arbitrary.
606 <BR><VAR>See also <A href="exemple/Example18.html"> an example </A> of usage of the methods of this interface in batchmode of %SALOME application.</VAR>
609 //==========================================================================
610 interface AttributeTreeNode : GenericAttribute
613 Assigns the father tree node to this tree node.
615 void SetFather(in AttributeTreeNode value);
617 Returns True if there is a father tree node of this tree node.
621 Returns the father tree node of this tree node.
623 AttributeTreeNode GetFather();
625 Assigns the previous brother tree node to the given tree node.
627 void SetPrevious(in AttributeTreeNode value);
629 Returns True if there is the previous brother tree node of this tree node.
631 boolean HasPrevious();
633 Returns the previous brother tree node of this tree node.
635 AttributeTreeNode GetPrevious();
637 Sets the next brother tree node to this tree node.
639 void SetNext(in AttributeTreeNode value);
641 Returns True if there is the next brother tree node of this tree node.
645 Returns the previous brother tree node of this tree node.
647 AttributeTreeNode GetNext();
649 Sets the first child tree node to this tree node.
651 void SetFirst(in AttributeTreeNode value);
653 Returns True if there is the first child tree node of this tree node.
657 Returns the first child tree node of this tree node.
659 AttributeTreeNode GetFirst();
662 \param value String parameter defining the ID of a tree.
663 \note <br>Tree nodes of one tree have the same ID.
665 void SetTreeID(in string value);
668 \return An ID of a tree in the format of a string.
673 Adds a child tree node to the end of the list of children of this tree node.
675 void Append(in AttributeTreeNode value);
677 Adds a child tree node to the beginning of the list of children of this tree node.
680 void Prepend(in AttributeTreeNode value);
682 Adds a brother tree node before this tree node.
683 In this case the both tree nodes will belong to the same father.
685 void InsertBefore(in AttributeTreeNode value);
687 Adds a brother tree node after this tree node.
688 In this case the both tree nodes will belong to the same father.
690 void InsertAfter(in AttributeTreeNode value);
694 <BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
700 Returns the depth of the tree node in the
701 structure, it means the number of fathers of the given tree node.
702 (i.e.: the depth of the root tree node is 0).
706 Returns True if it is a root tree node.
710 Returns True if this tree node is a descendant of the tree node.
712 boolean IsDescendant(in AttributeTreeNode value);
714 Returns True if this tree node is the father of the tree node.
716 boolean IsFather(in AttributeTreeNode value);
718 Returns True if this tree node is a child of the tree node.
720 boolean IsChild(in AttributeTreeNode value);
722 Returns ID of the according %SObject.
726 //==========================================================================
727 /*! \brief LocalID attribute
729 Attribute describing the link between a %SObject and a local object in the component.
731 //==========================================================================
732 interface AttributeLocalID : GenericAttribute
735 Returns the value of this attribute.
737 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
741 Sets the value of this attribute.
743 \param value This parameter defines the local ID which will be set.
745 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
747 void SetValue(in long value);
750 //==========================================================================
751 /*! \brief Attribute storing GUID
753 Attribute allowing to store GUID
755 //==========================================================================
756 interface AttributeUserID : GenericAttribute
759 Returns the value of this attribute
761 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
765 Sets the value of this attribute
767 <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
769 void SetValue(in string value);
772 //==========================================================================
773 /*! \brief %AttributeTarget iterface
775 This attribute stores the list of all %SObjects that refer
776 to this %SObject. This attribute is used for inner purposes of the application.
777 It is also needed for optimization.
779 //==========================================================================
781 interface AttributeTarget : GenericAttribute
784 Adds a %SObject to the list of %SObjects which refer to this %SObject.
786 <BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
789 void Add(in SObject anObject);
791 Returns a list of %SObjects which refer to this %SObject.
793 SALOMEDS::Study::ListOfSObject Get();
795 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
797 <BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
800 void Remove(in SObject anObject);
802 //==========================================================================
803 /*! \brief %AttributeTableOfInteger interface
805 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
806 and string titles of this table, of each row, of each column.
808 <BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
811 //==========================================================================
813 interface AttributeTableOfInteger : GenericAttribute
816 This exception is raised when an incorrect index is passed as parameter.
818 exception IncorrectIndex {};
820 This exception is raised when an incorrect length of the argument is passed as parameter.
822 exception IncorrectArgumentLength {};
824 // titles: for table, for each row, for each column
826 Sets the title of the table.
828 void SetTitle(in string theTitle);
830 Returns the title of the table.
834 Sets the title of a row with a definite index.
836 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
838 Sets the titles for all rows of the table.
840 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
842 Returns the titles of all rows of the table.
844 StringSeq GetRowTitles();
846 Sets the title of a column with a definite index.
848 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
850 Sets the titles for all columns of the table.
852 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
854 Returns the titles of all columns of the table.
856 StringSeq GetColumnTitles();
860 Sets the unit of a row with a definite index.
862 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
864 Sets the units for all rows of the table.
866 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
868 Returns the units of all rows of the table.
870 StringSeq GetRowUnits();
874 Returns the number of rows of the table.
878 Returns the number of columns of the table.
882 // operations with rows
884 Adds a row to the end of the table.
885 \param theData A sequence of long values which will be set as elements of the added row.
887 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
889 Sets the elements of a definite row.
890 \param theRow The number of the row.
891 \param theData A sequence of long values which will be set as elements of this row.
894 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
896 Gets the row of the table.
898 \param theRow The number of the row.
899 \return A sequence of long values which are set as elements of this row.
901 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
903 // operations with columns
905 Adds a column to the end of the table.
907 \param theData A sequence of long values which will be set as elements of this column.
909 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
911 Sets the values of all elements of the column.
913 \param theData A sequence of long values which will be set as elements of this column.
915 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
917 Returns the column of the table.
919 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
921 // operations with elements
923 Puts a value in the table.
924 \param theRow The row, where the value will be placed.
925 \param theColumn The column, where the value will be placed.
927 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
929 Returns True if there is a value in the table.
930 \param theRow The row containing the value
931 \param theColumn The column containing the value
933 boolean HasValue(in long theRow, in long theColumn);
935 Returns the value from the table.
936 \param theRow The row containing the value
937 \param theColumn The column containing the value
939 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
942 Sets the max number of colums in the table.
943 \note It'd better to set it before filling the table.
945 void SetNbColumns(in long theNbColumns);
948 Returns the indices of the row where the values are defined.
950 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
951 // operations with files
953 Reads a table from a file.
955 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
957 Saves a table into a file.
959 SALOMEDS::TMPFile SaveToFile();
962 //==========================================================================
963 /*! \brief %AttributeTableOfReal interface
965 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
966 and string titles of this table, of each row, of each column.
967 <BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
970 //==========================================================================
972 interface AttributeTableOfReal : GenericAttribute
975 This exception is raised when an incorrect index is passed as parameter.
977 exception IncorrectIndex {};
979 This exception is raised when an incorrect length of the argument is passed as parameter.
981 exception IncorrectArgumentLength {};
983 // titles: for table, for each row, for each column
985 Sets the title of the table.
987 void SetTitle(in string theTitle);
989 Returns the title of the table.
993 Sets the title of a row with a definite index.
995 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
997 Sets the titles for all rows of the table.
999 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1001 Returns the titles of all rows of the table.
1003 StringSeq GetRowTitles();
1005 Sets the title of a column with a definite index.
1007 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1009 Sets the titles for all columns of the table.
1011 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1013 Returns the titles of all columns of the table.
1015 StringSeq GetColumnTitles();
1019 Sets the unit of a row with a definite index.
1021 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1023 Sets the units for all rows of the table.
1025 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1027 Returns the units of all rows of the table.
1029 StringSeq GetRowUnits();
1031 // table information
1033 Returns the number of rows of the table.
1037 Returns the number of columns of the table.
1039 long GetNbColumns();
1041 // operations with rows
1043 Adds a row to the end of the table.
1045 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
1047 Sets the values of all elements of the row.
1049 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1051 Returns the row of the table.
1053 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1055 // operations with columns
1057 Adds a column to the end of the table.
1059 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1061 Sets the values of all elements of the column.
1063 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1065 Returns the column of the table.
1067 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1069 // operations with elements
1071 Puts a value in the table.
1072 \param theRow The row, where the value will be placed.
1073 \param theColumn The column, where the value will be placed.
1075 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1077 Returns True if there is a value in the table.
1078 \param theRow The row containing the value
1079 \param theColumn The column containing the value
1081 boolean HasValue(in long theRow, in long theColumn);
1083 Returns the value from the table.
1084 \param theRow The row containing the value
1085 \param theColumn The column containing the value
1087 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1090 Sets the max number of colums in the table.
1091 \note It'd better to set it before filling the table.
1093 void SetNbColumns(in long theNbColumns);
1096 Returns the indices of the row where the values are defined.
1098 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1099 // operations with files
1101 Reads a table from a file.
1103 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1105 Saves a table into a file.
1107 SALOMEDS::TMPFile SaveToFile();
1112 //==========================================================================
1113 /*! \brief %AttributeTableOfString interface
1115 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1116 and string titles of this table, of each row, of each column.
1117 <BR><VAR>See also <A href="exemple/Example21.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1120 //==========================================================================
1122 interface AttributeTableOfString : GenericAttribute
1125 This exception is raised when an incorrect index is passed as parameter.
1127 exception IncorrectIndex {};
1129 This exception is raised when an incorrect length of the argument is passed as parameter.
1131 exception IncorrectArgumentLength {};
1133 // titles: for table, for each row, for each column
1135 Sets the title of the table.
1137 void SetTitle(in string theTitle);
1139 Returns the title of the table.
1143 Sets the title of a row with a definite index.
1145 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1147 Sets the titles for all rows of the table.
1149 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1151 Returns the titles of all rows of the table.
1153 StringSeq GetRowTitles();
1155 Sets the title of a column with a definite index.
1157 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1159 Sets the titles for all columns of the table.
1161 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1163 Returns the titles of all columns of the table.
1165 StringSeq GetColumnTitles();
1169 Sets the unit of a row with a definite index.
1171 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1173 Sets the units for all rows of the table.
1175 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1177 Returns the units of all rows of the table.
1179 StringSeq GetRowUnits();
1181 // table information
1183 Returns the number of rows of the table.
1187 Returns the number of columns of the table.
1189 long GetNbColumns();
1191 // operations with rows
1193 Adds a row to the end of the table.
1195 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1197 Sets the values of all elements of the row.
1199 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1201 Returns the row of the table.
1203 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1205 // operations with columns
1207 Adds a column to the end of the table.
1209 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1211 Sets the values of all elements of the column.
1213 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1215 Returns the column of the table.
1217 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1219 // operations with elements
1221 Puts a value in the table.
1222 \param theRow The row, where the value will be placed.
1223 \param theColumn The column, where the value will be placed.
1225 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1227 Returns True if there is a value in the table.
1228 \param theRow The row containing the value
1229 \param theColumn The column containing the value
1231 boolean HasValue(in long theRow, in long theColumn);
1233 Returns the value from the table.
1234 \param theRow The row containing the value
1235 \param theColumn The column containing the value
1237 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1240 Sets the max number of colums in the table.
1241 \note It'd better to set it before filling the table.
1243 void SetNbColumns(in long theNbColumns);
1246 Returns the indices of the row where the values are defined.
1248 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1249 // operations with files
1251 Reads a table from a file.
1253 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1255 Saves a table into a file.
1257 SALOMEDS::TMPFile SaveToFile();
1261 //==========================================================================
1262 /*! \brief %AttributeStudyProperties interface
1264 This attribute allows to store study properties: user name, creation date, creation
1265 mode, modified flag, locked flag.
1266 <BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1269 //==========================================================================
1271 interface AttributeStudyProperties : GenericAttribute
1274 Sets the name of the author of the %Study
1276 void SetUserName(in string theName);
1278 Returns the name of the user of the %Study.
1279 \note <BR>It returns a null string, if user name is not set
1281 string GetUserName();
1283 Sets creation date of the %Study.
1285 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1287 Returns creation date of the %Study and True if creation date is set.
1289 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1291 Sets creation mode of the %Study.
1292 \note <BR>Creation mode must be: "from scratch" or "copy from".
1294 void SetCreationMode(in string theMode);
1296 Returns creation mode: "from scratch", "copy from", or null string
1297 if creation mode is not set
1299 string GetCreationMode();
1301 Sets the number of transactions executed after the last saving of the document.
1303 void SetModified(in long theModified);
1305 Returns True, if the document has been modified and not saved.
1307 boolean IsModified();
1309 Returns the number of transactions executed after the last saving of the document.
1313 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1315 void SetLocked(in boolean theLocked);
1317 Returns True if the document is locked for modifications.
1321 Appends modification parameters to the modifications list.
1323 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1325 Returns a list of mosdifiers user names, modification dates.
1326 /note <BR>If <VAR>theWithCreator</VAR> is True, then the output list will also contain the name of the author and the date of creation.
1328 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1330 //==========================================================================
1331 /*! \brief %AttributePythonObject interface
1333 Attribute allowing to store pyton objects as a sequence of chars.
1335 //==========================================================================
1337 interface AttributePythonObject : GenericAttribute
1340 Sets in the attribute a Python object converted into a sequence of chars.
1341 \param theSequence A sequence of chars.
1342 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1344 void SetObject(in string theSequence, in boolean IsScript);
1346 Returns a Python object stored in the attribute as a sequence of chars.
1350 Returns True if the sequence of bytes stored in the attribute corresponds
1355 //==========================================================================
1356 /*! \brief %AttributeParameter interface
1358 Attribute is a universal container of basic types
1360 //==========================================================================
1361 interface AttributeParameter : GenericAttribute
1364 Associates a integer value with the ID
1365 \param theID An ID of a parameter.
1366 \param theValue A value of the parameter
1368 void SetInt(in string theID, in long theValue);
1370 Returns a int value associated with the given ID
1371 \param theID An ID of a parameter.
1373 long GetInt(in string theID);
1376 Associates a real value with the ID
1377 \param theID An ID of a parameter.
1378 \param theValue A value of the parameter
1380 void SetReal(in string theID, in double theValue);
1382 Returns a real value associated with the given ID
1383 \param theID An ID of a parameter.
1385 double GetReal(in string theID);
1388 Associates a string value with the ID
1389 \param theID An ID of a parameter.
1390 \param theValue A value of the parameter
1392 void SetString(in string theID, in string theValue);
1394 Returns a string value associated with the given ID
1395 \param theID An ID of a parameter.
1397 string GetString(in string theID);
1400 Associates a boolean value with the ID
1401 \param theID An ID of a parameter.
1402 \param theValue A value of the parameter
1404 void SetBool(in string theID, in boolean theValue);
1406 Returns a boolean value associated with the given ID
1407 \param theID An ID of a parameter.
1409 boolean GetBool(in string theID);
1412 Associates an array of real values with the ID
1413 \param theID An ID of a parameter.
1414 \param theArray The array of real values
1416 void SetRealArray(in string theID, in DoubleSeq theArray);
1418 Returns an array of real values associated with the ID
1419 \param theID An ID of a parameter.
1421 DoubleSeq GetRealArray(in string theID);
1424 Associates an array of integer values with the ID
1425 \param theID An ID of a parameter.
1426 \param theArray The array of integer values
1428 void SetIntArray(in string theID, in LongSeq theArray);
1430 Returns an array of integer values associated with the ID
1431 \param theID An ID of a parameter.
1433 LongSeq GetIntArray(in string theID);
1436 Associates an array of string values with the ID
1437 \param theID An ID of a parameter.
1438 \param theArray The array of string values
1440 void SetStrArray(in string theID, in StringSeq theArray);
1442 Returns an array of string values associated with the ID
1443 \param theID An ID of a parameter.
1445 StringSeq GetStrArray(in string theID);
1447 Returns True if for the ID of given type was assigned a value in the attribute
1448 \param theID An ID of a parameter.
1449 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1451 boolean IsSet(in string theID, in long theType);
1453 Removes a parameter with given ID and Type, returns True if succeded
1454 \param theID An ID of a parameter.
1455 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1457 boolean RemoveID(in string theID, in long theType);
1459 Returns a father attribute of this attribute
1461 AttributeParameter GetFather();
1463 Returns True if this attribute has a father attribute
1465 boolean HasFather();
1467 Returns True if this attribute is a root attribute
1471 Clears the content of the attribute
1475 Returns a sequence of ID's of the give type
1476 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1478 StringSeq GetIDs(in long theType);