1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SALOMEDS.idl
23 // Author : Yves FRICAUD
26 /*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces
27 for the attributes which can be assigned to %SObject
29 #ifndef _SALOMEDS_AttributesIDL_
30 #define _SALOMEDS_AttributesIDL_
32 #include "SALOMEDS.idl"
36 /*! Sequence of double values
38 typedef sequence <double> DoubleSeq;
39 /*! Sequence of long values
41 typedef sequence <long> LongSeq;
42 /*! Sequence of string values
44 typedef sequence <string> StringSeq;
46 This structure stores a set of elements defining the color based on RGB palette. These elements are
47 used as input parameters for methods necessary for color definition of different items.
60 //==========================================================================
61 /*! \brief Attribute allowing to store a real value
63 Attribute allowing to store a real value
65 //==========================================================================
66 interface AttributeReal : GenericAttribute
69 Returns the value of this attribute.
71 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
75 Sets the value of this attribute.
77 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
79 void SetValue(in double value);
81 //==========================================================================
82 /*! \brief Attribute allowing to store an integer value
84 Attribute allowing to store an integer value
86 //==========================================================================
87 interface AttributeInteger : GenericAttribute
90 Returns the value of this attribute
92 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
96 Sets the value of this attribute
98 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
100 void SetValue(in long value);
102 //==========================================================================
103 /*! \brief Attribute - sequence of real values
105 Attribute - sequence of real values, indexing from 1 (like in CASCADE).
107 //==========================================================================
108 interface AttributeSequenceOfReal : GenericAttribute
111 Initialization of the attribute with initial data.
112 \param other Initially assigned sequence of real numbers.
114 void Assign (in DoubleSeq other);
116 Returns the sequence of real numbers stored in the attribute.
118 DoubleSeq CorbaSequence();
120 Adds to the end of the sequence a real number.
122 \param value A real number added to the sequence.
124 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
126 void Add (in double value);
128 Removes a real number with a definite index
129 from the sequence of real numbers stored in the Attribute.
131 \param index The index of the given real number
133 void Remove(in long index);
135 Substitutes a given real number with a definite index for another real number.
136 \param index The index of the given real number.
137 \param value The value of another real number.
139 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
142 void ChangeValue(in long index, in double value);
144 Returns a given real number with a definite index
145 in the sequence of real numbers stored in the Attribute.
146 \param index The index of the given real number.
148 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
150 double Value(in short index);
152 Returns the length of the sequence of real numbers stored in the Attribute.
154 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
159 //==========================================================================
160 /*! \brief Attribute - sequence of integer
162 Attribute - sequence of integer, indexing from 1 (like in CASCADE)
164 //==========================================================================
165 interface AttributeSequenceOfInteger : GenericAttribute
168 Initialisation of the attribute with initial data.
169 \param other Initially assigned sequence of integer numbers.
171 void Assign (in LongSeq other);
173 Returns the sequence of integer numbers stored in the Attribute.
175 LongSeq CorbaSequence();
177 Adds to the end of the sequence an integer number.
178 \param value An integer number added to the sequence.
180 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
183 void Add (in long value);
185 Removes an integer number with a definite index
186 from the sequence of integer numbers stored in the Attribute.
187 \param index The index of the given integer number.
189 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
192 void Remove(in long index);
194 Substitutes an integer number with a definite index for another integer number.
195 \param index The index of the given integer number.
196 \param value The value of another integer number.
199 void ChangeValue(in long index, in long value);
201 Returns a given integer number with a definite index
202 in the sequence of integer numbers stored in the Attribute.
203 \param index The index of the given integer number.
205 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
207 long Value(in short index);
209 Returns the length of the sequence of integer numbers stored in the Attribute.
211 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
217 //==========================================================================
218 /*! \brief Name attribute
220 This attribute stores a string value, which corresponds to the name of the %SObject
221 or to the name of corresponding object.
223 //==========================================================================
225 interface AttributeName : GenericAttribute
228 Returns the value of this attribute
230 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
234 Sets the value of this attribute
236 \param value This parameter defines the value of this attribute.
238 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
240 void SetValue(in string value);
243 //==========================================================================
244 /*! \brief Comment attribute
246 This attribute stores a string value containing supplementary information about
247 the %SObject. In particular it contains the data type of the %SComponent.
249 //==========================================================================
250 interface AttributeComment : GenericAttribute
253 Returns the value of this attribute
255 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
259 Sets the value of this attribute
260 \param value This string parameter defines the value of this attribute - a description of a %SObject.
262 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
282 Sets the value of this attribute
283 \param value This parameter defines the value of this attribute - IOR of a %SObject.
285 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
305 Sets the value of this attribute
306 \param value This parameter defines the value of this attribute.
308 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
327 Sets the value of this attribute
328 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
330 void SetValue(in string value);
333 //==========================================================================
334 /*! \brief 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 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
347 Sets the value of this attribute
348 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
350 void SetValue(in string value);
353 //==========================================================================
354 //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 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example8.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example9.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
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 <BR><VAR>See also <A href=exemple/Example10.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
437 void SetExpandable(in boolean value);
440 //==========================================================================
441 /*! \brief Opened flag Attribute.
443 This is a presentation attribute necessary for display of the study tree in the browser.
444 It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children
445 are not visible) if bool is FALSE.
447 //==========================================================================
448 interface AttributeOpened : GenericAttribute
451 Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
453 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
458 Sets this item to be open (its children are visible)
460 \param value If the value of this boolean parameter is TRUE this item will be set as open,
461 and as closed if FALSE.
463 <BR><VAR>See also <A href=exemple/Example11.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
466 void SetOpened(in boolean value);
468 //==========================================================================
469 /*! \brief TextColorAttribute.
471 This attribute sets the color of an item.
473 //==========================================================================
474 interface AttributeTextColor : GenericAttribute
477 Returns the color of an item.
479 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
484 Sets the color of an item.
486 \param value This parameter defines the color of the item.
488 <BR><VAR>See also <A href=exemple/Example12.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
491 void SetTextColor(in Color value);
494 //==========================================================================
495 /*! \brief TextHighlightColorAttribute.
497 This attribute sets the highlight color of an item.
499 //==========================================================================
500 interface AttributeTextHighlightColor : GenericAttribute
503 Returns the highlight color of an item.
507 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
510 Color TextHighlightColor();
512 Sets the highlight color of an item.
513 \param value This parameter defines the highlight color of the item.
515 <BR><VAR>See also <A href=exemple/Example13.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
518 void SetTextHighlightColor(in Color value);
520 //==========================================================================
521 /*! \brief PixMapAttribute.
523 This attribute stores an icon which is put before the name of an item.
525 //==========================================================================
526 interface AttributePixMap : GenericAttribute
529 Returns True if there is an icon before the name of the given item.
533 Returns the name of the icon in the format of a string.
535 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
540 Sets the name of the icon.
541 \param value This string parameter defines the name of the icon.
543 <BR><VAR>See also <A href=exemple/Example14.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
546 void SetPixMap(in string value);
549 //==========================================================================
550 /*! \brief TreeNodeAttribute.
552 A set of these attributes on the %SObjects of the %study forms an inner auxiliary
553 tree whith its own structure and identifier. The quantity of such trees with different
554 identifiers can be arbitrary.
556 <BR><VAR>See also <A href=exemple/Example18.html> an example </A> of usage of the methods of this interface in batchmode of %SALOME application.</VAR>
559 //==========================================================================
560 interface AttributeTreeNode : GenericAttribute
563 Assigns the father tree node to this tree node.
565 void SetFather(in AttributeTreeNode value);
567 Returns True if there is a father tree node of this tree node.
571 Returns the father tree node of this tree node.
573 AttributeTreeNode GetFather();
575 Assigns the previous brother tree node to the given tree node.
577 void SetPrevious(in AttributeTreeNode value);
579 Returns True if there is the previous brother tree node of this tree node.
581 boolean HasPrevious();
583 Returns the previous brother tree node of this tree node.
585 AttributeTreeNode GetPrevious();
587 Sets the next brother tree node to this tree node.
589 void SetNext(in AttributeTreeNode value);
591 Returns True if there is the next brother tree node of this tree node.
595 Returns the previous brother tree node of this tree node.
597 AttributeTreeNode GetNext();
599 Sets the first child tree node to this tree node.
601 void SetFirst(in AttributeTreeNode value);
603 Returns True if there is the first child tree node of this tree node.
607 Returns the first child tree node of this tree node.
609 AttributeTreeNode GetFirst();
612 \param value String parameter defining the ID of a tree.
613 \note <br>Tree nodes of one tree have the same ID.
615 void SetTreeID(in string value);
618 \return An ID of a tree in the format of a string.
623 Adds a child tree node to the end of the list of children of this tree node.
625 void Append(in AttributeTreeNode value);
627 Adds a child tree node to the beginning of the list of children of this tree node.
630 void Prepend(in AttributeTreeNode value);
632 Adds a brother tree node before this tree node.
633 In this case the both tree nodes will belong to the same father.
635 void InsertBefore(in AttributeTreeNode value);
637 Adds a brother tree node after this tree node.
638 In this case the both tree nodes will belong to the same father.
640 void InsertAfter(in AttributeTreeNode value);
644 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
650 Returns the depth of the tree node in the
651 structure, it means the number of fathers of the given tree node.
652 (i.e.: the depth of the root tree node is 0).
656 Returns True if it is a root tree node.
660 Returns True if this tree node is a descendant of the tree node.
662 boolean IsDescendant(in AttributeTreeNode value);
664 Returns True if this tree node is the father of the tree node.
666 boolean IsFather(in AttributeTreeNode value);
668 Returns True if this tree node is a child of the tree node.
670 boolean IsChild(in AttributeTreeNode value);
672 Returns ID of the according %SObject.
676 //==========================================================================
677 /*! \brief LocalID attribute
679 Attribute describing the link between a %SObject and a local object in the component.
681 //==========================================================================
682 interface AttributeLocalID : GenericAttribute
685 Returns the value of this attribute.
687 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
691 Sets the value of this attribute.
693 \param value This parameter defines the local ID which will be set.
695 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
697 void SetValue(in long value);
700 //==========================================================================
701 /*! \brief Attribute storing GUID
703 Attribute allowing to store GUID
705 //==========================================================================
706 interface AttributeUserID : GenericAttribute
709 Returns the value of this attribute
711 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
715 Sets the value of this attribute
717 <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
719 void SetValue(in string value);
722 //==========================================================================
723 /*! \brief %AttributeTarget iterface
725 This attribute stores the list of all %SObjects that refer
726 to this %SObject. This attribute is used for inner purposes of the application.
727 It is also needed for optimization.
729 //==========================================================================
731 interface AttributeTarget : GenericAttribute
734 Adds a %SObject to the list of %SObjects which refer to this %SObject.
736 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
739 void Add(in SObject anObject);
741 Returns a list of %SObjects which refer to this %SObject.
743 SALOMEDS::Study::ListOfSObject Get();
745 Deletes a %SObject from the list of %SObjects which refer to this %SObject.
747 <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
750 void Remove(in SObject anObject);
752 //==========================================================================
753 /*! \brief %AttributeTableOfInteger interface
755 This attribute allows to store a table of integers (indexing from 1 like in CASCADE)
756 and string titles of this table, of each row, of each column.
758 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
761 //==========================================================================
763 interface AttributeTableOfInteger : GenericAttribute
766 This exception is raised when an incorrect index is passed as parameter.
768 exception IncorrectIndex {};
770 This exception is raised when an incorrect length of the argument is passed as parameter.
772 exception IncorrectArgumentLength {};
774 // titles: for table, for each row, for each column
776 Sets the title of the table.
778 void SetTitle(in string theTitle);
780 Returns the title of the table.
784 Sets the title of a row with a definite index.
786 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
788 Sets the titles for all rows of the table.
790 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
792 Returns the titles of all rows of the table.
794 StringSeq GetRowTitles();
796 Sets the title of a column with a definite index.
798 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
800 Sets the titles for all columns of the table.
802 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
804 Returns the titles of all columns of the table.
806 StringSeq GetColumnTitles();
810 Sets the unit of a row with a definite index.
812 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
814 Sets the units for all rows of the table.
816 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
818 Returns the units of all rows of the table.
820 StringSeq GetRowUnits();
824 Returns the number of rows of the table.
828 Returns the number of columns of the table.
832 // operations with rows
834 Adds a row to the end of the table.
835 \param theData A sequence of long values which will be set as elements of the added row.
837 void AddRow(in LongSeq theData) raises(IncorrectArgumentLength);
839 Sets the elements of a definite row.
840 \param theRow The number of the row.
841 \param theData A sequence of long values which will be set as elements of this row.
844 void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
846 Gets the row of the table.
848 \param theRow The number of the row.
849 \return A sequence of long values which are set as elements of this row.
851 LongSeq GetRow(in long theRow) raises(IncorrectIndex);
853 // operations with columns
855 Adds a column to the end of the table.
857 \param theData A sequence of long values which will be set as elements of this column.
859 void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength);
861 Sets the values of all elements of the column.
863 \param theData A sequence of long values which will be set as elements of this column.
865 void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
867 Returns the column of the table.
869 LongSeq GetColumn(in long theColumn) raises(IncorrectIndex);
871 // operations with elements
873 Puts a value in the table.
874 \param theRow The row, where the value will be placed.
875 \param theColumn The column, where the value will be placed.
877 void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
879 Returns True if there is a value in the table.
880 \param theRow The row containing the value
881 \param theColumn The column containing the value
883 boolean HasValue(in long theRow, in long theColumn);
885 Returns the value from the table.
886 \param theRow The row containing the value
887 \param theColumn The column containing the value
889 long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
892 Sets the max number of colums in the table.
893 \note It'd better to set it before filling the table.
895 void SetNbColumns(in long theNbColumns);
898 Returns the indices of the row where the values are defined.
900 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
901 // operations with files
903 Reads a table from a file.
905 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
907 Saves a table into a file.
909 SALOMEDS::TMPFile SaveToFile();
912 //==========================================================================
913 /*! \brief %AttributeTableOfReal interface
915 This attribute allows to store a table of reals (indexing from 1 like in CASCADE)
916 and string titles of this table, of each row, of each column.
917 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
920 //==========================================================================
922 interface AttributeTableOfReal : GenericAttribute
925 This exception is raised when an incorrect index is passed as parameter.
927 exception IncorrectIndex {};
929 This exception is raised when an incorrect length of the argument is passed as parameter.
931 exception IncorrectArgumentLength {};
933 // titles: for table, for each row, for each column
935 Sets the title of the table.
937 void SetTitle(in string theTitle);
939 Returns the title of the table.
943 Sets the title of a row with a definite index.
945 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
947 Sets the titles for all rows of the table.
949 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
951 Returns the titles of all rows of the table.
953 StringSeq GetRowTitles();
955 Sets the title of a column with a definite index.
957 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
959 Sets the titles for all columns of the table.
961 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
963 Returns the titles of all columns of the table.
965 StringSeq GetColumnTitles();
969 Sets the unit of a row with a definite index.
971 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
973 Sets the units for all rows of the table.
975 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
977 Returns the units of all rows of the table.
979 StringSeq GetRowUnits();
983 Returns the number of rows of the table.
987 Returns the number of columns of the table.
991 // operations with rows
993 Adds a row to the end of the table.
995 void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength);
997 Sets the values of all elements of the row.
999 void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1001 Returns the row of the table.
1003 DoubleSeq GetRow(in long theRow) raises(IncorrectIndex);
1005 // operations with columns
1007 Adds a column to the end of the table.
1009 void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength);
1011 Sets the values of all elements of the column.
1013 void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1015 Returns the column of the table.
1017 DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1019 // operations with elements
1021 Puts a value in the table.
1022 \param theRow The row, where the value will be placed.
1023 \param theColumn The column, where the value will be placed.
1025 void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1027 Returns True if there is a value in the table.
1028 \param theRow The row containing the value
1029 \param theColumn The column containing the value
1031 boolean HasValue(in long theRow, in long theColumn);
1033 Returns the value from the table.
1034 \param theRow The row containing the value
1035 \param theColumn The column containing the value
1037 double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1040 Sets the max number of colums in the table.
1041 \note It'd better to set it before filling the table.
1043 void SetNbColumns(in long theNbColumns);
1046 Returns the indices of the row where the values are defined.
1048 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1049 // operations with files
1051 Reads a table from a file.
1053 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1055 Saves a table into a file.
1057 SALOMEDS::TMPFile SaveToFile();
1062 //==========================================================================
1063 /*! \brief %AttributeTableOfString interface
1065 This attribute allows to store a table of strings (indexing from 1 like in CASCADE)
1066 and string titles of this table, of each row, of each column.
1067 <BR><VAR>See also <A href=exemple/Example21.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1070 //==========================================================================
1072 interface AttributeTableOfString : GenericAttribute
1075 This exception is raised when an incorrect index is passed as parameter.
1077 exception IncorrectIndex {};
1079 This exception is raised when an incorrect length of the argument is passed as parameter.
1081 exception IncorrectArgumentLength {};
1083 // titles: for table, for each row, for each column
1085 Sets the title of the table.
1087 void SetTitle(in string theTitle);
1089 Returns the title of the table.
1093 Sets the title of a row with a definite index.
1095 void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1097 Sets the titles for all rows of the table.
1099 void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1101 Returns the titles of all rows of the table.
1103 StringSeq GetRowTitles();
1105 Sets the title of a column with a definite index.
1107 void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex);
1109 Sets the titles for all columns of the table.
1111 void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
1113 Returns the titles of all columns of the table.
1115 StringSeq GetColumnTitles();
1119 Sets the unit of a row with a definite index.
1121 void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex);
1123 Sets the units for all rows of the table.
1125 void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength);
1127 Returns the units of all rows of the table.
1129 StringSeq GetRowUnits();
1131 // table information
1133 Returns the number of rows of the table.
1137 Returns the number of columns of the table.
1139 long GetNbColumns();
1141 // operations with rows
1143 Adds a row to the end of the table.
1145 void AddRow(in StringSeq theData) raises(IncorrectArgumentLength);
1147 Sets the values of all elements of the row.
1149 void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1151 Returns the row of the table.
1153 StringSeq GetRow(in long theRow) raises(IncorrectIndex);
1155 // operations with columns
1157 Adds a column to the end of the table.
1159 void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength);
1161 Sets the values of all elements of the column.
1163 void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex);
1165 Returns the column of the table.
1167 StringSeq GetColumn(in long theColumn) raises(IncorrectIndex);
1169 // operations with elements
1171 Puts a value in the table.
1172 \param theRow The row, where the value will be placed.
1173 \param theColumn The column, where the value will be placed.
1175 void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex);
1177 Returns True if there is a value in the table.
1178 \param theRow The row containing the value
1179 \param theColumn The column containing the value
1181 boolean HasValue(in long theRow, in long theColumn);
1183 Returns the value from the table.
1184 \param theRow The row containing the value
1185 \param theColumn The column containing the value
1187 string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex);
1190 Sets the max number of colums in the table.
1191 \note It'd better to set it before filling the table.
1193 void SetNbColumns(in long theNbColumns);
1196 Returns the indices of the row where the values are defined.
1198 LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex);
1199 // operations with files
1201 Reads a table from a file.
1203 boolean ReadFromFile(in SALOMEDS::TMPFile theStream);
1205 Saves a table into a file.
1207 SALOMEDS::TMPFile SaveToFile();
1211 //==========================================================================
1212 /*! \brief %AttributeStudyProperties interface
1214 This attribute allows to store study properties: user name, creation date, creation
1215 mode, modified flag, locked flag.
1216 <BR><VAR>See also <A href=exemple/Example20.html> an example </A> of usage of these methods in batchmode of %SALOME application.</VAR>
1219 //==========================================================================
1221 interface AttributeStudyProperties : GenericAttribute
1224 Sets the name of the author of the %Study
1226 void SetUserName(in string theName);
1228 Returns the name of the user of the %Study.
1229 \note <BR>It returns a null string, if user name is not set
1231 string GetUserName();
1233 Sets creation date of the %Study.
1235 void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1237 Returns creation date of the %Study and True if creation date is set.
1239 boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear);
1241 Sets creation mode of the %Study.
1242 \note <BR>Creation mode must be: "from scratch" or "copy from".
1244 void SetCreationMode(in string theMode);
1246 Returns creation mode: "from scratch", "copy from", or null string
1247 if creation mode is not set
1249 string GetCreationMode();
1251 Sets the number of transactions executed after the last saving of the document.
1253 void SetModified(in long theModified);
1255 Returns True, if the document has been modified and not saved.
1257 boolean IsModified();
1259 Returns the number of transactions executed after the last saving of the document.
1263 Sets the document locked for modifications if <VAR>theLocked</VAR> is True.
1265 void SetLocked(in boolean theLocked);
1267 Returns True if the document is locked for modifications.
1271 Appends modification parameters to the modifications list.
1273 void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear);
1275 Returns a list of mosdifiers user names, modification dates.
1276 /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.
1278 void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator);
1280 //==========================================================================
1281 /*! \brief %AttributePythonObject interface
1283 Attribute allowing to store pyton objects as a sequence of chars.
1285 //==========================================================================
1287 interface AttributePythonObject : GenericAttribute
1290 Sets in the attribute a Python object converted into a sequence of chars.
1291 \param theSequence A sequence of chars.
1292 \param IsScript Defines (if True) whether this sequence of chars is a Python script.
1294 void SetObject(in string theSequence, in boolean IsScript);
1296 Returns a Python object stored in the attribute as a sequence of chars.
1300 Returns True if the sequence of bytes stored in the attribute corresponds