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 Flags Attribute.
445 This interface is intended for storing different object attributes that
446 have only two states (0 and 1).
448 //==========================================================================
450 interface AttributeFlags : GenericAttribute
453 void SetFlags( in long theFlags );
455 boolean Get( in long theFlag );
456 void Set( in long theFlag, in boolean theValue );
459 //==========================================================================
460 /*! \brief Graphic Attribute.
461 This class is intended for storing information about
462 graphic representation of objects in dirrent views
464 //==========================================================================
466 interface AttributeGraphic : GenericAttribute
468 void SetVisibility( in long theViewId, in boolean theValue );
469 boolean GetVisibility( in long theViewId );
472 //==========================================================================
473 /*! \brief Opened flag Attribute.
475 This is a presentation attribute necessary for display of the study tree in the browser.
476 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
477 are not visible) if bool is FALSE.
479 //==========================================================================
480 interface AttributeOpened : GenericAttribute
483 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
485 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
490 Sets this item to be open (its children are visible)
492 \param value If the value of this boolean parameter is TRUE this item will be set as open,
493 and as closed if FALSE.
495 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
498 void SetOpened(in boolean value);
500 //==========================================================================
501 /*! \brief TextColorAttribute.
503 This attribute sets the color of an item.
505 //==========================================================================
506 interface AttributeTextColor : GenericAttribute
509 Returns the color of an item.
511 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
516 Sets the color of an item.
518 \param value This parameter defines the color of the item.
520 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
523 void SetTextColor(in Color value);
526 //==========================================================================
527 /*! \brief TextHighlightColorAttribute.
529 This attribute sets the highlight color of an item.
531 //==========================================================================
532 interface AttributeTextHighlightColor : GenericAttribute
535 Returns the highlight color of an item.
539 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
542 Color TextHighlightColor();
544 Sets the highlight color of an item.
545 \param value This parameter defines the highlight color of the item.
547 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
550 void SetTextHighlightColor(in Color value);
552 //==========================================================================
553 /*! \brief PixMapAttribute.
555 This attribute stores an icon which is put before the name of an item.
557 //==========================================================================
558 interface AttributePixMap : GenericAttribute
561 Returns True if there is an icon before the name of the given item.
565 Returns the name of the icon in the format of a string.
567 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
572 Sets the name of the icon.
573 \param value This string parameter defines the name of the icon.
575 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
578 void SetPixMap(in string value);
581 //==========================================================================
582 /*! \brief TreeNodeAttribute.
584 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
585 tree whith its own structure and identifier. The quantity of such trees with different
586 identifiers can be arbitrary.
588 <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>
591 //==========================================================================
592 interface AttributeTreeNode : GenericAttribute
595 Assigns the father tree node to this tree node.
597 void SetFather(in AttributeTreeNode value);
599 Returns True if there is a father tree node of this tree node.
603 Returns the father tree node of this tree node.
605 AttributeTreeNode GetFather();
607 Assigns the previous brother tree node to the given tree node.
609 void SetPrevious(in AttributeTreeNode value);
611 Returns True if there is the previous brother tree node of this tree node.
613 boolean HasPrevious();
615 Returns the previous brother tree node of this tree node.
617 AttributeTreeNode GetPrevious();
619 Sets the next brother tree node to this tree node.
621 void SetNext(in AttributeTreeNode value);
623 Returns True if there is the next brother tree node of this tree node.
627 Returns the previous brother tree node of this tree node.
629 AttributeTreeNode GetNext();
631 Sets the first child tree node to this tree node.
633 void SetFirst(in AttributeTreeNode value);
635 Returns True if there is the first child tree node of this tree node.
639 Returns the first child tree node of this tree node.
641 AttributeTreeNode GetFirst();
644 \param value String parameter defining the ID of a tree.
645 \note <br>Tree nodes of one tree have the same ID.
647 void SetTreeID(in string value);
650 \return An ID of a tree in the format of a string.
655 Adds a child tree node to the end of the list of children of this tree node.
657 void Append(in AttributeTreeNode value);
659 Adds a child tree node to the beginning of the list of children of this tree node.
662 void Prepend(in AttributeTreeNode value);
664 Adds a brother tree node before this tree node.
665 In this case the both tree nodes will belong to the same father.
667 void InsertBefore(in AttributeTreeNode value);
669 Adds a brother tree node after this tree node.
670 In this case the both tree nodes will belong to the same father.
672 void InsertAfter(in AttributeTreeNode value);
676 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
682 Returns the depth of the tree node in the
683 structure, it means the number of fathers of the given tree node.
684 (i.e.: the depth of the root tree node is 0).
688 Returns True if it is a root tree node.
692 Returns True if this tree node is a descendant of the tree node.
694 boolean IsDescendant(in AttributeTreeNode value);
696 Returns True if this tree node is the father of the tree node.
698 boolean IsFather(in AttributeTreeNode value);
700 Returns True if this tree node is a child of the tree node.
702 boolean IsChild(in AttributeTreeNode value);
704 Returns ID of the according %SObject.
708 //==========================================================================
709 /*! \brief LocalID attribute
711 Attribute describing the link between a %SObject and a local object in the component.
713 //==========================================================================
714 interface AttributeLocalID : GenericAttribute
717 Returns 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>
723 Sets the value of this attribute.
725 \param value This parameter defines the local ID which will be set.
727 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
729 void SetValue(in long value);
732 //==========================================================================
733 /*! \brief Attribute storing GUID
735 Attribute allowing to store GUID
737 //==========================================================================
738 interface AttributeUserID : GenericAttribute
741 Returns the value of this attribute
743 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
747 Sets the value of this attribute
749 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
751 void SetValue(in string value);
754 //==========================================================================
755 /*! \brief %AttributeTarget iterface
757 This attribute stores the list of all %SObjects that refer
758 to this %SObject. This attribute is used for inner purposes of the application.
759 It is also needed for optimization.
761 //==========================================================================
763 interface AttributeTarget : GenericAttribute
766 Adds a %SObject to the list of %SObjects which refer to this %SObject.
768 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
771 void Add(in SObject anObject);
773 Returns a list of %SObjects which refer to this %SObject.
775 SALOMEDS::Study::ListOfSObject Get();
777 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
779 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
782 void Remove(in SObject anObject);
784 //==========================================================================
785 /*! \brief %AttributeTableOfInteger interface
787 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
788 and string titles of this table, of each row, of each column.
790 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
793 //==========================================================================
795 interface AttributeTableOfInteger : GenericAttribute
798 This exception is raised when an incorrect index is passed as parameter.
800 exception IncorrectIndex {};
802 This exception is raised when an incorrect length of the argument is passed as parameter.
804 exception IncorrectArgumentLength {};
806 // titles: for table, for each row, for each column
808 Sets the title of the table.
810 void SetTitle(in string theTitle);
812 Returns the title of the table.
816 Sets the title of a row with a definite index.
818 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
820 Sets the titles for all rows of the table.
822 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
824 Returns the titles of all rows of the table.
826 StringSeq GetRowTitles();
828 Sets the title of a column with a definite index.
830 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
832 Sets the titles for all columns of the table.
834 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
836 Returns the titles of all columns of the table.
838 StringSeq GetColumnTitles();
842 Sets the unit of a row with a definite index.
844 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
846 Sets the units for all rows of the table.
848 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
850 Returns the units of all rows of the table.
852 StringSeq GetRowUnits();
856 Returns the number of rows of the table.
860 Returns the number of columns of the table.
864 // operations with rows
866 Adds a row to the end of the table.
867 \param theData A sequence of long values which will be set as elements of the added row.
869 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
871 Sets the elements of a definite row.
872 \param theRow The number of the row.
873 \param theData A sequence of long values which will be set as elements of this row.
876 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
878 Gets the row of the table.
880 \param theRow The number of the row.
881 \return A sequence of long values which are set as elements of this row.
883 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
885 // operations with columns
887 Adds a column to the end of the table.
889 \param theData A sequence of long values which will be set as elements of this column.
891 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
893 Sets the values of all elements of the column.
895 \param theData A sequence of long values which will be set as elements of this column.
897 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
899 Returns the column of the table.
901 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
903 // operations with elements
905 Puts a value in the table.
906 \param theRow The row, where the value will be placed.
907 \param theColumn The column, where the value will be placed.
909 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
911 Returns True if there is a value in the table.
912 \param theRow The row containing the value
913 \param theColumn The column containing the value
915 boolean HasValue(in long theRow, in long theColumn);
917 Returns the value from the table.
918 \param theRow The row containing the value
919 \param theColumn The column containing the value
921 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
924 Sets the max number of colums in the table.
925 \note It'd better to set it before filling the table.
927 void SetNbColumns(in long theNbColumns);
930 Returns the indices of the row where the values are defined.
932 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
933 // operations with files
935 Reads a table from a file.
937 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
939 Saves a table into a file.
941 SALOMEDS::TMPFile SaveToFile();
944 //==========================================================================
945 /*! \brief %AttributeTableOfReal interface
947 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
948 and string titles of this table, of each row, of each column.
949 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
952 //==========================================================================
954 interface AttributeTableOfReal : GenericAttribute
957 This exception is raised when an incorrect index is passed as parameter.
959 exception IncorrectIndex {};
961 This exception is raised when an incorrect length of the argument is passed as parameter.
963 exception IncorrectArgumentLength {};
965 // titles: for table, for each row, for each column
967 Sets the title of the table.
969 void SetTitle(in string theTitle);
971 Returns the title of the table.
975 Sets the title of a row with a definite index.
977 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
979 Sets the titles for all rows of the table.
981 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
983 Returns the titles of all rows of the table.
985 StringSeq GetRowTitles();
987 Sets the title of a column with a definite index.
989 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
991 Sets the titles for all columns of the table.
993 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
995 Returns the titles of all columns of the table.
997 StringSeq GetColumnTitles();
1001 Sets the unit of a row with a definite index.
1003 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1005 Sets the units for all rows of the table.
1007 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1009 Returns the units of all rows of the table.
1011 StringSeq GetRowUnits();
1013 // table information
1015 Returns the number of rows of the table.
1019 Returns the number of columns of the table.
1021 long GetNbColumns();
1023 // operations with rows
1025 Adds a row to the end of the table.
1027 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
1029 Sets the values of all elements of the row.
1031 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1033 Returns the row of the table.
1035 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1037 // operations with columns
1039 Adds a column to the end of the table.
1041 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1043 Sets the values of all elements of the column.
1045 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1047 Returns the column of the table.
1049 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1051 // operations with elements
1053 Puts a value in the table.
1054 \param theRow The row, where the value will be placed.
1055 \param theColumn The column, where the value will be placed.
1057 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1059 Returns True if there is a value in the table.
1060 \param theRow The row containing the value
1061 \param theColumn The column containing the value
1063 boolean HasValue(in long theRow, in long theColumn);
1065 Returns the value from the table.
1066 \param theRow The row containing the value
1067 \param theColumn The column containing the value
1069 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1072 Sets the max number of colums in the table.
1073 \note It'd better to set it before filling the table.
1075 void SetNbColumns(in long theNbColumns);
1078 Returns the indices of the row where the values are defined.
1080 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1081 // operations with files
1083 Reads a table from a file.
1085 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1087 Saves a table into a file.
1089 SALOMEDS::TMPFile SaveToFile();
1094 //==========================================================================
1095 /*! \brief %AttributeTableOfString interface
1097 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1098 and string titles of this table, of each row, of each column.
1099 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1102 //==========================================================================
1104 interface AttributeTableOfString : GenericAttribute
1107 This exception is raised when an incorrect index is passed as parameter.
1109 exception IncorrectIndex {};
1111 This exception is raised when an incorrect length of the argument is passed as parameter.
1113 exception IncorrectArgumentLength {};
1115 // titles: for table, for each row, for each column
1117 Sets the title of the table.
1119 void SetTitle(in string theTitle);
1121 Returns the title of the table.
1125 Sets the title of a row with a definite index.
1127 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1129 Sets the titles for all rows of the table.
1131 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1133 Returns the titles of all rows of the table.
1135 StringSeq GetRowTitles();
1137 Sets the title of a column with a definite index.
1139 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1141 Sets the titles for all columns of the table.
1143 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1145 Returns the titles of all columns of the table.
1147 StringSeq GetColumnTitles();
1151 Sets the unit of a row with a definite index.
1153 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1155 Sets the units for all rows of the table.
1157 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1159 Returns the units of all rows of the table.
1161 StringSeq GetRowUnits();
1163 // table information
1165 Returns the number of rows of the table.
1169 Returns the number of columns of the table.
1171 long GetNbColumns();
1173 // operations with rows
1175 Adds a row to the end of the table.
1177 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1179 Sets the values of all elements of the row.
1181 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1183 Returns the row of the table.
1185 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1187 // operations with columns
1189 Adds a column to the end of the table.
1191 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1193 Sets the values of all elements of the column.
1195 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1197 Returns the column of the table.
1199 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1201 // operations with elements
1203 Puts a value in the table.
1204 \param theRow The row, where the value will be placed.
1205 \param theColumn The column, where the value will be placed.
1207 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1209 Returns True if there is a value in the table.
1210 \param theRow The row containing the value
1211 \param theColumn The column containing the value
1213 boolean HasValue(in long theRow, in long theColumn);
1215 Returns the value from the table.
1216 \param theRow The row containing the value
1217 \param theColumn The column containing the value
1219 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1222 Sets the max number of colums in the table.
1223 \note It'd better to set it before filling the table.
1225 void SetNbColumns(in long theNbColumns);
1228 Returns the indices of the row where the values are defined.
1230 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1231 // operations with files
1233 Reads a table from a file.
1235 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1237 Saves a table into a file.
1239 SALOMEDS::TMPFile SaveToFile();
1243 //==========================================================================
1244 /*! \brief %AttributeStudyProperties interface
1246 This attribute allows to store study properties: user name, creation date, creation
1247 mode, modified flag, locked flag.
1248 <BR><VAR>See also <A href=exemple/Example20.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1251 //==========================================================================
1253 interface AttributeStudyProperties : GenericAttribute
1256 Sets the name of the author of the %Study
1258 void SetUserName(in string theName);
1260 Returns the name of the user of the %Study.
1261 \note <BR>It returns a null string, if user name is not set
1263 string GetUserName();
1265 Sets creation date of the %Study.
1267 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1269 Returns creation date of the %Study and True if creation date is set.
1271 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1273 Sets creation mode of the %Study.
1274 \note <BR>Creation mode must be: "from scratch" or "copy from".
1276 void SetCreationMode(in string theMode);
1278 Returns creation mode: "from scratch", "copy from", or null string
1279 if creation mode is not set
1281 string GetCreationMode();
1283 Sets the number of transactions executed after the last saving of the document.
1285 void SetModified(in long theModified);
1287 Returns True, if the document has been modified and not saved.
1289 boolean IsModified();
1291 Returns the number of transactions executed after the last saving of the document.
1295 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1297 void SetLocked(in boolean theLocked);
1299 Returns True if the document is locked for modifications.
1303 Appends modification parameters to the modifications list.
1305 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1307 Returns a list of mosdifiers user names, modification dates.
1308 /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.
1310 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1312 //==========================================================================
1313 /*! \brief %AttributePythonObject interface
1315 Attribute allowing to store pyton objects as a sequence of chars.
1317 //==========================================================================
1319 interface AttributePythonObject : GenericAttribute
1322 Sets in the attribute a Python object converted into a sequence of chars.
1323 \param theSequence A sequence of chars.
1324 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1326 void SetObject(in string theSequence, in boolean IsScript);
1328 Returns a Python object stored in the attribute as a sequence of chars.
1332 Returns True if the sequence of bytes stored in the attribute corresponds
1337 //==========================================================================
1338 /*! \brief %AttributeParameter interface
1340 Attribute is a universal container of basic types
1342 //==========================================================================
1343 interface AttributeParameter : GenericAttribute
1346 Associates a integer value with the ID
1347 \param theID An ID of a parameter.
1348 \param theValue A value of the parameter
1350 void SetInt(in string theID, in long theValue);
1352 Returns a int value associated with the given ID
1353 \param theID An ID of a parameter.
1355 long GetInt(in string theID);
1358 Associates a real value with the ID
1359 \param theID An ID of a parameter.
1360 \param theValue A value of the parameter
1362 void SetReal(in string theID, in double theValue);
1364 Returns a real value associated with the given ID
1365 \param theID An ID of a parameter.
1367 double GetReal(in string theID);
1370 Associates a string value with the ID
1371 \param theID An ID of a parameter.
1372 \param theValue A value of the parameter
1374 void SetString(in string theID, in string theValue);
1376 Returns a string value associated with the given ID
1377 \param theID An ID of a parameter.
1379 string GetString(in string theID);
1382 Associates a boolean value with the ID
1383 \param theID An ID of a parameter.
1384 \param theValue A value of the parameter
1386 void SetBool(in string theID, in boolean theValue);
1388 Returns a boolean value associated with the given ID
1389 \param theID An ID of a parameter.
1391 boolean GetBool(in string theID);
1394 Associates an array of real values with the ID
1395 \param theID An ID of a parameter.
1396 \param theArray The array of real values
1398 void SetRealArray(in string theID, in DoubleSeq theArray);
1400 Returns an array of real values associated with the ID
1401 \param theID An ID of a parameter.
1403 DoubleSeq GetRealArray(in string theID);
1406 Associates an array of integer values with the ID
1407 \param theID An ID of a parameter.
1408 \param theArray The array of integer values
1410 void SetIntArray(in string theID, in LongSeq theArray);
1412 Returns an array of integer values associated with the ID
1413 \param theID An ID of a parameter.
1415 LongSeq GetIntArray(in string theID);
1418 Associates an array of string values with the ID
1419 \param theID An ID of a parameter.
1420 \param theArray The array of string values
1422 void SetStrArray(in string theID, in StringSeq theArray);
1424 Returns an array of string values associated with the ID
1425 \param theID An ID of a parameter.
1427 StringSeq GetStrArray(in string theID);
1429 Returns True if for the ID of given type was assigned a value in the attribute
1430 \param theID An ID of a parameter.
1431 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1433 boolean IsSet(in string theID, in long theType);
1435 Removes a parameter with given ID and Type, returns True if succeded
1436 \param theID An ID of a parameter.
1437 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1439 boolean RemoveID(in string theID, in long theType);
1441 Returns a father attribute of this attribute
1443 AttributeParameter GetFather();
1445 Returns True if this attribute has a father attribute
1447 boolean HasFather();
1449 Returns True if this attribute is a root attribute
1453 Clears the content of the attribute
1457 Returns a sequence of ID's of the give type
1458 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1460 StringSeq GetIDs(in long theType);