1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SALOMEDS_Attributes.idl
23 // Author : Yves FRICAUD
26 /*! \file SALOMEDS_Attributes.idl
27 \brief This file contains a set of interfaces
28 for the attributes which can be assigned to %SObject
30 #ifndef _SALOMEDS_AttributesIDL_
31 #define _SALOMEDS_AttributesIDL_
33 #include "SALOMEDS.idl"
37 //! Sequence of double values
38 typedef sequence <double> DoubleSeq;
39 //! Sequence of long values
40 typedef sequence <long> LongSeq;
41 //! Sequence of string values
42 typedef sequence <string> StringSeq;
43 /*! \brief This structure stores a set of elements defining the color based on RGB palette.
46 used as input parameters for methods necessary for color definition of different items.
56 //==========================================================================
57 /*! \brief Attribute allowing to store a real value
59 Attribute allowing to store a real value
61 //==========================================================================
63 interface AttributeReal : GenericAttribute
65 //! Returns the value of this attribute.
68 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
71 //! Sets the value of this attribute.
74 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
76 void SetValue(in double value);
79 //==========================================================================
80 /*! \brief Attribute allowing to store an integer value
82 Attribute allowing to store an integer value
84 //==========================================================================
85 interface AttributeInteger : GenericAttribute
87 //! Returns the value of this attribute
90 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
94 //! Sets the value of this attribute
97 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
99 void SetValue(in long value);
101 //==========================================================================
102 /*! \brief Attribute - sequence of real values
104 Attribute - sequence of real values, indexing from 1 (like in CASCADE).
106 //==========================================================================
107 interface AttributeSequenceOfReal : GenericAttribute
109 //! Initialization of the attribute with initial data.
111 \param other Initially assigned sequence of real numbers.
113 void Assign (in DoubleSeq other);
114 //! Returns the sequence of real numbers stored in the attribute.
115 DoubleSeq CorbaSequence();
116 /*! \brief Adds to the end of the sequence a real number.
118 \param value A real number added to the sequence.
120 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
122 void Add (in double value);
123 /*! \brief Removes a real number with a definite index
124 from the sequence of real numbers stored in the Attribute.
126 \param index The index of the given real number
128 void Remove(in long index);
129 /*! \brief Substitutes a given real number with a definite index for another real number.
131 \param index The index of the given real number.
132 \param value The value of another real number.
134 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
137 void ChangeValue(in long index, in double value);
138 /*! \brief Returns a given real number with a definite index in the sequence of real numbers stored in the Attribute.
140 \param index The index of the given real number.
142 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
144 double Value(in short index);
145 /*! \brief Returns the length of the sequence of real numbers stored in the Attribute.
147 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
152 //==========================================================================
153 /*! \brief Attribute - sequence of integer
155 Attribute - sequence of integer, indexing from 1 (like in CASCADE)
157 //==========================================================================
158 interface AttributeSequenceOfInteger : GenericAttribute
160 /*! \brief Initialisation of the attribute with initial data.
161 \param other Initially assigned sequence of integer numbers.
163 void Assign (in LongSeq other);
164 //! Returns the sequence of integer numbers stored in the Attribute.
165 LongSeq CorbaSequence();
166 /*! \brief Adds to the end of the sequence an integer number.
168 \param value An integer number added to the sequence.
170 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
173 void Add (in long value);
174 /*! \brief Removes an integer number with a definite index from the sequence of integer numbers stored in the Attribute.
176 \param index The index of the given integer number.
178 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
181 void Remove(in long index);
182 /*! \brief Substitutes an integer number with a definite index for another integer number.
184 \param index The index of the given integer number.
185 \param value The value of another integer number.
188 void ChangeValue(in long index, in long value);
189 /*! \brief Returns a given integer number with a definite index in the sequence of integer numbers stored in the Attribute.
190 \param index The index of the given integer number.
192 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
194 long Value(in short index);
195 /*! \brief Returns the length of the sequence of integer numbers stored in the Attribute.
197 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
203 //==========================================================================
204 /*! \brief Name attribute
206 This attribute stores a string value, which corresponds to the name of the %SObject
207 or to the name of corresponding object.
209 //==========================================================================
211 interface AttributeName : GenericAttribute
213 /*! \brief Returns the value of this attribute
215 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
218 /*! \brief Sets the value of this attribute
220 \param value This parameter defines the value of this attribute.
222 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
224 void SetValue(in string value);
227 //==========================================================================
228 /*! \brief Comment attribute
230 This attribute stores a string value containing supplementary information about
231 the %SObject. In particular it contains the data type of the %SComponent.
233 //==========================================================================
234 interface AttributeComment : GenericAttribute
236 /*! \brief Returns the value of this attribute
238 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
241 /*! \brief Sets the value of this attribute
242 \param value This string parameter defines the value of this attribute - a description of a %SObject.
244 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
246 void SetValue(in string value);
248 //==========================================================================
249 /*! \brief String attribute
251 This attribute stores a string value containing arbitrary information.
253 //==========================================================================
254 interface AttributeString : GenericAttribute
257 Returns the value of this attribute
261 Sets the value of this attribute
262 \param value This string parameter defines the value of this attribute.
264 void SetValue(in string value);
266 //==========================================================================
267 /*! \brief IOR attribute
269 This attribute stores a string value identifying a runtime object.In particular
270 it contains CORBA Interoperable Object Reference.
272 //==========================================================================
273 interface AttributeIOR : GenericAttribute
276 Returns the value of this attribute
278 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
282 Sets the value of this attribute
283 \param value This parameter defines the value of this attribute - IOR of a %SObject.
285 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
287 void SetValue(in string value);
290 //==========================================================================
291 /*! \brief Persistent reference attribute
293 This attribute stores a persistent identifier of the object.
295 //==========================================================================
296 interface AttributePersistentRef : GenericAttribute
299 Returns the value of this attribute
301 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
305 Sets the value of this attribute
306 \param value This parameter defines the value of this attribute.
308 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
310 void SetValue(in string value);
313 //==========================================================================
314 /*! \brief External File definition
316 This attribute stores a path to an External File.
318 //==========================================================================
319 interface AttributeExternalFileDef: GenericAttribute
322 Returns the value of this attribute
323 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
327 Sets the value of this attribute
328 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
330 void SetValue(in string value);
333 //==========================================================================
334 /*! \brief File Type definition
336 This attribute stores an external File Type (see ExternalFileDef attribute).
338 //==========================================================================
339 interface AttributeFileType: GenericAttribute
342 Returns the value of this attribute
343 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
347 Sets the value of this attribute
348 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
350 void SetValue(in string value);
353 //==========================================================================
354 //Below the list of presentation attributes for display study tree in browser
355 //==========================================================================
358 //==========================================================================
359 /*! \brief Drawable flag Attribute.
361 This is a presentation attribute necessary for display of a study tree in the browser.
362 The item associated to a %SObject is created/displayed if TRUE.
364 //==========================================================================
365 interface AttributeDrawable : GenericAttribute
368 Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
370 <em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
373 boolean IsDrawable();
375 Sets the item to be drawable.
377 \param value If the value of this boolean parameter is TRUE (default) the item will be drawable.
379 <em>See \ref example8 for an example of this method usage in batchmode of %SALOME application.</em>
382 void SetDrawable(in boolean value);
385 //==========================================================================
386 /*! \brief Selectable flag Attribute.
388 This is a presentation attribute necessary for display of the study tree in the browser.
389 The item is selectable by %SALOME selection mechanism if TRUE.
391 //==========================================================================
392 interface AttributeSelectable : GenericAttribute
395 Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
398 <em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
401 boolean IsSelectable();
403 Sets the item to be selectable
405 \param value If the value of this parameter is TRUE (the default) the item will be set as selectable.
407 <em>See \ref example9 for an example of this method usage in batchmode of %SALOME application.</em>
410 void SetSelectable(in boolean value);
413 //==========================================================================
414 /*! \brief Expandable flag Attribute.
416 This is a presentation attribute necessary for display of the study tree in the browser.
417 It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE
418 expandable only if it has children.
420 //==========================================================================
421 interface AttributeExpandable : GenericAttribute
424 Returns TRUE if this item is expandable even when it has no children.
426 <em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
429 boolean IsExpandable();
430 /*! Sets this item to be expandable even if it has no children.
432 \param value If the value of this boolean parameter is TRUE, this item will be set as expandable.
434 <em>See \ref example10 for an example of this method usage in batchmode of %SALOME application.</em>
437 void SetExpandable(in boolean value);
440 //==========================================================================
441 /*! \brief Flags Attribute.
443 This interface is intended for storing different object attributes that
444 have only two states (0 and 1).
446 //==========================================================================
448 interface AttributeFlags : GenericAttribute
451 void SetFlags( in long theFlags );
453 boolean Get( in long theFlag );
454 void Set( in long theFlag, in boolean theValue );
457 //==========================================================================
458 /*! \brief Graphic Attribute.
459 This class is intended for storing information about
460 graphic representation of objects in dirrent views
462 //==========================================================================
464 interface AttributeGraphic : GenericAttribute
466 void SetVisibility( in long theViewId, in boolean theValue );
467 boolean GetVisibility( in long theViewId );
470 //==========================================================================
471 /*! \brief Opened flag Attribute.
473 This is a presentation attribute necessary for display of the study tree in the browser.
474 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
475 are not visible) if bool is FALSE.
477 //==========================================================================
478 interface AttributeOpened : GenericAttribute
481 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
483 <em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
488 Sets this item to be open (its children are visible)
490 \param value If the value of this boolean parameter is TRUE this item will be set as open,
491 and as closed if FALSE.
493 <em>See \ref example11 for an example of this method usage in batchmode of %SALOME application.</em>
496 void SetOpened(in boolean value);
498 //==========================================================================
499 /*! \brief TextColorAttribute.
501 This attribute sets the color of an item.
503 //==========================================================================
504 interface AttributeTextColor : GenericAttribute
507 Returns the color of an item.
509 <em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
514 Sets the color of an item.
516 \param value This parameter defines the color of the item.
518 <em>See \ref example12 for an example of this method usage in batchmode of %SALOME application.</em>
521 void SetTextColor(in Color value);
524 //==========================================================================
525 /*! \brief TextHighlightColorAttribute.
527 This attribute sets the highlight color of an item.
529 //==========================================================================
530 interface AttributeTextHighlightColor : GenericAttribute
533 Returns the highlight color of an item.
537 <em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
540 Color TextHighlightColor();
542 Sets the highlight color of an item.
543 \param value This parameter defines the highlight color of the item.
545 <em>See \ref example13 for an example of this method usage in batchmode of %SALOME application.</em>
548 void SetTextHighlightColor(in Color value);
550 //==========================================================================
551 /*! \brief PixMapAttribute.
553 This attribute stores an icon which is put before the name of an item.
555 //==========================================================================
556 interface AttributePixMap : GenericAttribute
559 Returns True if there is an icon before the name of the given item.
563 Returns the name of the icon in the format of a string.
565 <em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
570 Sets the name of the icon.
571 \param value This string parameter defines the name of the icon.
573 <em>See \ref example14 for an example of this method usage in batchmode of %SALOME application.</em>
576 void SetPixMap(in string value);
579 //==========================================================================
580 /*! \brief TreeNodeAttribute.
582 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
583 tree whith its own structure and identifier. The quantity of such trees with different
584 identifiers can be arbitrary.
586 <em>See \ref example18 for an example of usage of the methods of this interface in batchmode of %SALOME application.</em>
589 //==========================================================================
590 interface AttributeTreeNode : GenericAttribute
593 Assigns the father tree node to this tree node.
595 void SetFather(in AttributeTreeNode value);
597 Returns True if there is a father tree node of this tree node.
601 Returns the father tree node of this tree node.
603 AttributeTreeNode GetFather();
605 Assigns the previous brother tree node to the given tree node.
607 void SetPrevious(in AttributeTreeNode value);
609 Returns True if there is the previous brother tree node of this tree node.
611 boolean HasPrevious();
613 Returns the previous brother tree node of this tree node.
615 AttributeTreeNode GetPrevious();
617 Sets the next brother tree node to this tree node.
619 void SetNext(in AttributeTreeNode value);
621 Returns True if there is the next brother tree node of this tree node.
625 Returns the previous brother tree node of this tree node.
627 AttributeTreeNode GetNext();
629 Sets the first child tree node to this tree node.
631 void SetFirst(in AttributeTreeNode value);
633 Returns True if there is the first child tree node of this tree node.
637 Returns the first child tree node of this tree node.
639 AttributeTreeNode GetFirst();
642 \param value String parameter defining the ID of a tree.
643 \note <br>Tree nodes of one tree have the same ID.
645 void SetTreeID(in string value);
648 \return An ID of a tree in the format of a string.
653 Adds a child tree node to the end of the list of children of this tree node.
655 void Append(in AttributeTreeNode value);
657 Adds a child tree node to the beginning of the list of children of this tree node.
660 void Prepend(in AttributeTreeNode value);
662 Adds a brother tree node before this tree node.
663 In this case the both tree nodes will belong to the same father.
665 void InsertBefore(in AttributeTreeNode value);
667 Adds a brother tree node after this tree node.
668 In this case the both tree nodes will belong to the same father.
670 void InsertAfter(in AttributeTreeNode value);
674 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
680 Returns the depth of the tree node in the
681 structure, it means the number of fathers of the given tree node.
682 (i.e.: the depth of the root tree node is 0).
686 Returns True if it is a root tree node.
690 Returns True if this tree node is a descendant of the tree node.
692 boolean IsDescendant(in AttributeTreeNode value);
694 Returns True if this tree node is the father of the tree node.
696 boolean IsFather(in AttributeTreeNode value);
698 Returns True if this tree node is a child of the tree node.
700 boolean IsChild(in AttributeTreeNode value);
702 Returns ID of the according %SObject.
706 //==========================================================================
707 /*! \brief LocalID attribute
709 Attribute describing the link between a %SObject and a local object in the component.
711 //==========================================================================
712 interface AttributeLocalID : GenericAttribute
715 Returns the value of this attribute.
717 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
721 Sets the value of this attribute.
723 \param value This parameter defines the local ID which will be set.
725 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
727 void SetValue(in long value);
730 //==========================================================================
731 /*! \brief Attribute storing GUID
733 Attribute allowing to store GUID
735 //==========================================================================
736 interface AttributeUserID : GenericAttribute
739 Returns the value of this attribute
741 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
745 Sets the value of this attribute
747 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
749 void SetValue(in string value);
752 //==========================================================================
753 /*! \brief %AttributeTarget iterface
755 This attribute stores the list of all %SObjects that refer
756 to this %SObject. This attribute is used for inner purposes of the application.
757 It is also needed for optimization.
759 //==========================================================================
761 interface AttributeTarget : GenericAttribute
764 Adds a %SObject to the list of %SObjects which refer to this %SObject.
766 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
769 void Add(in SObject anObject);
771 Returns a list of %SObjects which refer to this %SObject.
773 SALOMEDS::Study::ListOfSObject Get();
775 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
777 <em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
780 void Remove(in SObject anObject);
782 //==========================================================================
783 /*! \brief %AttributeTableOfInteger interface
785 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
786 and string titles of this table, of each row, of each column.
788 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
791 //==========================================================================
793 interface AttributeTableOfInteger : GenericAttribute
795 //! This exception is raised when an incorrect index is passed as parameter.
796 exception IncorrectIndex {};
797 //! This exception is raised when an incorrect length of the argument is passed as parameter.
798 exception IncorrectArgumentLength {};
800 // titles: for table, for each row, for each column
802 Sets the title of the table.
804 void SetTitle(in string theTitle);
806 Returns the title of the table.
810 Sets the title of a row with a definite index.
812 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
814 Sets the titles for all rows of the table.
816 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
818 Returns the titles of all rows of the table.
820 StringSeq GetRowTitles();
822 Sets the title of a column with a definite index.
824 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
826 Sets the titles for all columns of the table.
828 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
830 Returns the titles of all columns of the table.
832 StringSeq GetColumnTitles();
836 Sets the unit of a row with a definite index.
838 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
840 Sets the units for all rows of the table.
842 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
844 Returns the units of all rows of the table.
846 StringSeq GetRowUnits();
850 Returns the number of rows of the table.
854 Returns the number of columns of the table.
858 // operations with rows
860 Adds a row to the end of the table.
861 \param theData A sequence of long values which will be set as elements of the added row.
863 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
865 Sets the elements of a definite row.
866 \param theRow The number of the row.
867 \param theData A sequence of long values which will be set as elements of this row.
870 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
872 Gets the row of the table.
874 \param theRow The number of the row.
875 \return A sequence of long values which are set as elements of this row.
877 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
879 // operations with columns
881 Adds a column to the end of the table.
883 \param theData A sequence of long values which will be set as elements of this column.
885 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
887 Sets the values of all elements of the column.
889 \param theData A sequence of long values which will be set as elements of this column.
891 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
893 Returns the column of the table.
895 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
897 // operations with elements
899 Puts a value in the table.
900 \param theRow The row, where the value will be placed.
901 \param theColumn The column, where the value will be placed.
903 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
905 Returns True if there is a value in the table.
906 \param theRow The row containing the value
907 \param theColumn The column containing the value
909 boolean HasValue(in long theRow, in long theColumn);
911 Returns the value from the table.
912 \param theRow The row containing the value
913 \param theColumn The column containing the value
915 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
918 Sets the max number of colums in the table.
919 \note It'd better to set it before filling the table.
921 void SetNbColumns(in long theNbColumns);
924 Returns the indices of the row where the values are defined.
926 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
927 // operations with files
929 Reads a table from a file.
931 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
933 Saves a table into a file.
935 SALOMEDS::TMPFile SaveToFile();
938 //==========================================================================
939 /*! \brief %AttributeTableOfReal interface
941 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
942 and string titles of this table, of each row, of each column.
943 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
946 //==========================================================================
948 interface AttributeTableOfReal : GenericAttribute
950 //! This exception is raised when an incorrect index is passed as parameter.
951 exception IncorrectIndex {};
952 //! This exception is raised when an incorrect length of the argument is passed as parameter.
953 exception IncorrectArgumentLength {};
955 // titles: for table, for each row, for each column
957 Sets the title of the table.
959 void SetTitle(in string theTitle);
961 Returns the title of the table.
965 Sets the title of a row with a definite index.
967 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
969 Sets the titles for all rows of the table.
971 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
973 Returns the titles of all rows of the table.
975 StringSeq GetRowTitles();
977 Sets the title of a column with a definite index.
979 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
981 Sets the titles for all columns of the table.
983 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
985 Returns the titles of all columns of the table.
987 StringSeq GetColumnTitles();
991 Sets the unit of a row with a definite index.
993 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
995 Sets the units for all rows of the table.
997 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
999 Returns the units of all rows of the table.
1001 StringSeq GetRowUnits();
1003 // table information
1005 Returns the number of rows of the table.
1009 Returns the number of columns of the table.
1011 long GetNbColumns();
1013 // operations with rows
1015 Adds a row to the end of the table.
1017 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
1019 Sets the values of all elements of the row.
1021 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1023 Returns the row of the table.
1025 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1027 // operations with columns
1029 Adds a column to the end of the table.
1031 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1033 Sets the values of all elements of the column.
1035 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1037 Returns the column of the table.
1039 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1041 // operations with elements
1043 Puts a value in the table.
1044 \param theRow The row, where the value will be placed.
1045 \param theColumn The column, where the value will be placed.
1047 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1049 Returns True if there is a value in the table.
1050 \param theRow The row containing the value
1051 \param theColumn The column containing the value
1053 boolean HasValue(in long theRow, in long theColumn);
1055 Returns the value from the table.
1056 \param theRow The row containing the value
1057 \param theColumn The column containing the value
1059 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1062 Sets the max number of colums in the table.
1063 \note It'd better to set it before filling the table.
1065 void SetNbColumns(in long theNbColumns);
1068 Returns the indices of the row where the values are defined.
1070 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1071 // operations with files
1073 Reads a table from a file.
1075 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1077 Saves a table into a file.
1079 SALOMEDS::TMPFile SaveToFile();
1084 //==========================================================================
1085 /*! \brief %AttributeTableOfString interface
1087 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1088 and string titles of this table, of each row, of each column.
1089 <em>See \ref example21 for an example of usage of these methods in batchmode of %SALOME application.</em>
1092 //==========================================================================
1094 interface AttributeTableOfString : GenericAttribute
1096 //! This exception is raised when an incorrect index is passed as parameter.
1097 exception IncorrectIndex {};
1098 //! This exception is raised when an incorrect length of the argument is passed as parameter.
1099 exception IncorrectArgumentLength {};
1101 // titles: for table, for each row, for each column
1103 Sets the title of the table.
1105 void SetTitle(in string theTitle);
1107 Returns the title of the table.
1111 Sets the title of a row with a definite index.
1113 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1115 Sets the titles for all rows of the table.
1117 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1119 Returns the titles of all rows of the table.
1121 StringSeq GetRowTitles();
1123 Sets the title of a column with a definite index.
1125 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1127 Sets the titles for all columns of the table.
1129 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1131 Returns the titles of all columns of the table.
1133 StringSeq GetColumnTitles();
1137 Sets the unit of a row with a definite index.
1139 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1141 Sets the units for all rows of the table.
1143 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1145 Returns the units of all rows of the table.
1147 StringSeq GetRowUnits();
1149 // table information
1151 Returns the number of rows of the table.
1155 Returns the number of columns of the table.
1157 long GetNbColumns();
1159 // operations with rows
1161 Adds a row to the end of the table.
1163 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1165 Sets the values of all elements of the row.
1167 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1169 Returns the row of the table.
1171 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1173 // operations with columns
1175 Adds a column to the end of the table.
1177 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1179 Sets the values of all elements of the column.
1181 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1183 Returns the column of the table.
1185 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1187 // operations with elements
1189 Puts a value in the table.
1190 \param theRow The row, where the value will be placed.
1191 \param theColumn The column, where the value will be placed.
1193 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1195 Returns True if there is a value in the table.
1196 \param theRow The row containing the value
1197 \param theColumn The column containing the value
1199 boolean HasValue(in long theRow, in long theColumn);
1201 Returns the value from the table.
1202 \param theRow The row containing the value
1203 \param theColumn The column containing the value
1205 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1208 Sets the max number of colums in the table.
1209 \note It'd better to set it before filling the table.
1211 void SetNbColumns(in long theNbColumns);
1214 Returns the indices of the row where the values are defined.
1216 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1217 // operations with files
1219 Reads a table from a file.
1221 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1223 Saves a table into a file.
1225 SALOMEDS::TMPFile SaveToFile();
1229 //==========================================================================
1230 /*! \brief %AttributeStudyProperties interface
1232 This attribute allows to store study properties: user name, creation date, creation
1233 mode, modified flag, locked flag.
1234 <em>See \ref example20 for an example of usage of these methods in batchmode of %SALOME application.</em>
1237 //==========================================================================
1239 interface AttributeStudyProperties : GenericAttribute
1242 Sets the name of the author of the %Study
1244 void SetUserName(in string theName);
1246 Returns the name of the user of the %Study.
1247 \note <BR>It returns a null string, if user name is not set
1249 string GetUserName();
1251 Sets creation date of the %Study.
1253 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1255 Returns creation date of the %Study and True if creation date is set.
1257 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1259 Sets creation mode of the %Study.
1260 \note <BR>Creation mode must be: "from scratch" or "copy from".
1262 void SetCreationMode(in string theMode);
1264 Returns creation mode: "from scratch", "copy from", or null string
1265 if creation mode is not set
1267 string GetCreationMode();
1269 Sets the number of transactions executed after the last saving of the document.
1271 void SetModified(in long theModified);
1273 Returns True, if the document has been modified and not saved.
1275 boolean IsModified();
1277 Returns the number of transactions executed after the last saving of the document.
1281 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1283 void SetLocked(in boolean theLocked);
1285 Returns True if the document is locked for modifications.
1289 Appends modification parameters to the modifications list.
1291 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1293 Returns a list of mosdifiers user names, modification dates.
1294 /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.
1296 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1298 //==========================================================================
1299 /*! \brief %AttributePythonObject interface
1301 Attribute allowing to store pyton objects as a sequence of chars.
1303 //==========================================================================
1305 interface AttributePythonObject : GenericAttribute
1308 Sets in the attribute a Python object converted into a sequence of chars.
1309 \param theSequence A sequence of chars.
1310 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1312 void SetObject(in string theSequence, in boolean IsScript);
1314 Returns a Python object stored in the attribute as a sequence of chars.
1318 Returns True if the sequence of bytes stored in the attribute corresponds
1323 //==========================================================================
1324 /*! \brief %AttributeParameter interface
1326 Attribute is a universal container of basic types
1328 //==========================================================================
1329 interface AttributeParameter : GenericAttribute
1332 Associates a integer value with the ID
1333 \param theID An ID of a parameter.
1334 \param theValue A value of the parameter
1336 void SetInt(in string theID, in long theValue);
1338 Returns a int value associated with the given ID
1339 \param theID An ID of a parameter.
1341 long GetInt(in string theID);
1344 Associates a real value with the ID
1345 \param theID An ID of a parameter.
1346 \param theValue A value of the parameter
1348 void SetReal(in string theID, in double theValue);
1350 Returns a real value associated with the given ID
1351 \param theID An ID of a parameter.
1353 double GetReal(in string theID);
1356 Associates a string value with the ID
1357 \param theID An ID of a parameter.
1358 \param theValue A value of the parameter
1360 void SetString(in string theID, in string theValue);
1362 Returns a string value associated with the given ID
1363 \param theID An ID of a parameter.
1365 string GetString(in string theID);
1368 Associates a boolean value with the ID
1369 \param theID An ID of a parameter.
1370 \param theValue A value of the parameter
1372 void SetBool(in string theID, in boolean theValue);
1374 Returns a boolean value associated with the given ID
1375 \param theID An ID of a parameter.
1377 boolean GetBool(in string theID);
1380 Associates an array of real values with the ID
1381 \param theID An ID of a parameter.
1382 \param theArray The array of real values
1384 void SetRealArray(in string theID, in DoubleSeq theArray);
1386 Returns an array of real values associated with the ID
1387 \param theID An ID of a parameter.
1389 DoubleSeq GetRealArray(in string theID);
1392 Associates an array of integer values with the ID
1393 \param theID An ID of a parameter.
1394 \param theArray The array of integer values
1396 void SetIntArray(in string theID, in LongSeq theArray);
1398 Returns an array of integer values associated with the ID
1399 \param theID An ID of a parameter.
1401 LongSeq GetIntArray(in string theID);
1404 Associates an array of string values with the ID
1405 \param theID An ID of a parameter.
1406 \param theArray The array of string values
1408 void SetStrArray(in string theID, in StringSeq theArray);
1410 Returns an array of string values associated with the ID
1411 \param theID An ID of a parameter.
1413 StringSeq GetStrArray(in string theID);
1415 Returns True if for the ID of given type was assigned a value in the attribute
1416 \param theID An ID of a parameter.
1417 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1419 boolean IsSet(in string theID, in long theType);
1421 Removes a parameter with given ID and Type, returns True if succeded
1422 \param theID An ID of a parameter.
1423 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1425 boolean RemoveID(in string theID, in long theType);
1427 Returns a father attribute of this attribute
1429 AttributeParameter GetFather();
1431 Returns True if this attribute has a father attribute
1433 boolean HasFather();
1435 Returns True if this attribute is a root attribute
1439 Clears the content of the attribute
1443 Returns a sequence of ID's of the give type
1444 \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)].
1446 StringSeq GetIDs(in long theType);