Generic table attribute. More...
Data Structures | |
exception | IncorrectArgumentLength |
This exception is raised when sequence of incorrect length is passed as parameter. More... | |
exception | IncorrectIndex |
This exception is raised when an invalid (out of range) index is passed as parameter. More... | |
Public Types | |
enum | SortOrder { AscendingOrder, DescendingOrder } |
Sort order. More... | |
enum | SortPolicy { EmptyLowest, EmptyHighest, EmptyFirst, EmptyLast, EmptyIgnore } |
Sort policy (specifies how empty cells are taken into account when sorting) More... | |
Public Member Functions | |
void | SetTitle (in string title) |
Sets the main title of the table. More... | |
string | GetTitle () |
Returns the title of the table. More... | |
void | SetRowTitle (in long row, in string title) raises (IncorrectIndex) |
Sets the title of a row with specified index. More... | |
string | GetRowTitle (in long row) raises (IncorrectIndex) |
Returns the title of a row with specified index. More... | |
void | SetRowTitles (in StringSeq titles) raises (IncorrectArgumentLength) |
Sets the titles for all rows in the table. More... | |
StringSeq | GetRowTitles () |
Returns the titles of all rows of the table. More... | |
void | SetColumnTitle (in long column, in string title) raises (IncorrectIndex) |
Sets the title of a column with specified index. More... | |
string | GetColumnTitle (in long column) raises (IncorrectIndex) |
Returns the title of a column with specified index. More... | |
void | SetColumnTitles (in StringSeq titles) raises (IncorrectArgumentLength) |
Sets the titles for all columns in the table. More... | |
StringSeq | GetColumnTitles () |
Returns the titles of all columns of the table. More... | |
void | SetRowUnit (in long row, in string unit) raises (IncorrectIndex) |
Assigns the unit label to the row with specified index. More... | |
string | GetRowUnit (in long row) raises (IncorrectIndex) |
Returns the unit label of a row with specified index. More... | |
void | SetRowUnits (in StringSeq units) raises (IncorrectArgumentLength) |
Sets the unit labels for all rows in the table. More... | |
StringSeq | GetRowUnits () |
Returns the unit labels of all rows of the table. More... | |
long | GetNbRows () |
Returns the number of rows of the table. More... | |
long | GetNbColumns () |
Returns the number of columns of the table. More... | |
boolean | HasValue (in long row, in long column) |
Check if the value is set for the cell with specified row and column indices. More... | |
void | RemoveValue (in long row, in long column) raises (IncorrectIndex) |
Clear value in the specified table cell. More... | |
void | SetNbColumns (in long columns) |
Sets the maximum number of colums in the table. More... | |
LongSeq | GetRowSetIndices (in long row) raises (IncorrectIndex) |
Returns the indices of the columns in the specified row for which values are set. More... | |
LongSeq | SortRow (in long row, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex) |
Sort values in the specified table row. More... | |
LongSeq | SortColumn (in long column, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex) |
Sort values in the specified table column. More... | |
LongSeq | SortByRow (in long row, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex) |
Sort table columns by the specified row. More... | |
LongSeq | SortByColumn (in long column, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex) |
Sort table rows by the specified column. More... | |
void | SwapCells (in long row1, in long column1, in long row2, in long column2) raises (IncorrectIndex) |
Swap values in two table cells. More... | |
void | SwapRows (in long row1, in long row2) raises (IncorrectIndex) |
Swap two table rows. More... | |
void | SwapColumns (in long column1, in long column2) raises (IncorrectIndex) |
Swap two table columns. More... | |
boolean | ReadFromFile (in SALOMEDS::TMPFile fileStream) |
Reads a table from a byte stream. More... | |
SALOMEDS::TMPFile | SaveToFile () |
Saves a table into a byte stream. More... | |
void | CheckLocked () raises (LockProtection) |
Method CheckLocked. More... | |
string | Type () |
Get Type. More... | |
string | GetClassType () |
Get the class type. More... | |
SObject | GetSObject () |
Get SObject. More... | |
long long | GetLocalImpl (in string theHostname, in long thePID, out boolean isLocal) |
Private method, returns an implementation of this GenericAttribute. More... | |
void | Register () |
Increase the reference count (mark as used by another object). More... | |
void | UnRegister () |
Decrease the reference count (release by another object). More... | |
void | Destroy () |
Obsolete, left for compatibility reasons only. Use UnRegister() instead. More... | |
Generic table attribute.
Used as base interface for the AttributeTableOfInteger, AttributeTableOfReal and AttributeTableOfString. Provides functions which are common for all table attributes.
Sort policy (specifies how empty cells are taken into account when sorting)
void SALOMEDS::AttributeTable::SetTitle | ( | in string | title | ) |
string SALOMEDS::AttributeTable::GetTitle | ( | ) |
void SALOMEDS::AttributeTable::SetRowTitle | ( | in long | row, |
in string | title | ||
) | raises (IncorrectIndex) |
Sets the title of a row with specified index.
Raises an exception if row is out of range.
row | row index |
title | title being set to the row |
string SALOMEDS::AttributeTable::GetRowTitle | ( | in long | row | ) | raises (IncorrectIndex) |
Returns the title of a row with specified index.
Raises an exception if row is out of range.
row | row index |
void SALOMEDS::AttributeTable::SetRowTitles | ( | in StringSeq | titles | ) | raises (IncorrectArgumentLength) |
Sets the titles for all rows in the table.
Raises an exception if length of the titles parameter is not equal to the number of rows in the table.
titles | titles being set to the table rows |
StringSeq SALOMEDS::AttributeTable::GetRowTitles | ( | ) |
void SALOMEDS::AttributeTable::SetColumnTitle | ( | in long | column, |
in string | title | ||
) | raises (IncorrectIndex) |
Sets the title of a column with specified index.
Raises an exception if column is out of range.
column | column index |
title | title being set to the column |
string SALOMEDS::AttributeTable::GetColumnTitle | ( | in long | column | ) | raises (IncorrectIndex) |
Returns the title of a column with specified index.
Raises an exception if column is out of range.
column | column index |
void SALOMEDS::AttributeTable::SetColumnTitles | ( | in StringSeq | titles | ) | raises (IncorrectArgumentLength) |
Sets the titles for all columns in the table.
Raises an exception if length of the titles parameter is not equal to the number of columns in the table.
titles | titles being set to the table columns |
StringSeq SALOMEDS::AttributeTable::GetColumnTitles | ( | ) |
Returns the titles of all columns of the table.
void SALOMEDS::AttributeTable::SetRowUnit | ( | in long | row, |
in string | unit | ||
) | raises (IncorrectIndex) |
Assigns the unit label to the row with specified index.
Raises an exception if row is out of range.
row | row index |
unit | unit label being set to the row |
string SALOMEDS::AttributeTable::GetRowUnit | ( | in long | row | ) | raises (IncorrectIndex) |
Returns the unit label of a row with specified index.
Raises an exception if row is out of range.
row | row index |
void SALOMEDS::AttributeTable::SetRowUnits | ( | in StringSeq | units | ) | raises (IncorrectArgumentLength) |
Sets the unit labels for all rows in the table.
Raises an exception if length of the units parameter is not equal to the number of rows in the table.
units | unit labels being set to the table rows |
StringSeq SALOMEDS::AttributeTable::GetRowUnits | ( | ) |
Returns the unit labels of all rows of the table.
long SALOMEDS::AttributeTable::GetNbRows | ( | ) |
long SALOMEDS::AttributeTable::GetNbColumns | ( | ) |
Returns the number of columns of the table.
boolean SALOMEDS::AttributeTable::HasValue | ( | in long | row, |
in long | column | ||
) |
Check if the value is set for the cell with specified row and column indices.
row | row index |
column | column index |
true
if value is set for the specified cell or false
otherwise (or if row/column index is/are out of range) void SALOMEDS::AttributeTable::RemoveValue | ( | in long | row, |
in long | column | ||
) | raises (IncorrectIndex) |
Clear value in the specified table cell.
Raises an exception if row or column is out of range.
row | row index |
column | column index |
void SALOMEDS::AttributeTable::SetNbColumns | ( | in long | columns | ) |
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).
columns | total number of columns being set for the table |
LongSeq SALOMEDS::AttributeTable::GetRowSetIndices | ( | in long | row | ) | raises (IncorrectIndex) |
Returns the indices of the columns in the specified row for which values are set.
Raises an exception if row is out of range.
row | row index |
LongSeq SALOMEDS::AttributeTable::SortRow | ( | in long | row, |
in SortOrder | order, | ||
in SortPolicy | policy | ||
) | raises (IncorrectIndex) |
Sort values in the specified table row.
Sort order is specified by the order parameter. The policy specifies how to process empty cells (put to the first place, ignore, etc).
Raises an exception if row is out of range.
row | row index |
order | sort order (ascending/descending) |
policy | sort policy (specifies how to process empty cells) |
LongSeq SALOMEDS::AttributeTable::SortColumn | ( | in long | column, |
in SortOrder | order, | ||
in SortPolicy | policy | ||
) | raises (IncorrectIndex) |
Sort values in the specified table column.
Sort order is specified by the order parameter. The policy specifies how to process empty cells (put to the first place, ignore, etc).
Raises an exception if column is out of range.
column | column index |
order | sort order (ascending/descending) |
policy | sort policy (specifies how to process empty cells) |
LongSeq SALOMEDS::AttributeTable::SortByRow | ( | in long | row, |
in SortOrder | order, | ||
in SortPolicy | policy | ||
) | raises (IncorrectIndex) |
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 order parameter. The policy specifies how to process empty cells (put to the first place, ignore, etc).
Raises an exception if row is out of range.
row | row index |
order | sort order (ascending/descending) |
policy | sort policy (specifies how to process empty cells) |
LongSeq SALOMEDS::AttributeTable::SortByColumn | ( | in long | column, |
in SortOrder | order, | ||
in SortPolicy | policy | ||
) | raises (IncorrectIndex) |
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 order parameter. The policy specifies how to process empty cells (put to the first place, ignore, etc).
Raises an exception if column is out of range.
column | column index |
order | sort order (ascending/descending) |
policy | sort policy (specifies how to process empty cells) |
void SALOMEDS::AttributeTable::SwapCells | ( | in long | row1, |
in long | column1, | ||
in long | row2, | ||
in long | column2 | ||
) | raises (IncorrectIndex) |
Swap values in two table cells.
Raises an exception if any specified index is out of range.
row1 | first cell's row index |
column1 | first cell's column index |
row2 | second cell's row index |
column2 | second cell's column index |
void SALOMEDS::AttributeTable::SwapRows | ( | in long | row1, |
in long | row2 | ||
) | raises (IncorrectIndex) |
Swap two table rows.
Raises an exception if any row1 or row2 is out of range.
row1 | first row's index |
row2 | second row's index |
void SALOMEDS::AttributeTable::SwapColumns | ( | in long | column1, |
in long | column2 | ||
) | raises (IncorrectIndex) |
Swap two table columns.
Raises an exception if any column1 or column2 is out of range.
column1 | first column's index |
column2 | second column's index |
boolean SALOMEDS::AttributeTable::ReadFromFile | ( | in SALOMEDS::TMPFile | fileStream | ) |
Reads a table from a byte stream.
fileStream | byte stream |
true
if table is successfully read or false
otherwise SALOMEDS::TMPFile SALOMEDS::AttributeTable::SaveToFile | ( | ) |
Saves a table into a byte stream.
|
inherited |
Method CheckLocked.
Checks whether the Study is protected for modifications.
|
inherited |
Get Type.
|
inherited |
Get the class type.
|
inherited |
Private method, returns an implementation of this GenericAttribute.
theHostname | is a hostname of the caller |
thePID | is a process ID of the caller |
isLocal | is set True if the GenericAttribute is launched locally with the caller |
|
inherited |
Increase the reference count (mark as used by another object).
|
inherited |
Decrease the reference count (release by another object).
|
inherited |
Obsolete, left for compatibility reasons only. Use UnRegister() instead.