// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : SALOMEDS.idl // Author : Yves FRICAUD // $Header$ /*! \file SALOMEDS_Attributes.idl This file contains a set of interfaces for the attributes which can be assigned to %SObject */ #ifndef _SALOMEDS_AttributesIDL_ #define _SALOMEDS_AttributesIDL_ #include "SALOMEDS.idl" module SALOMEDS { /*! Sequence of double values */ typedef sequence DoubleSeq; /*! Sequence of long values */ typedef sequence LongSeq; /*! Sequence of string values */ typedef sequence StringSeq; /*! \struct Color This structure stores a set of elements defining the color based on RGB palette. These elements are used as input parameters for methods necessary for color definition of different items. */ struct Color { /*! Red color */ double R; /*! Green color */ double G; /*! Blue color */ double B; }; //========================================================================== /*! \brief Attribute allowing to store a real value Attribute allowing to store a real value */ //========================================================================== interface AttributeReal : GenericAttribute { /*! Returns the value of this attribute.
See also an example of this method usage in batchmode of %SALOME application. */ double Value(); /*! Sets the value of this attribute.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in double value); }; //========================================================================== /*! \brief Attribute allowing to store an integer value Attribute allowing to store an integer value */ //========================================================================== interface AttributeInteger : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ long Value(); /*! Sets the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in long value); }; //========================================================================== /*! \brief Attribute - sequence of real values Attribute - sequence of real values, indexing from 1 (like in CASCADE). */ //========================================================================== interface AttributeSequenceOfReal : GenericAttribute { /*! Initialization of the attribute with initial data. \param other Initially assigned sequence of real numbers. */ void Assign (in DoubleSeq other); /*! Returns the sequence of real numbers stored in the attribute. */ DoubleSeq CorbaSequence(); /*! Adds to the end of the sequence a real number. \param value A real number added to the sequence.
See also an example of this method usage in batchmode of %SALOME application. */ void Add (in double value); /*! Removes a real number with a definite index from the sequence of real numbers stored in the Attribute. \param index The index of the given real number */ void Remove(in long index); /*! Substitutes a given real number with a definite index for another real number. \param index The index of the given real number. \param value The value of another real number.
See also an example of this method usage in batchmode of %SALOME application. */ void ChangeValue(in long index, in double value); /*! Returns a given real number with a definite index in the sequence of real numbers stored in the Attribute. \param index The index of the given real number.
See also an example of this method usage in batchmode of %SALOME application. */ double Value(in short index); /*! Returns the length of the sequence of real numbers stored in the Attribute.
See also an example of this method usage in batchmode of %SALOME application. */ long Length(); }; //========================================================================== /*! \brief Attribute - sequence of integer Attribute - sequence of integer, indexing from 1 (like in CASCADE) */ //========================================================================== interface AttributeSequenceOfInteger : GenericAttribute { /*! Initialisation of the attribute with initial data. \param other Initially assigned sequence of integer numbers. */ void Assign (in LongSeq other); /*! Returns the sequence of integer numbers stored in the Attribute. */ LongSeq CorbaSequence(); /*! Adds to the end of the sequence an integer number. \param value An integer number added to the sequence.
See also an example of this method usage in batchmode of %SALOME application. */ void Add (in long value); /*! Removes an integer number with a definite index from the sequence of integer numbers stored in the Attribute. \param index The index of the given integer number.
See also an example of this method usage in batchmode of %SALOME application. */ void Remove(in long index); /*! Substitutes an integer number with a definite index for another integer number. \param index The index of the given integer number. \param value The value of another integer number. */ void ChangeValue(in long index, in long value); /*! Returns a given integer number with a definite index in the sequence of integer numbers stored in the Attribute. \param index The index of the given integer number.
See also an example of this method usage in batchmode of %SALOME application. */ long Value(in short index); /*! Returns the length of the sequence of integer numbers stored in the Attribute.
See also an example of this method usage in batchmode of %SALOME application. */ long Length(); }; //========================================================================== /*! \brief Name attribute This attribute stores a string value, which corresponds to the name of the %SObject or to the name of corresponding object. */ //========================================================================== interface AttributeName : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This parameter defines the value of this attribute.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief Comment attribute This attribute stores a string value containing supplementary information about the %SObject. In particular it contains the data type of the %SComponent. */ //========================================================================== interface AttributeComment : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This string parameter defines the value of this attribute - a description of a %SObject.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief IOR attribute This attribute stores a string value identifying a runtime object.In particular it contains CORBA Interoperable Object Reference. */ //========================================================================== interface AttributeIOR : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This parameter defines the value of this attribute - IOR of a %SObject.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief Persistent reference attribute This attribute stores a persistent identifier of the object. */ //========================================================================== interface AttributePersistentRef : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute \param value This parameter defines the value of this attribute.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief External File definition This attribute stores a path to an External File. */ //========================================================================== interface AttributeExternalFileDef: GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief File Type definition This attribute stores an external File Type (see ExternalFileDef attribute). */ //========================================================================== interface AttributeFileType: GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== //Below the list of presentation attributes for display study tree in browser //========================================================================== //========================================================================== /*! \brief Drawable flag Attribute. This is a presentation attribute necessary for display of a study tree in the browser. The item associated to a %SObject is created/displayed if TRUE. */ //========================================================================== interface AttributeDrawable : GenericAttribute { /*! Returns TRUE if the item is drawable (as it is by default) and FALSE if it isn't.
See also an example of this method usage in batchmode of %SALOME application. */ boolean IsDrawable(); /*! Sets the item to be drawable. \param value If the value of this boolean parameter is TRUE (default) the item will be drawable.
See also an example of this method usage in batchmode of %SALOME application. */ void SetDrawable(in boolean value); }; //========================================================================== /*! \brief Selectable flag Attribute. This is a presentation attribute necessary for display of the study tree in the browser. The item is selectable by %SALOME selection mechanism if TRUE. */ //========================================================================== interface AttributeSelectable : GenericAttribute { /*! Returns TRUE if the item is selectable (as it is by default) and FALSE if it isn't.
See also an example of this method usage in batchmode of %SALOME application. */ boolean IsSelectable(); /*! Sets the item to be selectable \param value If the value of this parameter is TRUE (the default) the item will be set as selectable.
See also an example of this method usage in batchmode of %SALOME application. */ void SetSelectable(in boolean value); }; //========================================================================== /*! \brief Expandable flag Attribute. This is a presentation attribute necessary for display of the study tree in the browser. It sets this item to be expandable even if it has no children if value is TRUE. If value is FALSE expandable only if it has children. */ //========================================================================== interface AttributeExpandable : GenericAttribute { /*! Returns TRUE if this item is expandable even when it has no children.
See also an example of this method usage in batchmode of %SALOME application. */ boolean IsExpandable(); /*! Sets this item to be expandable even if it has no children. \param value If the value of this boolean parameter is TRUE, this item will be set as expandable.
See also an example of this method usage in batchmode of %SALOME application. */ void SetExpandable(in boolean value); }; //========================================================================== /*! \brief Flags Attribute. This interface is intended for storing different object attributes that have only two states (0 and 1). */ //========================================================================== interface AttributeFlags : GenericAttribute { long GetFlags(); void SetFlags( in long theFlags ); boolean Get( in long theFlag ); void Set( in long theFlag, in boolean theValue ); }; //========================================================================== /*! \brief Graphic Attribute. This class is intended for storing information about graphic representation of objects in dirrent views */ //========================================================================== interface AttributeGraphic : GenericAttribute { void SetVisibility( in long theViewId, in boolean theValue ); boolean GetVisibility( in long theViewId ); }; //========================================================================== /*! \brief Opened flag Attribute. This is a presentation attribute necessary for display of the study tree in the browser. It sets this item to be open (its children are visible) if bool is TRUE, and to be closed (its children are not visible) if bool is FALSE. */ //========================================================================== interface AttributeOpened : GenericAttribute { /*! Returns TRUE if this item is open (its children are visible) and FALSE if it isn't.
See also an example of this method usage in batchmode of %SALOME application. */ boolean IsOpened(); /*! Sets this item to be open (its children are visible) \param value If the value of this boolean parameter is TRUE this item will be set as open, and as closed if FALSE.
See also an example of this method usage in batchmode of %SALOME application. */ void SetOpened(in boolean value); }; //========================================================================== /*! \brief TextColorAttribute. This attribute sets the color of an item. */ //========================================================================== interface AttributeTextColor : GenericAttribute { /*! Returns the color of an item.
See also an example of this method usage in batchmode of %SALOME application. */ Color TextColor(); /*! Sets the color of an item. \param value This parameter defines the color of the item.
See also an example of this method usage in batchmode of %SALOME application. */ void SetTextColor(in Color value); }; //========================================================================== /*! \brief TextHighlightColorAttribute. This attribute sets the highlight color of an item. */ //========================================================================== interface AttributeTextHighlightColor : GenericAttribute { /*! Returns the highlight color of an item.
See also an example of this method usage in batchmode of %SALOME application. */ Color TextHighlightColor(); /*! Sets the highlight color of an item. \param value This parameter defines the highlight color of the item.
See also an example of this method usage in batchmode of %SALOME application. */ void SetTextHighlightColor(in Color value); }; //========================================================================== /*! \brief PixMapAttribute. This attribute stores an icon which is put before the name of an item. */ //========================================================================== interface AttributePixMap : GenericAttribute { /*! Returns True if there is an icon before the name of the given item. */ boolean HasPixMap(); /*! Returns the name of the icon in the format of a string.
See also an example of this method usage in batchmode of %SALOME application. */ string GetPixMap(); /*! Sets the name of the icon. \param value This string parameter defines the name of the icon.
See also an example of this method usage in batchmode of %SALOME application. */ void SetPixMap(in string value); }; //========================================================================== /*! \brief TreeNodeAttribute. A set of these attributes on the %SObjects of the %study forms an inner auxiliary tree whith its own structure and identifier. The quantity of such trees with different identifiers can be arbitrary.
See also an example of usage of the methods of this interface in batchmode of %SALOME application. */ //========================================================================== interface AttributeTreeNode : GenericAttribute { /*! Assigns the father tree node to this tree node. */ void SetFather(in AttributeTreeNode value); /*! Returns True if there is a father tree node of this tree node. */ boolean HasFather(); /*! Returns the father tree node of this tree node. */ AttributeTreeNode GetFather(); /*! Assigns the previous brother tree node to the given tree node. */ void SetPrevious(in AttributeTreeNode value); /*! Returns True if there is the previous brother tree node of this tree node. */ boolean HasPrevious(); /*! Returns the previous brother tree node of this tree node. */ AttributeTreeNode GetPrevious(); /*! Sets the next brother tree node to this tree node. */ void SetNext(in AttributeTreeNode value); /*! Returns True if there is the next brother tree node of this tree node. */ boolean HasNext(); /*! Returns the previous brother tree node of this tree node. */ AttributeTreeNode GetNext(); /*! Sets the first child tree node to this tree node. */ void SetFirst(in AttributeTreeNode value); /*! Returns True if there is the first child tree node of this tree node. */ boolean HasFirst(); /*! Returns the first child tree node of this tree node. */ AttributeTreeNode GetFirst(); /*! Sets ID of a tree. \param value String parameter defining the ID of a tree. \note
Tree nodes of one tree have the same ID. */ void SetTreeID(in string value); /*! Gets ID of a tree. \return An ID of a tree in the format of a string. */ string GetTreeID(); /*! Adds a child tree node to the end of the list of children of this tree node. */ void Append(in AttributeTreeNode value); /*! Adds a child tree node to the beginning of the list of children of this tree node. */ void Prepend(in AttributeTreeNode value); /*! Adds a brother tree node before this tree node. In this case the both tree nodes will belong to the same father. */ void InsertBefore(in AttributeTreeNode value); /*! Adds a brother tree node after this tree node. In this case the both tree nodes will belong to the same father. */ void InsertAfter(in AttributeTreeNode value); /*! Deletes a tree node.
See also an example of this method usage in batchmode of %SALOME application. */ void Remove(); /*! Returns the depth of the tree node in the structure, it means the number of fathers of the given tree node. (i.e.: the depth of the root tree node is 0). */ long Depth(); /*! Returns True if it is a root tree node. */ boolean IsRoot(); /*! Returns True if this tree node is a descendant of the tree node. */ boolean IsDescendant(in AttributeTreeNode value); /*! Returns True if this tree node is the father of the tree node. */ boolean IsFather(in AttributeTreeNode value); /*! Returns True if this tree node is a child of the tree node. */ boolean IsChild(in AttributeTreeNode value); /*! Returns ID of the according %SObject. */ string Label(); }; //========================================================================== /*! \brief LocalID attribute Attribute describing the link between a %SObject and a local object in the component. */ //========================================================================== interface AttributeLocalID : GenericAttribute { /*! Returns the value of this attribute.
See also an example of this method usage in batchmode of %SALOME application. */ long Value(); /*! Sets the value of this attribute. \param value This parameter defines the local ID which will be set.
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in long value); }; //========================================================================== /*! \brief Attribute storing GUID Attribute allowing to store GUID */ //========================================================================== interface AttributeUserID : GenericAttribute { /*! Returns the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ string Value(); /*! Sets the value of this attribute
See also an example of this method usage in batchmode of %SALOME application. */ void SetValue(in string value); }; //========================================================================== /*! \brief %AttributeTarget iterface This attribute stores the list of all %SObjects that refer to this %SObject. This attribute is used for inner purposes of the application. It is also needed for optimization. */ //========================================================================== interface AttributeTarget : GenericAttribute { /*! Adds a %SObject to the list of %SObjects which refer to this %SObject.
See also an example of this method usage in batchmode of %SALOME application. */ void Add(in SObject anObject); /*! Returns a list of %SObjects which refer to this %SObject. */ SALOMEDS::Study::ListOfSObject Get(); /*! Deletes a %SObject from the list of %SObjects which refer to this %SObject.
See also an example of this method usage in batchmode of %SALOME application. */ void Remove(in SObject anObject); }; //========================================================================== /*! \brief %AttributeTableOfInteger interface This attribute allows to store a table of integers (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column.
See also an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfInteger : GenericAttribute { /*! This exception is raised when an incorrect index is passed as parameter. */ exception IncorrectIndex {}; /*! This exception is raised when an incorrect length of the argument is passed as parameter. */ exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column /*! Sets the title of the table. */ void SetTitle(in string theTitle); /*! Returns the title of the table. */ string GetTitle(); /*! Sets the title of a row with a definite index. */ void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all rows of the table. */ void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all rows of the table. */ StringSeq GetRowTitles(); /*! Sets the title of a column with a definite index. */ void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all columns of the table. */ void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all columns of the table. */ StringSeq GetColumnTitles(); //Rows units /*! Sets the unit of a row with a definite index. */ void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); /*! Sets the units for all rows of the table. */ void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); /*! Returns the units of all rows of the table. */ StringSeq GetRowUnits(); // table information /*! Returns the number of rows of the table. */ long GetNbRows(); /*! Returns the number of columns of the table. */ long GetNbColumns(); // operations with rows /*! Adds a row to the end of the table. \param theData A sequence of long values which will be set as elements of the added row. */ void AddRow(in LongSeq theData) raises(IncorrectArgumentLength); /*! Sets the elements of a definite row. \param theRow The number of the row. \param theData A sequence of long values which will be set as elements of this row. */ void SetRow(in long theRow, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Gets the row of the table. \param theRow The number of the row. \return A sequence of long values which are set as elements of this row. */ LongSeq GetRow(in long theRow) raises(IncorrectIndex); // operations with columns /*! Adds a column to the end of the table. \param theData A sequence of long values which will be set as elements of this column. */ void AddColumn(in LongSeq theData) raises(IncorrectArgumentLength); /*! Sets the values of all elements of the column. \param theData A sequence of long values which will be set as elements of this column. */ void SetColumn(in long theColumn, in LongSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Returns the column of the table. */ LongSeq GetColumn(in long theColumn) raises(IncorrectIndex); // operations with elements /*! Puts a value in the table. \param theRow The row, where the value will be placed. \param theColumn The column, where the value will be placed. */ void PutValue(in long theValue, in long theRow, in long theColumn) raises(IncorrectIndex); /*! Returns True if there is a value in the table. \param theRow The row containing the value \param theColumn The column containing the value */ boolean HasValue(in long theRow, in long theColumn); /*! Returns the value from the table. \param theRow The row containing the value \param theColumn The column containing the value */ long GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); /*! Sets the max number of colums in the table. \note It'd better to set it before filling the table. */ void SetNbColumns(in long theNbColumns); /*! Returns the indices of the row where the values are defined. */ LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); // operations with files /*! Reads a table from a file. */ boolean ReadFromFile(in SALOMEDS::TMPFile theStream); /*! Saves a table into a file. */ SALOMEDS::TMPFile SaveToFile(); }; //========================================================================== /*! \brief %AttributeTableOfReal interface This attribute allows to store a table of reals (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column.
See also an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfReal : GenericAttribute { /*! This exception is raised when an incorrect index is passed as parameter. */ exception IncorrectIndex {}; /*! This exception is raised when an incorrect length of the argument is passed as parameter. */ exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column /*! Sets the title of the table. */ void SetTitle(in string theTitle); /*! Returns the title of the table. */ string GetTitle(); /*! Sets the title of a row with a definite index. */ void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all rows of the table. */ void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all rows of the table. */ StringSeq GetRowTitles(); /*! Sets the title of a column with a definite index. */ void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all columns of the table. */ void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all columns of the table. */ StringSeq GetColumnTitles(); //Rows units /*! Sets the unit of a row with a definite index. */ void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); /*! Sets the units for all rows of the table. */ void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); /*! Returns the units of all rows of the table. */ StringSeq GetRowUnits(); // table information /*! Returns the number of rows of the table. */ long GetNbRows(); /*! Returns the number of columns of the table. */ long GetNbColumns(); // operations with rows /*! Adds a row to the end of the table. */ void AddRow(in DoubleSeq theData) raises(IncorrectArgumentLength); /*! Sets the values of all elements of the row. */ void SetRow(in long theRow, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Returns the row of the table. */ DoubleSeq GetRow(in long theRow) raises(IncorrectIndex); // operations with columns /*! Adds a column to the end of the table. */ void AddColumn(in DoubleSeq theData) raises(IncorrectArgumentLength); /*! Sets the values of all elements of the column. */ void SetColumn(in long theColumn, in DoubleSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Returns the column of the table. */ DoubleSeq GetColumn(in long theColumn) raises(IncorrectIndex); // operations with elements /*! Puts a value in the table. \param theRow The row, where the value will be placed. \param theColumn The column, where the value will be placed. */ void PutValue(in double theValue, in long theRow, in long theColumn) raises(IncorrectIndex); /*! Returns True if there is a value in the table. \param theRow The row containing the value \param theColumn The column containing the value */ boolean HasValue(in long theRow, in long theColumn); /*! Returns the value from the table. \param theRow The row containing the value \param theColumn The column containing the value */ double GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); /*! Sets the max number of colums in the table. \note It'd better to set it before filling the table. */ void SetNbColumns(in long theNbColumns); /*! Returns the indices of the row where the values are defined. */ LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); // operations with files /*! Reads a table from a file. */ boolean ReadFromFile(in SALOMEDS::TMPFile theStream); /*! Saves a table into a file. */ SALOMEDS::TMPFile SaveToFile(); }; //========================================================================== /*! \brief %AttributeTableOfString interface This attribute allows to store a table of strings (indexing from 1 like in CASCADE) and string titles of this table, of each row, of each column.
See also an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeTableOfString : GenericAttribute { /*! This exception is raised when an incorrect index is passed as parameter. */ exception IncorrectIndex {}; /*! This exception is raised when an incorrect length of the argument is passed as parameter. */ exception IncorrectArgumentLength {}; // titles: for table, for each row, for each column /*! Sets the title of the table. */ void SetTitle(in string theTitle); /*! Returns the title of the table. */ string GetTitle(); /*! Sets the title of a row with a definite index. */ void SetRowTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all rows of the table. */ void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all rows of the table. */ StringSeq GetRowTitles(); /*! Sets the title of a column with a definite index. */ void SetColumnTitle(in long theIndex, in string theTitle) raises(IncorrectIndex); /*! Sets the titles for all columns of the table. */ void SetColumnTitles(in StringSeq theTitles) raises(IncorrectArgumentLength); /*! Returns the titles of all columns of the table. */ StringSeq GetColumnTitles(); //Rows units /*! Sets the unit of a row with a definite index. */ void SetRowUnit(in long theIndex, in string theUnit) raises(IncorrectIndex); /*! Sets the units for all rows of the table. */ void SetRowUnits(in StringSeq theUnits) raises(IncorrectArgumentLength); /*! Returns the units of all rows of the table. */ StringSeq GetRowUnits(); // table information /*! Returns the number of rows of the table. */ long GetNbRows(); /*! Returns the number of columns of the table. */ long GetNbColumns(); // operations with rows /*! Adds a row to the end of the table. */ void AddRow(in StringSeq theData) raises(IncorrectArgumentLength); /*! Sets the values of all elements of the row. */ void SetRow(in long theRow, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Returns the row of the table. */ StringSeq GetRow(in long theRow) raises(IncorrectIndex); // operations with columns /*! Adds a column to the end of the table. */ void AddColumn(in StringSeq theData) raises(IncorrectArgumentLength); /*! Sets the values of all elements of the column. */ void SetColumn(in long theColumn, in StringSeq theData) raises(IncorrectArgumentLength, IncorrectIndex); /*! Returns the column of the table. */ StringSeq GetColumn(in long theColumn) raises(IncorrectIndex); // operations with elements /*! Puts a value in the table. \param theRow The row, where the value will be placed. \param theColumn The column, where the value will be placed. */ void PutValue(in string theValue, in long theRow, in long theColumn) raises(IncorrectIndex); /*! Returns True if there is a value in the table. \param theRow The row containing the value \param theColumn The column containing the value */ boolean HasValue(in long theRow, in long theColumn); /*! Returns the value from the table. \param theRow The row containing the value \param theColumn The column containing the value */ string GetValue(in long theRow, in long theColumn) raises(IncorrectIndex); /*! Sets the max number of colums in the table. \note It'd better to set it before filling the table. */ void SetNbColumns(in long theNbColumns); /*! Returns the indices of the row where the values are defined. */ LongSeq GetRowSetIndices(in long theRow) raises(IncorrectIndex); // operations with files /*! Reads a table from a file. */ boolean ReadFromFile(in SALOMEDS::TMPFile theStream); /*! Saves a table into a file. */ SALOMEDS::TMPFile SaveToFile(); }; //========================================================================== /*! \brief %AttributeStudyProperties interface This attribute allows to store study properties: user name, creation date, creation mode, modified flag, locked flag.
See also an example of usage of these methods in batchmode of %SALOME application. */ //========================================================================== interface AttributeStudyProperties : GenericAttribute { /*! Sets the name of the author of the %Study */ void SetUserName(in string theName); /*! Returns the name of the user of the %Study. \note
It returns a null string, if user name is not set */ string GetUserName(); /*! Sets creation date of the %Study. */ void SetCreationDate(in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); /*! Returns creation date of the %Study and True if creation date is set. */ boolean GetCreationDate(out long theMinute, out long theHour, out long theDay, out long theMonth, out long theYear); /*! Sets creation mode of the %Study. \note
Creation mode must be: "from scratch" or "copy from". */ void SetCreationMode(in string theMode); /*! Returns creation mode: "from scratch", "copy from", or null string if creation mode is not set */ string GetCreationMode(); /*! Sets the number of transactions executed after the last saving of the document. */ void SetModified(in long theModified); /*! Returns True, if the document has been modified and not saved. */ boolean IsModified(); /*! Returns the number of transactions executed after the last saving of the document. */ long GetModified(); /*! Sets the document locked for modifications if theLocked is True. */ void SetLocked(in boolean theLocked); /*! Returns True if the document is locked for modifications. */ boolean IsLocked(); /*! Appends modification parameters to the modifications list. */ void SetModification(in string theName, in long theMinute, in long theHour, in long theDay, in long theMonth, in long theYear); /*! Returns a list of mosdifiers user names, modification dates. /note
If theWithCreator is True, then the output list will also contain the name of the author and the date of creation. */ void GetModificationsList(out StringSeq theNames, out LongSeq theMinutes, out LongSeq theHours, out LongSeq theDays, out LongSeq theMonths, out LongSeq theYears, in boolean theWithCreator); }; //========================================================================== /*! \brief %AttributePythonObject interface Attribute allowing to store pyton objects as a sequence of chars. */ //========================================================================== interface AttributePythonObject : GenericAttribute { /*! Sets in the attribute a Python object converted into a sequence of chars. \param theSequence A sequence of chars. \param IsScript Defines (if True) whether this sequence of chars is a Python script. */ void SetObject(in string theSequence, in boolean IsScript); /*! Returns a Python object stored in the attribute as a sequence of chars. */ string GetObject(); /*! Returns True if the sequence of bytes stored in the attribute corresponds to a Python script. */ boolean IsScript(); }; //========================================================================== /*! \brief %AttributeParameter interface Attribute is a universal container of basic types */ //========================================================================== interface AttributeParameter : GenericAttribute { /*! Associates a integer value with the ID \param theID An ID of a parameter. \param theValue A value of the parameter */ void SetInt(in string theID, in long theValue); /*! Returns a int value associated with the given ID \param theID An ID of a parameter. */ long GetInt(in string theID); /*! Associates a real value with the ID \param theID An ID of a parameter. \param theValue A value of the parameter */ void SetReal(in string theID, in double theValue); /*! Returns a real value associated with the given ID \param theID An ID of a parameter. */ double GetReal(in string theID); /*! Associates a string value with the ID \param theID An ID of a parameter. \param theValue A value of the parameter */ void SetString(in string theID, in string theValue); /*! Returns a string value associated with the given ID \param theID An ID of a parameter. */ string GetString(in string theID); /*! Associates a boolean value with the ID \param theID An ID of a parameter. \param theValue A value of the parameter */ void SetBool(in string theID, in boolean theValue); /*! Returns a boolean value associated with the given ID \param theID An ID of a parameter. */ boolean GetBool(in string theID); /*! Associates an array of real values with the ID \param theID An ID of a parameter. \param theArray The array of real values */ void SetRealArray(in string theID, in DoubleSeq theArray); /*! Returns an array of real values associated with the ID \param theID An ID of a parameter. */ DoubleSeq GetRealArray(in string theID); /*! Associates an array of integer values with the ID \param theID An ID of a parameter. \param theArray The array of integer values */ void SetIntArray(in string theID, in LongSeq theArray); /*! Returns an array of integer values associated with the ID \param theID An ID of a parameter. */ LongSeq GetIntArray(in string theID); /*! Associates an array of string values with the ID \param theID An ID of a parameter. \param theArray The array of string values */ void SetStrArray(in string theID, in StringSeq theArray); /*! Returns an array of string values associated with the ID \param theID An ID of a parameter. */ StringSeq GetStrArray(in string theID); /*! Returns True if for the ID of given type was assigned a value in the attribute \param theID An ID of a parameter. \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. */ boolean IsSet(in string theID, in long theType); /*! Removes a parameter with given ID and Type, returns True if succeded \param theID An ID of a parameter. \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. */ boolean RemoveID(in string theID, in long theType); /*! Returns a father attribute of this attribute */ AttributeParameter GetFather(); /*! Returns True if this attribute has a father attribute */ boolean HasFather(); /*! Returns True if this attribute is a root attribute */ boolean IsRoot(); /*! Clears the content of the attribute */ void Clear(); /*! Returns a sequence of ID's of the give type \param theType A type of parameter [0(Int), 1(Real), 2(Boolean), 3(String), 4(RealArray), 5(IntArray), 6(StrArray)]. */ StringSeq GetIDs(in long theType); }; }; #endif