-
- // 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.
-*/
+ /*!
+ \brief Check if the value is set for the cell with specified \a row and \a column indices.
+ \param row row index
+ \param column column index
+ \return \c true if value is set for the specified cell or \c false otherwise
+ (or if row/column index is/are out of range)
+ */
+ boolean HasValue(in long row, in long column);
+ /*!
+ \brief Clear value in the specified table cell.
+
+ Raises an exception if \a row or \a column is out of range.
+
+ \param row row index
+ \param column column index
+ \sa HasValue()
+ */
+ void RemoveValue(in long row, in long column) raises(IncorrectIndex);
+ /*!
+ \brief Sets the maximum number of colums in the table.
+
+ If new number of columns is less than the current one, the table is truncated
+ (extra columns are removed).
+
+ \note It is recommended to set number of columns before assigning data to the table.
+
+ \param columns total number of columns being set for the table
+ \sa GetNbColumns()
+ */
+ void SetNbColumns(in long columns);
+ /*!
+ \brief Returns the indices of the columns in the specified \a row for which
+ values are set.
+
+ Raises an exception if \a row is out of range.
+
+ \param row row index
+ \return list of column indices
+ */
+ LongSeq GetRowSetIndices(in long row) raises(IncorrectIndex);
+ /*!
+ \brief Sort values in the specified table row.
+
+ Sort order is specified by the \a order parameter. The \a policy
+ specifies how to process empty cells (put to the first place, ignore, etc).
+
+ Raises an exception if \a row is out of range.
+
+ \note Other table rows are not affected.
+
+ \param row row index
+ \param order sort order (ascending/descending)
+ \param policy sort policy (specifies how to process empty cells)
+ \return list of mixed column indices
+ */
+ LongSeq SortRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
+ /*!
+ \brief Sort values in the specified table column.
+
+ Sort order is specified by the \a order parameter. The \a policy
+ specifies how to process empty cells (put to the first place, ignore, etc).
+
+ Raises an exception if \a column is out of range.
+
+ \note Other table columns are not affected.
+
+ \param column column index
+ \param order sort order (ascending/descending)
+ \param policy sort policy (specifies how to process empty cells)
+ \return list of mixed row indices
+ */
+ LongSeq SortColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
+ /*!
+ \brief Sort table columns by the specified row.
+
+ All the table columns are sorted according to the values in the specified
+ row. Sort order is specified by the \a order parameter. The \a policy
+ specifies how to process empty cells (put to the first place, ignore, etc).
+
+ Raises an exception if \a row is out of range.
+
+ \param row row index
+ \param order sort order (ascending/descending)
+ \param policy sort policy (specifies how to process empty cells)
+ \return list of mixed column indices
+ */
+ LongSeq SortByRow(in long row, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
+ /*!
+ \brief Sort table rows by the specified column.
+
+ All the table rows are sorted according to the values in the specified
+ column. Sort order is specified by the \a order parameter. The \a policy
+ specifies how to process empty cells (put to the first place, ignore, etc).
+
+ Raises an exception if \a column is out of range.
+
+ \param column column index
+ \param order sort order (ascending/descending)
+ \param policy sort policy (specifies how to process empty cells)
+ \return list of mixed row indices
+ */
+ LongSeq SortByColumn(in long column, in SortOrder order, in SortPolicy policy) raises(IncorrectIndex);
+ /*!
+ \brief Swap values in two table cells.
+
+ Raises an exception if any specified index is out of range.
+
+ \param row1 first cell's row index
+ \param column1 first cell's column index
+ \param row2 second cell's row index
+ \param column2 second cell's column index
+ */
+ void SwapCells(in long row1, in long column1, in long row2, in long column2) raises(IncorrectIndex);
+ /*!
+ \brief Swap two table rows.
+
+ Raises an exception if any \a row1 or \a row2 is out of range.
+
+ \param row1 first row's index
+ \param row2 second row's index
+ */
+ void SwapRows(in long row1, in long row2) raises(IncorrectIndex);
+ /*!
+ \brief Swap two table columns.
+
+ Raises an exception if any \a column1 or \a column2 is out of range.
+
+ \param column1 first column's index
+ \param column2 second column's index
+ */
+ void SwapColumns(in long column1, in long column2) raises(IncorrectIndex);
+ /*!
+ \brief Reads a table from a byte stream.
+ \param fileStream byte stream
+ \return \c true if table is successfully read or \c false otherwise
+ \sa SaveToFile()
+ */
+ boolean ReadFromFile(in SALOMEDS::TMPFile fileStream);
+ /*!
+ \brief Saves a table into a byte stream.
+ \return byte stream with table representation
+ \sa ReadFromFile()
+ */