Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
SALOMEDS::AttributeTableOfInteger Interface Reference

Table of integer values. More...

Inheritance diagram for SALOMEDS::AttributeTableOfInteger:
Inheritance graph

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 AddRow (in LongSeq data) raises (IncorrectArgumentLength)
 Appends new row to the table. More...
 
void SetRow (in long row, in LongSeq data) raises (IncorrectArgumentLength, IncorrectIndex)
 Replaces all the elements of the specified row with new values. More...
 
LongSeq GetRow (in long row) raises (IncorrectIndex)
 Returns all the values of the specified row in the table. More...
 
void AddColumn (in LongSeq data) raises (IncorrectArgumentLength)
 Appends new column to the table. More...
 
void SetColumn (in long column, in LongSeq data) raises (IncorrectArgumentLength, IncorrectIndex)
 Replaces all the elements of the specified column with new values. More...
 
LongSeq GetColumn (in long column) raises (IncorrectIndex)
 Returns all the values of the specified column in the table. More...
 
void PutValue (in long value, in long row, in long column) raises (IncorrectIndex)
 Puts a value to the table cell specified by row and column indices. More...
 
long GetValue (in long row, in long column) raises (IncorrectIndex)
 Returns the value from the cell table. More...
 
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...
 

Detailed Description

Table of integer values.

This attribute allows to store a table of integer values. It is possible to specify titles for rows and columns. In addition, the unis labels can be assigned to the rows. And finally, the table iself can have title.

Note
The indices of rows and columns in the table start from 1.

See example21 for an example of usage of this attribute in batchmode of SALOME application.

See Also
AttributeTable, AttributeTableOfReal, AttributeTableOfString

Member Enumeration Documentation

Sort order.

Enumerator
AscendingOrder 

The items are sorted ascending.

DescendingOrder 

The items are sorted descending.

Sort policy (specifies how empty cells are taken into account when sorting)

Enumerator
EmptyLowest 

Empty cells are considered as lowest values.

EmptyHighest 

Empty cells are considered as highest values.

EmptyFirst 

Empty cells are always first.

EmptyLast 

Empty cells are always last.

EmptyIgnore 

Empty cells are ignored (stay at initial positions)

Member Function Documentation

void SALOMEDS::AttributeTableOfInteger::AddRow ( in LongSeq  data) raises (IncorrectArgumentLength)

Appends new row to the table.

If the length of the data parameter is greater than current number of columns in the table, the table is automatically resized.

Parameters
datasequence of values which will be set as elements of the added row
See Also
SetRow(), GetRow(), AddColumn()
void SALOMEDS::AttributeTableOfInteger::SetRow ( in long  row,
in LongSeq  data 
) raises (IncorrectArgumentLength, IncorrectIndex)

Replaces all the elements of the specified row with new values.

Raises an exception if row is out of range or if the length of the data parameter is not equal to the number of columns in the table.

Parameters
rowrow index
datasequence of values being set as values of the row
See Also
GetRow(), AddRow(), SetColumn()
LongSeq SALOMEDS::AttributeTableOfInteger::GetRow ( in long  row) raises (IncorrectIndex)

Returns all the values of the specified row in the table.

Raises an exception if row is out of range.

Note
For empty cells 0 value is returned.
Parameters
rowrow index
Returns
sequence of values which are set as elements of the row.
See Also
SetRow(), AddRow()
void SALOMEDS::AttributeTableOfInteger::AddColumn ( in LongSeq  data) raises (IncorrectArgumentLength)

Appends new column to the table.

If the length of the data parameter is greater than current number of rows in the table, the table is automatically resized.

Parameters
datasequence of values which will be set as elements of the added column
See Also
SetColumn(), GetColumn(), AddRow()
void SALOMEDS::AttributeTableOfInteger::SetColumn ( in long  column,
in LongSeq  data 
) raises (IncorrectArgumentLength, IncorrectIndex)

Replaces all the elements of the specified column with new values.

Raises an exception if column is out of range or if the length of the data parameter is not equal to the number of rows in the table.

Parameters
columncolumn index
datasequence of values being set as values of the column
See Also
GetColumn(), AddColumn(), SetRow()
LongSeq SALOMEDS::AttributeTableOfInteger::GetColumn ( in long  column) raises (IncorrectIndex)

Returns all the values of the specified column in the table.

Raises an exception if column is out of range.

Note
For empty cells 0 value is returned.
Parameters
columncolumn index
Returns
sequence of values which are set as elements of the column.
See Also
SetColumn(), AddColumn()
void SALOMEDS::AttributeTableOfInteger::PutValue ( in long  value,
in long  row,
in long  column 
) raises (IncorrectIndex)

Puts a value to the table cell specified by row and column indices.

If the row and/or column parameter(s) are greater than current number of rows/columns in the table, the table is automatically resized.

Parameters
valuevalue being set to the table cell
rowrow index
columncolumn index
See Also
GetValue(), HasValue()
long SALOMEDS::AttributeTableOfInteger::GetValue ( in long  row,
in long  column 
) raises (IncorrectIndex)

Returns the value from the cell table.

Raises an exception if row or column is out of range or if value is not set for the specified table cell.

Parameters
rowrow index
columncolumn index
Returns
value assigned to the table cell
See Also
PutValue(), HasValue()
void SALOMEDS::AttributeTable::SetTitle ( in string  title)
inherited

Sets the main title of the table.

Parameters
titletitle being set to the table
See Also
GetTitle()
string SALOMEDS::AttributeTable::GetTitle ( )
inherited

Returns the title of the table.

Returns
table title (empty string if not set)
See Also
SetTitle()
void SALOMEDS::AttributeTable::SetRowTitle ( in long  row,
in string  title 
) raises (IncorrectIndex)
inherited

Sets the title of a row with specified index.

Raises an exception if row is out of range.

Parameters
rowrow index
titletitle being set to the row
See Also
GetRowTitle()
string SALOMEDS::AttributeTable::GetRowTitle ( in long  row) raises (IncorrectIndex)
inherited

Returns the title of a row with specified index.

Raises an exception if row is out of range.

Parameters
rowrow index
Returns
row title (empty string if not set)
See Also
SetRowTitle()
void SALOMEDS::AttributeTable::SetRowTitles ( in StringSeq  titles) raises (IncorrectArgumentLength)
inherited

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.

Parameters
titlestitles being set to the table rows
See Also
GetRowTitles()
StringSeq SALOMEDS::AttributeTable::GetRowTitles ( )
inherited

Returns the titles of all rows of the table.

Returns
list of all rows titles
See Also
SetRowTitles()
void SALOMEDS::AttributeTable::SetColumnTitle ( in long  column,
in string  title 
) raises (IncorrectIndex)
inherited

Sets the title of a column with specified index.

Raises an exception if column is out of range.

Parameters
columncolumn index
titletitle being set to the column
See Also
GetColumnTitle()
string SALOMEDS::AttributeTable::GetColumnTitle ( in long  column) raises (IncorrectIndex)
inherited

Returns the title of a column with specified index.

Raises an exception if column is out of range.

Parameters
columncolumn index
Returns
column title (empty string if not set)
See Also
SetColumnTitle()
void SALOMEDS::AttributeTable::SetColumnTitles ( in StringSeq  titles) raises (IncorrectArgumentLength)
inherited

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.

Parameters
titlestitles being set to the table columns
See Also
GetColumnTitles()
StringSeq SALOMEDS::AttributeTable::GetColumnTitles ( )
inherited

Returns the titles of all columns of the table.

Returns
list of all columns titles
See Also
SetColumnTitles()
void SALOMEDS::AttributeTable::SetRowUnit ( in long  row,
in string  unit 
) raises (IncorrectIndex)
inherited

Assigns the unit label to the row with specified index.

Raises an exception if row is out of range.

Parameters
rowrow index
unitunit label being set to the row
See Also
GetRowUnit()
string SALOMEDS::AttributeTable::GetRowUnit ( in long  row) raises (IncorrectIndex)
inherited

Returns the unit label of a row with specified index.

Raises an exception if row is out of range.

Parameters
rowrow index
Returns
row unit label (empty string if not set)
See Also
SetRowUnit()
void SALOMEDS::AttributeTable::SetRowUnits ( in StringSeq  units) raises (IncorrectArgumentLength)
inherited

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.

Parameters
unitsunit labels being set to the table rows
See Also
GetRowUnits()
StringSeq SALOMEDS::AttributeTable::GetRowUnits ( )
inherited

Returns the unit labels of all rows of the table.

Returns
list of all rows unit labels
See Also
SetRowUnits()
long SALOMEDS::AttributeTable::GetNbRows ( )
inherited

Returns the number of rows of the table.

Returns
rows count
See Also
GetNbColumns()
long SALOMEDS::AttributeTable::GetNbColumns ( )
inherited

Returns the number of columns of the table.

Returns
columns count
See Also
GetNbRows(), SetNbColumns()
boolean SALOMEDS::AttributeTable::HasValue ( in long  row,
in long  column 
)
inherited

Check if the value is set for the cell with specified row and column indices.

Parameters
rowrow index
columncolumn index
Returns
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)
inherited

Clear value in the specified table cell.

Raises an exception if row or column is out of range.

Parameters
rowrow index
columncolumn index
See Also
HasValue()
void SALOMEDS::AttributeTable::SetNbColumns ( in long  columns)
inherited

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.
Parameters
columnstotal number of columns being set for the table
See Also
GetNbColumns()
LongSeq SALOMEDS::AttributeTable::GetRowSetIndices ( in long  row) raises (IncorrectIndex)
inherited

Returns the indices of the columns in the specified row for which values are set.

Raises an exception if row is out of range.

Parameters
rowrow index
Returns
list of column indices
LongSeq SALOMEDS::AttributeTable::SortRow ( in long  row,
in SortOrder  order,
in SortPolicy  policy 
) raises (IncorrectIndex)
inherited

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.

Note
Other table rows are not affected.
Parameters
rowrow index
ordersort order (ascending/descending)
policysort policy (specifies how to process empty cells)
Returns
list of mixed column indices
LongSeq SALOMEDS::AttributeTable::SortColumn ( in long  column,
in SortOrder  order,
in SortPolicy  policy 
) raises (IncorrectIndex)
inherited

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.

Note
Other table columns are not affected.
Parameters
columncolumn index
ordersort order (ascending/descending)
policysort policy (specifies how to process empty cells)
Returns
list of mixed row indices
LongSeq SALOMEDS::AttributeTable::SortByRow ( in long  row,
in SortOrder  order,
in SortPolicy  policy 
) raises (IncorrectIndex)
inherited

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.

Parameters
rowrow index
ordersort order (ascending/descending)
policysort policy (specifies how to process empty cells)
Returns
list of mixed column indices
LongSeq SALOMEDS::AttributeTable::SortByColumn ( in long  column,
in SortOrder  order,
in SortPolicy  policy 
) raises (IncorrectIndex)
inherited

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.

Parameters
columncolumn index
ordersort order (ascending/descending)
policysort policy (specifies how to process empty cells)
Returns
list of mixed row indices
void SALOMEDS::AttributeTable::SwapCells ( in long  row1,
in long  column1,
in long  row2,
in long  column2 
) raises (IncorrectIndex)
inherited

Swap values in two table cells.

Raises an exception if any specified index is out of range.

Parameters
row1first cell's row index
column1first cell's column index
row2second cell's row index
column2second cell's column index
void SALOMEDS::AttributeTable::SwapRows ( in long  row1,
in long  row2 
) raises (IncorrectIndex)
inherited

Swap two table rows.

Raises an exception if any row1 or row2 is out of range.

Parameters
row1first row's index
row2second row's index
void SALOMEDS::AttributeTable::SwapColumns ( in long  column1,
in long  column2 
) raises (IncorrectIndex)
inherited

Swap two table columns.

Raises an exception if any column1 or column2 is out of range.

Parameters
column1first column's index
column2second column's index
boolean SALOMEDS::AttributeTable::ReadFromFile ( in SALOMEDS::TMPFile  fileStream)
inherited

Reads a table from a byte stream.

Parameters
fileStreambyte stream
Returns
true if table is successfully read or false otherwise
See Also
SaveToFile()
SALOMEDS::TMPFile SALOMEDS::AttributeTable::SaveToFile ( )
inherited

Saves a table into a byte stream.

Returns
byte stream with table representation
See Also
ReadFromFile()
void SALOMEDS::GenericAttribute::CheckLocked ( ) raises (LockProtection)
inherited

Method CheckLocked.

Checks whether the Study is protected for modifications.

Note

This exception is raised only outside a transaction.
string SALOMEDS::GenericAttribute::Type ( )
inherited

Get Type.

string SALOMEDS::GenericAttribute::GetClassType ( )
inherited

Get the class type.

SObject SALOMEDS::GenericAttribute::GetSObject ( )
inherited

Get SObject.

long long SALOMEDS::GenericAttribute::GetLocalImpl ( in string  theHostname,
in long  thePID,
out boolean  isLocal 
)
inherited

Private method, returns an implementation of this GenericAttribute.

Parameters
theHostnameis a hostname of the caller
thePIDis a process ID of the caller
isLocalis set True if the GenericAttribute is launched locally with the caller
void SALOME::GenericObj::Register ( )
inherited

Increase the reference count (mark as used by another object).

void SALOME::GenericObj::UnRegister ( )
inherited

Decrease the reference count (release by another object).

void SALOME::GenericObj::Destroy ( )
inherited

Obsolete, left for compatibility reasons only. Use UnRegister() instead.