1 // Copyright (C) 2007-2010 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
23 // File : SALOMEDS_Attributes.idl
24 // Author : Yves FRICAUD
27 /*! \file SALOMEDS_Attributes.idl
28 \brief This file contains a set of interfaces
29 for the attributes which can be assigned to SObject
31 #ifndef _SALOMEDS_AttributesIDL_
32 #define _SALOMEDS_AttributesIDL_
34 #include "SALOMEDS.idl"
38 //! Sequence of double values
39 typedef sequence <double> DoubleSeq;
40 //! Sequence of long values
41 typedef sequence <long> LongSeq;
42 //! Sequence of string values
43 typedef sequence <string> StringSeq;
46 \brief Represents the color based on RGB palette.
48 Used by different interfaces to specify the color attributes of different items.
51 //! Red component of the color
53 //! Green component of the color
55 //! Blue component of the color
59 //==========================================================================
61 \brief Attribute allowing to store a real value
63 <em>See \ref example1 for an example of this attribute usage in batchmode of %SALOME application.</em>
65 \sa AttributeInteger, AttributeString
67 //==========================================================================
68 interface AttributeReal : GenericAttribute
71 \brief Returns the value of the attribute.
72 \return attribute value
76 \brief Sets the value of the attribute
77 \param value value being set to the attribute
79 void SetValue(in double value);
83 //==========================================================================
85 \brief Attribute allowing to store an %integer value
87 <em>See \ref example17 for an example of this attribute usage in batchmode of %SALOME application.</em>
89 \sa AttributeReal, AttributeString
91 //==========================================================================
92 interface AttributeInteger : GenericAttribute
95 \brief Returns the value of the attribute.
96 \return attribute value
101 \brief Sets the value of the attribute
102 \param value value being set to the attribute
104 void SetValue(in long value);
107 //==========================================================================
109 \brief Attribute allowing to store a sequence of real values.
110 \note The indices in the sequence start from 1.
112 <em>See \ref example3 for an example of this attribute usage in batchmode of %SALOME application.</em>
114 \sa AttributeSequenceOfInteger
116 //==========================================================================
117 interface AttributeSequenceOfReal : GenericAttribute
120 \brief Initialization of the attribute with initial data.
121 \param other sequence of values assigned to the attribute
123 void Assign (in DoubleSeq other);
125 \brief Returns the sequence of values stored in the attribute.
126 \return sequence of values
128 DoubleSeq CorbaSequence();
130 \brief Adds new value to the end of the sequence.
131 \param value value being added to the sequence
133 void Add (in double value);
135 \brief Removes a value by the specified \a index
136 from the sequence stored in the attribute.
137 \param index index of the value in the sequence to be removed
139 void Remove(in long index);
141 \brief Sets new value to the sequence by the specified \a index.
142 \param index index in the sequence
143 \param value new value being set to the sequence by specified \a index
145 void ChangeValue(in long index, in double value);
147 \brief Returns a value in the sequence specified by its \a index.
148 \param index index in the sequence
149 \return value specified by \a index
151 double Value(in short index);
153 \brief Returns the length of the sequence stored in the attribute.
154 \return sequence length
159 //==========================================================================
161 \brief Attribute allowing to store a sequence of %integer values.
162 \note The indices in the sequence start from 1.
164 <em>See \ref example4 for an example of this attribute usage in batchmode of %SALOME application.</em>
166 \sa AttributeSequenceOfReal
168 //==========================================================================
169 interface AttributeSequenceOfInteger : GenericAttribute
172 \brief Initialization of the attribute with initial data.
173 \param other sequence of values assigned to the attribute
175 void Assign (in LongSeq other);
177 \brief Returns the sequence of values stored in the attribute.
178 \return sequence of values
180 LongSeq CorbaSequence();
182 \brief Adds new value to the end of the sequence.
183 \param value value being added to the sequence
185 void Add (in long value);
187 \brief Removes an value by the specified \a index
188 from the sequence stored in the attribute.
189 \param index index of the value in the sequence to be removed
191 void Remove(in long index);
193 \brief Sets new value to the sequence by the specified \a index.
194 \param index index in the sequence
195 \param value new value being set to the sequence by specified \a index
197 void ChangeValue(in long index, in long value);
199 \brief Returns a value in the sequence specified by its \a index.
200 \param index index in the sequence
201 \return value specified by \a index
203 long Value(in short index);
205 \brief Returns the length of the sequence stored in the attribute.
206 \return sequence length
211 //==========================================================================
213 \brief Name attribute
215 The attribute stores a string value, which corresponds to the name of the SObject
216 or to the name of corresponding %object.
218 <em>See \ref example5 for an example of this attribute usage in batchmode of %SALOME application.</em>
222 //==========================================================================
223 interface AttributeName : GenericAttribute
226 \brief Returns the value assigned to the attribute.
227 \return attribute value
231 \brief Sets the value of the attribute (name of a SObject).
232 \param value value being set to the attribute
234 void SetValue(in string value);
237 //==========================================================================
239 \brief Comment attribute
241 The attribute stores a string value containing supplementary information about
242 the SObject. In particular it contains the data type of the %SComponent.
244 <em>See \ref example6 for an example of this attribute usage in batchmode of %SALOME application.</em>
248 //==========================================================================
249 interface AttributeComment : GenericAttribute
252 \brief Returns the value of the attribute.
253 \return attribute value
257 \brief Sets the value of the attribute (description of a SObject).
258 \param value value being set to the attribute
260 void SetValue(in string value);
263 //==========================================================================
265 \brief String attribute
267 The attribute stores a string value containing arbitrary information.
268 \sa AttributeInteger, AttributeReal
270 //==========================================================================
271 interface AttributeString : GenericAttribute
274 \brief Returns the value of the attribute.
275 \return attribute value
279 \brief Sets the value of the attribute.
280 \param value value being set to the attribute
282 void SetValue(in string value);
285 //==========================================================================
289 The attribute stores a string value identifying a runtime %object.
290 In particular it contains CORBA Interoperable Object Reference.
292 <em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
294 \sa AttributePersistentRef
296 //==========================================================================
297 interface AttributeIOR : GenericAttribute
300 \brief Returns the value of the attribute.
301 \return attribute value
305 \brief Sets the value of the attribute (IOR of a SObject).
306 \param value value being set to the attribute.
308 void SetValue(in string value);
311 //==========================================================================
313 \brief Persistent reference attribute
315 The attribute stores a persistent identifier of the %object. It is a part
316 of SALOME persistence mechanism .
318 <em>See \ref example7 for an example of this method usage in batchmode of %SALOME application.</em>
322 //==========================================================================
323 interface AttributePersistentRef : GenericAttribute
326 \brief Returns the value of the attribute.
327 \return attribute value
331 \brief Sets the value of the attribute.
332 \param value Value being set to the attribute
334 void SetValue(in string value);
337 //==========================================================================
339 \brief External file definition.
341 The attribute stores a path to an external file.
343 \sa AttributeFileType
345 //==========================================================================
346 interface AttributeExternalFileDef: GenericAttribute
349 \brief Returns the value of the attribute.
350 \return attribute value
354 \brief Sets the value of the attribute.
355 \param value value being set to the attribute
357 void SetValue(in string value);
360 //==========================================================================
362 \brief External file type definition.
364 The attribute stores an external file type.
366 \sa AttributeExternalFileDef
368 //==========================================================================
369 interface AttributeFileType: GenericAttribute
372 \brief Returns the value of the attribute.
373 \return attribute value
377 \brief Sets the value of the attribute.
378 \param value value being set to the attribute
380 void SetValue(in string value);
383 //==========================================================================
384 // Presentation attributes (parameters of the object displaying in the Object browser)
385 //==========================================================================
387 //==========================================================================
389 \brief Drawable flag attribute.
391 This presentation attribute specifies if the parent SObject should be displayed
392 in the study tree in the Object browser.
394 If this attribute is defined for the parent %object and set to \c false, the item
395 is not displayed in the Object browser. By default, the item is always displayed.
397 <em>See \ref example8 for an example of this attribute usage in batchmode of %SALOME application.</em>
399 \sa AttributeExpandable, AttributeSelectable
401 //==========================================================================
402 interface AttributeDrawable : GenericAttribute
405 \brief Returns the value of the attribute.
406 \return \c true if the item is drawable or \c false otherwise
408 boolean IsDrawable();
410 \brief Sets the value of the attribute.
411 \param value value being set to the attribute (\c true if item should be drawable or \c false otherwise)
413 void SetDrawable(in boolean value);
416 //==========================================================================
418 \brief Selectable flag attribute.
420 This presentation attribute specifies if the parent SObject is selectable
421 by the user in the Object browser.
422 If this attribute is defined for the parent %object and set to \c false, the item
423 is not selectable in the Object browser. By default, the item is always selectable.
425 <em>See \ref example9 for an example of this attribute usage in batchmode of %SALOME application.</em>
427 \sa AttributeDrawable, AttributeExpandable
429 //==========================================================================
430 interface AttributeSelectable : GenericAttribute
433 \brief Returns the value of the attribute.
434 \return \c true if the item is selectable or \c false otherwise
436 boolean IsSelectable();
438 \brief Sets the value of the attribute.
439 \param value value being set to the attribute (\c true if item should be selectable or \c false otherwise)
441 void SetSelectable(in boolean value);
444 //==========================================================================
446 \brief Expandable flag attribute.
448 This presentation attribute specifies if the parent SObject can be expanded
449 by the user in the Object browser (to show its child objects).
450 If this attribute is defined for the parent %object and set to \c false, the item
451 is not expandable in the Object browser. By default, the item is always expandable
452 (if it has children).
454 <em>See \ref example10 for an example of this attribute usage in batchmode of %SALOME application.</em>
456 \sa AttributeDrawable, AttributeSelectable
458 //==========================================================================
459 interface AttributeExpandable : GenericAttribute
462 \brief Returns the value of the attribute.
463 \return \c true if the item is expandable or \c false otherwise
465 boolean IsExpandable();
467 \brief Sets the value of the attribute.
468 \param value value being set to the attribute (\c true if item should be expandable or \c false otherwise)
470 void SetExpandable(in boolean value);
473 //==========================================================================
475 \brief Flags attribute.
477 The interface is intended for storing different %object attributes that
478 have only two states: 0 (\c false) or 1 (\c true).
479 \note The interpretation of the flag values attribute is a matter of the user.
480 \note The total number of flags which can be stored in a single attribute
481 is defined by the size of CORBA::Long data type.
483 //==========================================================================
485 interface AttributeFlags : GenericAttribute
488 \brief Returns the value of the attribute.
489 \return set of flags currently set to the attribute
493 \brief Sets the value of the attribute.
494 \param flags new set of flags to be stored in the attribute
496 void SetFlags(in long flags);
498 \brief Test the value for the specified flag or set of flags.
499 \param flags flag or set of flags being tested.
500 \return \c true if all bits correspoding to the \a flags are currently set or \c false otherwise
502 boolean Get(in long flags);
504 \brief Set/clear specific flag or set of flags.
505 \param flags flag or set of flags being set / cleared
506 \param value \c true if all bits correspoding to the \a flags should be set
507 or \c false if flag(s) should be cleared
509 void Set(in long flags, in boolean value);
512 //==========================================================================
514 \brief Graphic attribute.
516 This interface is intended for storing information about graphical representation
517 of the %object in different views.
519 //==========================================================================
520 interface AttributeGraphic : GenericAttribute
523 \brief Set / clear visibility flag of the parent SObject for the view
524 specified by \a viewId.
525 \param viewId view identifier
526 \param value visibility flag value being set to the attribute
528 void SetVisibility(in long viewId, in boolean value);
530 \brief Get visibility flag of the parent SObject for the view
531 specified by \a viewId.
532 \param viewId view identifier
533 \return visibility flag currently set to the attribute for the specified view
535 boolean GetVisibility(in long viewId);
538 //==========================================================================
540 \brief Opened flag Attribute
541 \warning Deprecated interface. Not used since version 3.0.
543 This presentation attribute specifies if the item corresponding to the
544 parent SObject in the Object browser is currently opened (expanded) or no.
546 //==========================================================================
547 interface AttributeOpened : GenericAttribute
550 \brief Returns the value of the attribute.
552 \return \c true if the item is opened (expanded) in the Object browser or \c false otherwise
556 \brief Sets the value of the attribute.
558 \param value value being set to the attribute (\c true if item should
559 be opened (expanded) or \c false otherwise)
561 void SetOpened(in boolean value);
564 //==========================================================================
566 \brief Text color attribute.
568 This attribute allows to specify the text color to be used to render the item
569 in the Object browser. If the attribute is not set for the SObject, default
570 value (GUI specific) is used.
572 <em>See \ref example12 for an example of this attribute usage in batchmode of %SALOME application.</em>
574 \sa AttributeTextHighlightColor, AttributePixMap
576 //==========================================================================
577 interface AttributeTextColor : GenericAttribute
580 \brief Returns the value of the attribute.
581 \return text color assigned to the attribute
585 \brief Sets the value of the attribute.
586 \param value text color value being set to the attribute
588 void SetTextColor(in Color value);
591 //==========================================================================
593 \brief Text highlight color attribute.
595 This attribute allows to specify the highlight color to be used to render
596 the item in the Object browser (used only when the item is selected).
597 If the attribute is not set for the SObject, default value (GUI specific) is used.
599 <em>See \ref example13 for an example of this attribute usage in batchmode of %SALOME application.</em>
601 \sa AttributeTextColor, AttributePixMap
603 //==========================================================================
604 interface AttributeTextHighlightColor : GenericAttribute
607 \brief Returns the value of the attribute.
608 \return highlight color assigned to the attribute
610 Color TextHighlightColor();
612 \brief Sets the value of the attribute.
613 \param value highlight color value being set to the attribute
615 void SetTextHighlightColor(in Color value);
618 //==========================================================================
620 \brief Icon attribute.
622 This attribute is used to specifiy the name (file name) of an icon which
623 should be drawn in the Object browser when rendering an item.
625 <em>See \ref example14 for an example of this attribute usage in batchmode of %SALOME application.</em>
627 \sa AttributeTextColor, AttributeTextHighlightColor
629 //==========================================================================
630 interface AttributePixMap : GenericAttribute
633 Checks if the pixmap is assigned to the attribute.
634 \return \c true if an icon file name is set to the attribute
638 \brief Returns the value of the attribute.
639 \return icon file name assigned to the attribute (empty string if not set)
643 \brief Sets the value of the attribute.
644 \param icom file name being set to the attribute
646 void SetPixMap(in string value);
649 //==========================================================================
651 \brief Tree node attribute.
653 By specifying the tree node attributes for the SObjects it is possible to
654 create internal auxillary %object tree with its own structure and identifier.
656 Since each such tree is specfied by the unique identifier, it is possible
657 to create as many trees as it is required.
659 <em>See \ref example18 for an example of usage of this attribute in batchmode of %SALOME application.</em>
661 //==========================================================================
662 interface AttributeTreeNode : GenericAttribute
665 \brief Assigns the father tree node to this tree node.
666 \param father tree node attribute being set as a parent of this tree node
668 void SetFather(in AttributeTreeNode father);
670 \brief Checks if father tree node attribute is set for this tree node.
671 \return \c true if father tree node attribute is defined or \c false otherwise
675 \brief Returns the father tree node of this tree node.
676 \return father tree node attribute
678 AttributeTreeNode GetFather();
680 \brief Assigns the previous sibling tree node to this tree node.
681 \param sibling tree node attribute being set as a previous sibling of this tree node
683 void SetPrevious(in AttributeTreeNode sibling);
685 \brief Checks if previous sibling tree node attribute is set for this tree node.
686 \return \c true if previous sibling tree node attribute is defined or \c false otherwise
688 boolean HasPrevious();
690 \brief Returns the previous sibling tree node of this tree node.
691 \return previous sibling tree node attribute
693 AttributeTreeNode GetPrevious();
695 \brief Assigns the next sibling tree node to this tree node.
696 \param sibling tree node attribute being set as a next sibling of this tree node
698 void SetNext(in AttributeTreeNode sibling);
700 \brief Checks if next sibling tree node attribute is set for this tree node.
701 \return \c true if next sibling tree node attribute is defined or \c false otherwise
705 \brief Returns the next sibling tree node of this tree node.
706 \return next sibling tree node attribute
708 AttributeTreeNode GetNext();
710 \brief Sets the specified tree node as a first child of this tree node.
711 \param child tree node attribute being set filrst child of this tree node
713 void SetFirst(in AttributeTreeNode child);
715 \brief Checks if first child tree node attribute is set for this tree node.
716 \return \c true if first child tree node attribute is defined or \c false otherwise
720 \brief Returns the first child tree node of this tree node.
721 \return first child tree node attribute
723 AttributeTreeNode GetFirst();
725 \brief Sets identifier of the parent tree to this tree node.
726 \note All tree nodes which belong to the same tree, should have the same identifier.
727 \param ID identifier (arbitrary non-empty string) being set for this tree node
729 void SetTreeID(in string ID);
731 \brief Returns identifier of the parent tree.
732 \return parent tree identifier
736 \brief Appends specified tree node to the end of the children list of this tree node.
737 \param child tree node being added to the list of children
739 void Append(in AttributeTreeNode child);
741 \brief Puts specified tree node to the beginning of the children list of this tree node.
742 \param child tree node being added to the list of children
744 void Prepend(in AttributeTreeNode child);
746 \brief Insert specified tree node as a previous child in the parent tree node's children list.
747 \param child tree node being inserted to the parent tree node
749 void InsertBefore(in AttributeTreeNode child);
751 \brief Insert specified tree node as a next child in the parent tree node's children list.
752 \param child tree node being inserted to the parent tree node
754 void InsertAfter(in AttributeTreeNode child);
756 \brief Removes this tree node.
760 \brief Returns the depth of the tree node in the tree structure. The resulting value
761 it equal to the number of the fathers of this tree node.
762 \note The depth of the root tree node is 0.
763 \return tree node's depth
767 \brief Checks if the tree node is a root of the tree.
768 \return \c true if it is a root tree node or \c false otherwise
772 \brief Checks if the tree node is a descendant of the specified tree node.
773 \param other tree node that is tested for being ancestor of this tree node
774 \return \c true if this node is descendant of the \a other node or \c false otherwise
776 boolean IsDescendant(in AttributeTreeNode other);
778 \brief Checks if this tree node is a parent of the specified tree node \a other.
779 \param other tree node that is tested for being father of this tree node
780 \return \c true if this node is father of the \a other node or \c false otherwise
782 boolean IsFather(in AttributeTreeNode other);
784 \brief Checks if this tree node is a child of the specified tree node \a other.
785 \param other tree node that is tested for being child of this tree node
786 \return \c true if this node is child of the \a other node or \c false otherwise
788 boolean IsChild(in AttributeTreeNode other);
790 \brief Returns string identifier of the owner SObject (e.g. "0:1:2").
791 \return string entry of the owner SObject
796 //==========================================================================
798 \brief Local identifier attribute
800 This attribute can be used for identification of the SObject (for example by type).
802 <em>See \ref example15 for an example of this atrtibute usage in batchmode of %SALOME application.</em>
806 //==========================================================================
807 interface AttributeLocalID : GenericAttribute
810 \brief Returns the value of the attribute.
811 \return attribute value
815 \brief Sets the value of the attribute
816 \param value value being set to the attribute
818 void SetValue(in long value);
821 //==========================================================================
823 \brief Attribute storing GUID.
825 This attribute can be used to store arbitrary GUID. Attribute allowing to store GUID.
826 In contrast to any other atribute (e.g. AttributeLocalID), it is possible to
827 define as many GUID attributes for the same SObject as it is required provided that
828 they have different GUID values.
832 //==========================================================================
833 interface AttributeUserID : GenericAttribute
836 \brief Returns the value of the attribute.
837 \return attribute value
841 \brief Sets the value of the attribute
842 \param value value being set to the attribute
844 void SetValue(in string value);
847 //==========================================================================
849 \brief Back references attribute.
852 This attribute is used to store back references to all the SObjects that refer
853 to the owner SObject.
855 This attribute is used for inner purposes (in particular, for performance
858 //==========================================================================
860 interface AttributeTarget : GenericAttribute
863 Adds specified SObject to the list of SObjects which refer to the owner SObject.
864 \param refobj %SObject being added to the list
866 void Add(in SObject refobj);
868 Returns a list of SObjects which refer to the owner SObject.
869 \return list of SObject referencing to the owher SObject
871 SALOMEDS::Study::ListOfSObject Get();
873 Removes specified SObject from the list of SObjects which refer to the owner SObject.
874 \param refobj %SObject being removed to the list
876 void Remove(in SObject anObject);
879 //==========================================================================
881 \brief Generic table attribute.
883 Used as base interface for the AttributeTableOfInteger, AttributeTableOfReal
884 and AttributeTableOfString. Provides functions which are common for all table
887 \note The indices of rows and columns in the table start from 1.
888 \sa AttributeTableOfInteger, AttributeTableOfReal, AttributeTableOfString
890 //==========================================================================
892 interface AttributeTable : GenericAttribute
894 //! This exception is raised when an invalid (out of range) index is passed as parameter.
895 exception IncorrectIndex {};
896 //! This exception is raised when sequence of incorrect length is passed as parameter.
897 exception IncorrectArgumentLength {};
901 AscendingOrder, //!< The items are sorted ascending
902 DescendingOrder //!< The items are sorted descending
905 //! Sort policy (specifies how empty cells are taken into account when sorting)
907 EmptyLowest, //!< Empty cells are considered as lowest values
908 EmptyHighest, //!< Empty cells are considered as highest values
909 EmptyFirst, //!< Empty cells are always first
910 EmptyLast, //!< Empty cells are always last
911 EmptyIgnore //!< Empty cells are ignored (stay at initial positions)
915 \brief Sets the main title of the table.
916 \param title title being set to the table
919 void SetTitle(in string title);
921 \brief Returns the title of the table.
922 \return table title (empty string if not set)
927 \brief Sets the title of a row with specified index.
929 Raises an exception if \a row is out of range.
932 \param title title being set to the row
935 void SetRowTitle(in long row, in string title) raises(IncorrectIndex);
937 \brief Returns the title of a row with specified index.
939 Raises an exception if \a row is out of range.
942 \return row title (empty string if not set)
945 string GetRowTitle(in long row) raises(IncorrectIndex);
947 \brief Sets the titles for all rows in the table.
949 Raises an exception if length of the \a titles parameter is not equal
950 to the number of rows in the table.
952 \param titles titles being set to the table rows
955 void SetRowTitles(in StringSeq titles) raises(IncorrectArgumentLength);
957 \brief Returns the titles of all rows of the table.
958 \return list of all rows titles
961 StringSeq GetRowTitles();
963 \brief Sets the title of a column with specified index.
965 Raises an exception if \a column is out of range.
967 \param column column index
968 \param title title being set to the column
971 void SetColumnTitle(in long column, in string title) raises(IncorrectIndex);
973 \brief Returns the title of a column with specified index.
975 Raises an exception if \a column is out of range.
977 \param column column index
978 \return column title (empty string if not set)
981 string GetColumnTitle(in long column) raises(IncorrectIndex);
983 \brief Sets the titles for all columns in the table.
985 Raises an exception if length of the \a titles parameter is not equal
986 to the number of columns in the table.
988 \param titles titles being set to the table columns
989 \sa GetColumnTitles()
991 void SetColumnTitles(in StringSeq titles) raises(IncorrectArgumentLength);
993 \brief Returns the titles of all columns of the table.
994 \return list of all columns titles
995 \sa SetColumnTitles()
997 StringSeq GetColumnTitles();
999 \brief Assigns the unit label to the row with specified index.
1001 Raises an exception if \a row is out of range.
1003 \param row row index
1004 \param unit unit label being set to the row
1007 void SetRowUnit(in long row, in string unit) raises(IncorrectIndex);
1009 \brief Returns the unit label of a row with specified index.
1011 Raises an exception if \a row is out of range.
1013 \param row row index
1014 \return row unit label (empty string if not set)
1017 string GetRowUnit(in long row) raises(IncorrectIndex);
1019 \brief Sets the unit labels for all rows in the table.
1021 Raises an exception if length of the \a units parameter is not equal
1022 to the number of rows in the table.
1024 \param units unit labels being set to the table rows
1027 void SetRowUnits(in StringSeq units) raises(IncorrectArgumentLength);
1029 \brief Returns the unit labels of all rows of the table.
1030 \return list of all rows unit labels
1033 StringSeq GetRowUnits();
1035 \brief Returns the number of rows of the table.
1041 \brief Returns the number of columns of the table.
1042 \return columns count
1043 \sa GetNbRows(), SetNbColumns()
1045 long GetNbColumns();
1047 \brief Check if the value is set for the cell with specified \a row and \a column indices.
1048 \param row row index
1049 \param column column index
1050 \return \c true if value is set for the specified cell or \c false otherwise
1051 (or if row/column index is/are out of range)
1053 boolean HasValue(in long row, in long column);
1055 \brief Clear value in the specified table cell.
1057 Raises an exception if \a row or \a column is out of range.
1059 \param row row index
1060 \param column column index
1063 void RemoveValue(in long row, in long column) raises(IncorrectIndex);
1065 \brief Sets the maximum number of colums in the table.
1067 If new number of columns is less than the current one, the table is truncated
1068 (extra columns are removed).
1070 \note It is recommended to set number of columns before assigning data to the table.
1072 \param columns total number of columns being set for the table
1075 void SetNbColumns(in long columns);
1077 \brief Returns the indices of the columns in the specified \a row for which
1080 Raises an exception if \a row is out of range.
1082 \param row row index
1083 \return list of column indices
1085 LongSeq GetRowSetIndices(in long row) raises(IncorrectIndex);
1087 \brief Sort values in the specified table row.
1089 Sort order is specified by the \a order parameter. The \a policy
1090 specifies how to process empty cells (put to the first place, ignore, etc).
1092 Raises an exception if \a row is out of range.
1094 \note Other table rows are not affected.
1096 \param row row index
1097 \param order sort order (ascending/descending)
1098 \param policy sort policy (specifies how to process empty cells)
1099 \return list of mixed column indices
1101 LongSeq SortRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1103 \brief Sort values in the specified table column.
1105 Sort order is specified by the \a order parameter. The \a policy
1106 specifies how to process empty cells (put to the first place, ignore, etc).
1108 Raises an exception if \a column is out of range.
1110 \note Other table columns are not affected.
1112 \param column column index
1113 \param order sort order (ascending/descending)
1114 \param policy sort policy (specifies how to process empty cells)
1115 \return list of mixed row indices
1117 LongSeq SortColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1119 \brief Sort table columns by the specified row.
1121 All the table columns are sorted according to the values in the specified
1122 row. Sort order is specified by the \a order parameter. The \a policy
1123 specifies how to process empty cells (put to the first place, ignore, etc).
1125 Raises an exception if \a row is out of range.
1127 \param row row index
1128 \param order sort order (ascending/descending)
1129 \param policy sort policy (specifies how to process empty cells)
1130 \return list of mixed column indices
1132 LongSeq SortByRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1134 \brief Sort table rows by the specified column.
1136 All the table rows are sorted according to the values in the specified
1137 column. Sort order is specified by the \a order parameter. The \a policy
1138 specifies how to process empty cells (put to the first place, ignore, etc).
1140 Raises an exception if \a column is out of range.
1142 \param column column index
1143 \param order sort order (ascending/descending)
1144 \param policy sort policy (specifies how to process empty cells)
1145 \return list of mixed row indices
1147 LongSeq SortByColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
1149 \brief Swap values in two table cells.
1151 Raises an exception if any specified index is out of range.
1153 \param row1 first cell's row index
1154 \param column1 first cell's column index
1155 \param row2 second cell's row index
1156 \param column2 second cell's column index
1158 void SwapCells(in long row1, in long column1, in long row2, in long column2) raises(IncorrectIndex);
1160 \brief Swap two table rows.
1162 Raises an exception if any \a row1 or \a row2 is out of range.
1164 \param row1 first row's index
1165 \param row2 second row's index
1167 void SwapRows(in long row1, in long row2) raises(IncorrectIndex);
1169 \brief Swap two table columns.
1171 Raises an exception if any \a column1 or \a column2 is out of range.
1173 \param column1 first column's index
1174 \param column2 second column's index
1176 void SwapColumns(in long column1, in long column2) raises(IncorrectIndex);
1178 \brief Reads a table from a byte stream.
1179 \param fileStream byte stream
1180 \return \c true if table is successfully read or \c false otherwise
1183 boolean ReadFromFile(in SALOMEDS::TMPFile fileStream);
1185 \brief Saves a table into a byte stream.
1186 \return byte stream with table representation
1189 SALOMEDS::TMPFile SaveToFile();
1192 //==========================================================================
1194 \brief Table of %integer values
1196 This attribute allows to store a table of %integer values. It is possible
1197 to specify titles for rows and columns. In addition, the unis labels can be
1198 assigned to the rows. And finally, the table iself can have title.
1200 \note The indices of rows and columns in the table start from 1.
1202 <em>See \ref example21 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1204 \sa AttributeTable, AttributeTableOfReal, AttributeTableOfString
1206 //==========================================================================
1208 interface AttributeTableOfInteger : AttributeTable
1211 \brief Appends new row to the table.
1213 If the length of the \a data parameter is greater than current number of columns
1214 in the table, the table is automatically resized.
1216 \param data sequence of values which will be set as elements of the added row
1217 \sa SetRow(), GetRow(), AddColumn()
1219 void AddRow(in LongSeq data) raises(IncorrectArgumentLength);
1221 \brief Replaces all the elements of the specified \a row with new values.
1223 Raises an exception if \a row is out of range or if the length of the
1224 \a data parameter is not equal to the number of columns in the table.
1226 \param row row index
1227 \param data sequence of values being set as values of the row
1228 \sa GetRow(), AddRow(), SetColumn()
1230 void SetRow(in long row, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1232 \brief Returns all the values of the specified row in the table.
1234 Raises an exception if \a row is out of range.
1236 \note For empty cells 0 value is returned.
1238 \param row row index
1239 \return sequence of values which are set as elements of the row.
1240 \sa SetRow(), AddRow()
1242 LongSeq GetRow(in long row) raises(IncorrectIndex);
1244 \brief Appends new column to the table.
1246 If the length of the \a data parameter is greater than current number of rows
1247 in the table, the table is automatically resized.
1249 \param data sequence of values which will be set as elements of the added column
1250 \sa SetColumn(), GetColumn(), AddRow()
1252 void AddColumn(in LongSeq data) raises(IncorrectArgumentLength);
1254 \brief Replaces all the elements of the specified column with new values.
1256 Raises an exception if \a column is out of range or if the length of the
1257 \a data parameter is not equal to the number of rows in the table.
1259 \param column column index
1260 \param data sequence of values being set as values of the column
1261 \sa GetColumn(), AddColumn(), SetRow()
1263 void SetColumn(in long column, in LongSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1265 \brief Returns all the values of the specified column in the table.
1267 Raises an exception if \a column is out of range.
1269 \note For empty cells 0 value is returned.
1271 \param column column index
1272 \return sequence of values which are set as elements of the column.
1273 \sa SetColumn(), AddColumn()
1275 LongSeq GetColumn(in long column) raises(IncorrectIndex);
1277 \brief Puts a value to the table cell specified by \a row and \a column indices.
1279 If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1280 in the table, the table is automatically resized.
1282 \param value value being set to the table cell
1283 \param row row index
1284 \param column column index
1285 \sa GetValue(), HasValue()
1287 void PutValue(in long value, in long row, in long column) raises(IncorrectIndex);
1289 \brief Returns the value from the cell table.
1291 Raises an exception if \a row or \a column is out of range or
1292 if value is not set for the specified table cell.
1294 \param row row index
1295 \param column column index
1296 \return value assigned to the table cell
1297 \sa PutValue(), HasValue()
1299 long GetValue(in long row, in long column) raises(IncorrectIndex);
1302 //==========================================================================
1304 \brief Table of real values
1306 This attribute allows to store a table of real values. It is possible
1307 to specify titles for rows and columns. In addition, the unis labels can be
1308 assigned to the rows. And finally, the table iself can have title.
1310 \note The indices of rows and columns in the table start from 1.
1312 <em>See \ref example22 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1314 \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfString
1316 //==========================================================================
1318 interface AttributeTableOfReal : AttributeTable
1321 \brief Appends new row to the table.
1323 If the length of the \a data parameter is greater than current number of columns
1324 in the table, the table is automatically resized.
1326 \param data sequence of values which will be set as elements of the added row
1327 \sa SetRow(), GetRow(), AddColumn()
1329 void AddRow(in DoubleSeq data) raises(IncorrectArgumentLength);
1331 \brief Replaces all the elements of the specified \a row with new values.
1333 Raises an exception if \a row is out of range or if the length of the
1334 \a data parameter is not equal to the number of columns in the table.
1336 \param row row index
1337 \param data sequence of values being set as values of the row
1338 \sa GetRow(), AddRow(), SetColumn()
1340 void SetRow(in long row, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1342 \brief Returns all the values of the specified row in the table.
1344 Raises an exception if \a row is out of range.
1346 \note For empty cells 0.0 value is returned.
1348 \param row row index
1349 \return sequence of values which are set as elements of the row.
1350 \sa SetRow(), AddRow()
1352 DoubleSeq GetRow(in long row) raises(IncorrectIndex);
1354 \brief Appends new column to the table.
1356 If the length of the \a data parameter is greater than current number of rows
1357 in the table, the table is automatically resized.
1359 \param data sequence of values which will be set as elements of the added column
1360 \sa SetColumn(), GetColumn(), AddRow()
1362 void AddColumn(in DoubleSeq data) raises(IncorrectArgumentLength);
1364 \brief Replaces all the elements of the specified column with new values.
1366 Raises an exception if \a column is out of range or if the length of the
1367 \a data parameter is not equal to the number of rows in the table.
1369 \param column column index
1370 \param data sequence of values being set as values of the column
1371 \sa GetColumn(), AddColumn(), SetRow()
1373 void SetColumn(in long column, in DoubleSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1375 \brief Returns all the values of the specified column in the table.
1377 Raises an exception if \a column is out of range.
1379 \note For empty cells 0.0 value is returned.
1381 \param column column index
1382 \return sequence of values which are set as elements of the column.
1383 \sa SetColumn(), AddColumn()
1385 DoubleSeq GetColumn(in long column) raises(IncorrectIndex);
1387 \brief Puts a value to the table cell specified by \a row and \a column indices.
1389 If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1390 in the table, the table is automatically resized.
1392 \param value value being set to the table cell
1393 \param row row index
1394 \param column column index
1395 \sa GetValue(), HasValue()
1397 void PutValue(in double value, in long row, in long volumn) raises(IncorrectIndex);
1399 \brief Returns the value from the cell table.
1401 Raises an exception if \a row or \a column is out of range or
1402 if value is not set for the specified table cell.
1404 \param row row index
1405 \param column column index
1406 \return value assigned to the table cell
1407 \sa PutValue(), HasValue()
1409 double GetValue(in long row, in long column) raises(IncorrectIndex);
1412 //==========================================================================
1414 \brief Table of string values
1416 This attribute allows to store a table of string values. It is possible
1417 to specify titles for rows and columns. In addition, the unis labels can be
1418 assigned to the rows. And finally, the table iself can have title.
1420 \note The indices of rows and columns in the table start from 1.
1421 \sa AttributeTable, AttributeTableOfInteger, AttributeTableOfReal
1423 //==========================================================================
1424 interface AttributeTableOfString : AttributeTable
1427 \brief Appends new row to the table.
1429 If the length of the \a data parameter is greater than current number of columns
1430 in the table, the table is automatically resized.
1432 \param data sequence of values which will be set as elements of the added row
1433 \sa SetRow(), GetRow(), AddColumn()
1435 void AddRow(in StringSeq data) raises(IncorrectArgumentLength);
1437 \brief Replaces all the elements of the specified \a row with new values.
1439 Raises an exception if \a row is out of range or if the length of the
1440 \a data parameter is not equal to the number of columns in the table.
1442 \param row row index
1443 \param data sequence of values being set as values of the row
1444 \sa GetRow(), AddRow(), SetColumn()
1446 void SetRow(in long row, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1448 \brief Returns all the values of the specified row in the table.
1450 Raises an exception if \a row is out of range.
1452 \note For empty cells empty string is returned.
1454 \param row row index
1455 \return sequence of values which are set as elements of the row.
1456 \sa SetRow(), AddRow()
1458 StringSeq GetRow(in long row) raises(IncorrectIndex);
1460 \brief Appends new column to the table.
1462 If the length of the \a data parameter is greater than current number of rows
1463 in the table, the table is automatically resized.
1465 \param data sequence of values which will be set as elements of the added column
1466 \sa SetColumn(), GetColumn(), AddRow()
1468 void AddColumn(in StringSeq data) raises(IncorrectArgumentLength);
1470 \brief Replaces all the elements of the specified column with new values.
1472 Raises an exception if \a column is out of range or if the length of the
1473 \a data parameter is not equal to the number of rows in the table.
1475 \param column column index
1476 \param data sequence of values being set as values of the column
1477 \sa GetColumn(), AddColumn(), SetRow()
1479 void SetColumn(in long column, in StringSeq data) raises(IncorrectArgumentLength, IncorrectIndex);
1481 \brief Returns all the values of the specified column in the table.
1483 Raises an exception if \a column is out of range.
1485 \note For empty cells empty string is returned.
1487 \param column column index
1488 \return sequence of values which are set as elements of the column.
1489 \sa SetColumn(), AddColumn()
1491 StringSeq GetColumn(in long column) raises(IncorrectIndex);
1493 \brief Puts a value to the table cell specified by \a row and \a column indices.
1495 If the \a row and/or \a column parameter(s) are greater than current number of rows/columns
1496 in the table, the table is automatically resized.
1498 \param value value being set to the table cell
1499 \param row row index
1500 \param column column index
1501 \sa GetValue(), HasValue()
1503 void PutValue(in string value, in long row, in long column) raises(IncorrectIndex);
1505 \brief Returns the value from the cell table.
1507 Raises an exception if \a row or \a column is out of range or
1508 if value is not set for the specified table cell.
1510 \param row row index
1511 \param column column index
1512 \return value assigned to the table cell
1513 \sa PutValue(), HasValue()
1515 string GetValue(in long row, in long column) raises(IncorrectIndex);
1518 //==========================================================================
1520 \brief %Study properties attribute
1522 This attribute is used to store study properties: user name, creation date,
1523 creation mode, modified flag, locked flag.
1525 <em>See \ref example20 for an example of usage of this attribute in batchmode of %SALOME application.</em>
1527 //==========================================================================
1528 interface AttributeStudyProperties : GenericAttribute
1531 \brief Sets the name of the study author to the attribute.
1532 \param author study author name
1534 void SetUserName(in string author);
1536 \brief Returns the name of the study author.
1537 \return study author name (empty string if not set)
1539 string GetUserName();
1541 \brief Sets creation date of the study.
1542 \param minute minutes part of the date
1543 \param hour hour part of the date
1544 \param day day number part of the date
1545 \param month month part of the date
1546 \param year year part of the date
1548 void SetCreationDate(in long minute, in long hour, in long day, in long month, in long year);
1550 \brief Returns creation date of the study.
1551 \param minute used to return minutes part of the date (undefined if creation date is not set)
1552 \param hour used to return hour part of the date (undefined if creation date is not set)
1553 \param day used to return day number part of the date (undefined if creation date is not set)
1554 \param month used to return month part of the date (undefined if creation date is not set)
1555 \param year used to return year part of the date (undefined if creation date is not set)
1556 \return \c true if creation date is set or \c false otherwise
1558 boolean GetCreationDate(out long minute, out long hour, out long day, out long month, out long year);
1560 \brief Sets creation mode of the study.
1561 \note Creation mode must be either "from scratch" or "copy from".
1562 \param mode creation mode description
1564 void SetCreationMode(in string mode);
1566 \brief Returns creation mode of the study.
1568 \brief The following values are allowed for creation mode: "from scratch", "copy from",
1569 empty string (if not set).
1571 \return creation mode description
1573 string GetCreationMode();
1575 \brief Sets the number of transactions executed after the last saving of the study.
1576 \param modified transaction count
1578 void SetModified(in long modified);
1580 \brief Check if study has been modified since last saving operation.
1581 \return \c true, if the study has been modified and not saved or \c false otherwise
1583 boolean IsModified();
1585 \brief Returns the number of transactions executed after the last saving of the study.
1586 \return transaction count
1590 \brief Lock/unlock the study for modifications.
1591 \note This parameter is not recursive.
1592 \note If the study is locked, any attempt to modify study contents leads to the raising
1593 of the LockProtection exception.
1594 \param lock \c true if study should be locked or \c false if study should be unlocked
1596 void SetLocked(in boolean lock);
1598 \brief Check if study is locked.
1599 \return \c true if study is locked or \c false otherwise
1603 \brief Appends modification record to the list of study modifications.
1604 \param author author of the modification
1605 \param minute minutes part of the modification date
1606 \param hour hour part of the modification date
1607 \param day day number part of the modification date
1608 \param month month part of the modification date
1609 \param year year part of the modification date
1611 void SetModification(in string author, in long minute, in long hour, in long day, in long month, in long year);
1613 \brief Returns list of all the study modification records.
1614 \param authors used to return authors of the modification records
1615 \param minutes used to return minutes parts of the modification records
1616 \param hours used to return hour parts of the modification records
1617 \param days used to return day number parts of the modification records
1618 \param months used to return month parts of the modification records
1619 \param years used to return year parts of the modification records
1620 \param withCreator \c true if creation record should be also added to the resulting list or \c false otherwise
1622 void GetModificationsList(out StringSeq authors, out LongSeq minutes, out LongSeq hours, out LongSeq days, out LongSeq months, out LongSeq years, in boolean withCreator);
1625 //==========================================================================
1627 \brief Python %object attribute
1629 This attribute is used to store pyton objects as a sequence of characters.
1631 //==========================================================================
1632 interface AttributePythonObject : GenericAttribute
1635 \brief Sets a Python %object converted into a sequence of characters to the attribute.
1636 \param pyObject sequence of characters representing the encoded Python %object
1637 \param isScript if \c true, the \a pyObject parameter specifies a Python script
1639 void SetObject(in string pyObject, in boolean isScript);
1641 \brief Returns a Python %object stored in the attribute as a sequence of characters.
1642 \return encoded Python %object stored in the attribute (empty string if not set)
1646 \brief Check if the value stored in the attribute is a Python script
1647 \return \c true if the sequence of characters stored in the attribute corresponds
1648 to a Python script or \c false otherwise
1653 //==========================================================================
1655 \brief Parameter attribute
1657 This attribute is a universal container of arbitrary data of basic types
1658 (%integer, real, string, array, etc).
1660 Each parameter is identified by the unique name. Only one value of the
1661 specific type can be assigned to the parameter, though it is allowed to
1662 assign values of different types to the same name.
1664 //==========================================================================
1665 interface AttributeParameter : GenericAttribute
1667 //! This exception is raised when an invalid identifier is passed as parameter.
1668 exception InvalidIdentifier {};
1671 \brief Associates %integer value with the unique identifier.
1672 \param ID parameter name
1673 \param value parameter value
1675 void SetInt(in string ID, in long value);
1677 \brief Returns %integer value associated with the specified identifier.
1679 Raises an exception if %integer parameter is not set for the specified
1682 \param ID parameter name
1683 \return %integer value assigned to the parameter
1685 long GetInt(in string ID) raises(InvalidIdentifier);
1687 \brief Associates real value with the unique identifier.
1688 \param ID parameter name
1689 \param value parameter value
1691 void SetReal(in string ID, in double value);
1693 \brief Returns real value associated with the specified identifier.
1695 Raises an exception if real parameter is not set for the specified
1698 \param ID parameter name
1699 \return real value assigned to the parameter
1701 double GetReal(in string ID) raises(InvalidIdentifier);
1703 \brief Associates string value with the unique identifier.
1704 \param ID parameter name
1705 \param value parameter value
1707 void SetString(in string ID, in string value);
1709 \brief Returns string value associated with the specified identifier.
1711 Raises an exception if string parameter is not set for the specified
1714 \param ID parameter name
1715 \return string value assigned to the parameter
1717 string GetString(in string ID) raises(InvalidIdentifier);
1719 \brief Associates boolean value with the unique identifier.
1720 \param ID parameter name
1721 \param value parameter value
1723 void SetBool(in string ID, in boolean value);
1725 \brief Returns boolean value associated with the specified identifier.
1727 Raises an exception if boolean parameter is not set for the specified
1730 \param ID parameter name
1731 \return boolean value assigned to the parameter
1733 boolean GetBool(in string ID) raises(InvalidIdentifier);
1735 \brief Associates real array value with the unique identifier.
1736 \param ID parameter name
1737 \param value parameter value
1739 void SetRealArray(in string ID, in DoubleSeq value);
1741 \brief Returns real array value associated with the specified identifier.
1743 Raises an exception if real array parameter is not set for the specified
1746 \param ID parameter name
1747 \return real array value assigned to the parameter
1749 DoubleSeq GetRealArray(in string ID) raises(InvalidIdentifier);
1751 \brief Associates %integer array value with the unique identifier.
1752 \param ID parameter name
1753 \param value parameter value
1755 void SetIntArray(in string ID, in LongSeq value);
1757 \brief Returns %integer array value associated with the specified identifier.
1759 Raises an exception if %integer array parameter is not set for the specified
1762 \param ID parameter name
1763 \return %integer array value assigned to the parameter
1765 LongSeq GetIntArray(in string ID) raises(InvalidIdentifier);
1767 \brief Associates string array value with the unique identifier.
1768 \param ID parameter name
1769 \param value parameter value
1771 void SetStrArray(in string ID, in StringSeq value);
1773 \brief Returns string array value associated with the specified identifier.
1775 Raises an exception if string array parameter is not set for the specified
1778 \param ID parameter name
1779 \return string array value assigned to the parameter
1781 StringSeq GetStrArray(in string ID) raises(InvalidIdentifier);
1783 \brief Checks if the value of specified type is set for the identifier.
1784 \param ID parameter name
1785 \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
1786 4(real array), 5(%integer array), 6(string array)]
1787 \returns \c true if the value of type \a ptype is associated with the parameter \a ID
1789 boolean IsSet(in string ID, in long ptype);
1791 \brief Removes value of specified type from the named parameter.
1792 \param ID parameter name
1793 \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
1794 4(real array), 5(%integer array), 6(string array)]
1795 \return \c true if value is successfully removed or \c false otherwise
1797 boolean RemoveID(in string ID, in long ptype);
1799 \brief Returns a father attribute of this attribute.
1800 \return father parameter attribute
1802 AttributeParameter GetFather();
1804 \brief Check if this attribute has parent parameter attribute.
1805 \return \c true if this attribute has parent parameter attribute
1807 boolean HasFather();
1809 \brief Check if this attribute is a root (top-level) parameter attribute.
1810 \return \c true if this attribute is a root parameter attribute
1814 \brief Clears the content of the attribute.
1818 \brief Returns a sequence of parameters identifiers of the specified type
1819 stored in the attribute.
1820 \param ptype parameter type [0(%integer), 1(real), 2(boolean), 3(string),
1821 4(real array), 5(%integer array), 6(string array)]
1822 \return list of parameters identifier
1824 StringSeq GetIDs(in long ptype);