Back to index

salome-kernel  6.5.0
Public Types | Public Member Functions
SALOMEDS::AttributeTableOfInteger Interface Reference

Table of integer values. More...

import "SALOMEDS_Attributes.idl";

Inheritance diagram for SALOMEDS::AttributeTableOfInteger:
Inheritance graph
[legend]
Collaboration diagram for SALOMEDS::AttributeTableOfInteger:
Collaboration graph
[legend]

List of all members.

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.
void SetRow (in long row, in LongSeq data) raises (IncorrectArgumentLength, IncorrectIndex)
 Replaces all the elements of the specified row with new values.
LongSeq GetRow (in long row) raises (IncorrectIndex)
 Returns all the values of the specified row in the table.
void AddColumn (in LongSeq data) raises (IncorrectArgumentLength)
 Appends new column to the table.
void SetColumn (in long column, in LongSeq data) raises (IncorrectArgumentLength, IncorrectIndex)
 Replaces all the elements of the specified column with new values.
LongSeq GetColumn (in long column) raises (IncorrectIndex)
 Returns all the values of the specified column in the table.
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.
long GetValue (in long row, in long column) raises (IncorrectIndex)
 Returns the value from the cell table.
void SetTitle (in string title)
 Sets the main title of the table.
string GetTitle ()
 Returns the title of the table.
void SetRowTitle (in long row, in string title) raises (IncorrectIndex)
 Sets the title of a row with specified index.
string GetRowTitle (in long row) raises (IncorrectIndex)
 Returns the title of a row with specified index.
void SetRowTitles (in StringSeq titles) raises (IncorrectArgumentLength)
 Sets the titles for all rows in the table.
StringSeq GetRowTitles ()
 Returns the titles of all rows of the table.
void SetColumnTitle (in long column, in string title) raises (IncorrectIndex)
 Sets the title of a column with specified index.
string GetColumnTitle (in long column) raises (IncorrectIndex)
 Returns the title of a column with specified index.
void SetColumnTitles (in StringSeq titles) raises (IncorrectArgumentLength)
 Sets the titles for all columns in the table.
StringSeq GetColumnTitles ()
 Returns the titles of all columns of the table.
void SetRowUnit (in long row, in string unit) raises (IncorrectIndex)
 Assigns the unit label to the row with specified index.
string GetRowUnit (in long row) raises (IncorrectIndex)
 Returns the unit label of a row with specified index.
void SetRowUnits (in StringSeq units) raises (IncorrectArgumentLength)
 Sets the unit labels for all rows in the table.
StringSeq GetRowUnits ()
 Returns the unit labels of all rows of the table.
long GetNbRows ()
 Returns the number of rows of the table.
long GetNbColumns ()
 Returns the number of columns of the table.
boolean HasValue (in long row, in long column)
 Check if the value is set for the cell with specified row and column indices.
void RemoveValue (in long row, in long column) raises (IncorrectIndex)
 Clear value in the specified table cell.
void SetNbColumns (in long columns)
 Sets the maximum number of colums in the table.
LongSeq GetRowSetIndices (in long row) raises (IncorrectIndex)
 Returns the indices of the columns in the specified row for which values are set.
LongSeq SortRow (in long row, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex)
 Sort values in the specified table row.
LongSeq SortColumn (in long column, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex)
 Sort values in the specified table column.
LongSeq SortByRow (in long row, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex)
 Sort table columns by the specified row.
LongSeq SortByColumn (in long column, in SortOrder order, in SortPolicy policy) raises (IncorrectIndex)
 Sort table rows by the specified column.
void SwapCells (in long row1, in long column1, in long row2, in long column2) raises (IncorrectIndex)
 Swap values in two table cells.
void SwapRows (in long row1, in long row2) raises (IncorrectIndex)
 Swap two table rows.
void SwapColumns (in long column1, in long column2) raises (IncorrectIndex)
 Swap two table columns.
boolean ReadFromFile (in SALOMEDS::TMPFile fileStream)
 Reads a table from a byte stream.
SALOMEDS::TMPFile SaveToFile ()
 Saves a table into a byte stream.
void CheckLocked () raises (LockProtection)
 Method CheckLocked.
string Type ()
 Get Type.
string GetClassType ()
 Get the class type.
SObject GetSObject ()
 Get SObject.
long long GetLocalImpl (in string theHostname, in long thePID, out boolean isLocal)
 Private method, returns an implementation of this GenericAttribute.
void Register ()
 Increase the reference count (mark as used by another object).
void UnRegister ()
 Decrease the reference count (release by another object).
void Destroy ()
 Obsolete, left for compatibility reasons only.

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

Definition at line 1214 of file SALOMEDS_Attributes.idl.


Member Enumeration Documentation

Sort order.

Enumerator:
AscendingOrder 

The items are sorted ascending.

DescendingOrder 

The items are sorted descending.

Definition at line 906 of file SALOMEDS_Attributes.idl.

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)

Definition at line 912 of file SALOMEDS_Attributes.idl.


Member Function Documentation

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()

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()

Method CheckLocked.

Checks whether the Study is protected for modifications.

Note:

This exception is raised only outside a transaction.
void SALOME::GenericObj::Destroy ( ) [inherited]

Obsolete, left for compatibility reasons only.

Use UnRegister() instead.

Get the class type.

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()
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()

Returns the titles of all columns of the table.

Returns:
list of all columns titles
See also:
SetColumnTitles()
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

Returns the number of columns of the table.

Returns:
columns count
See also:
GetNbRows(), SetNbColumns()

Returns the number of rows of the table.

Returns:
rows count
See also:
GetNbColumns()

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()
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
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()

Returns the titles of all rows of the table.

Returns:
list of all rows titles
See also:
SetRowTitles()
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()

Returns the unit labels of all rows of the table.

Returns:
list of all rows unit labels
See also:
SetRowUnits()

Get SObject.

string SALOMEDS::AttributeTable::GetTitle ( ) [inherited]

Returns the title of the table.

Returns:
table title (empty string if not set)
See also:
SetTitle()
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()
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::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()
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()
void SALOME::GenericObj::Register ( ) [inherited]

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

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()

Saves a table into a byte stream.

Returns:
byte stream with table representation
See also:
ReadFromFile()

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()
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()

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()
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()

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()
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()

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()
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()

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()
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()
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
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::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::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
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::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
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
string SALOMEDS::GenericAttribute::Type ( ) [inherited]

Get Type.

void SALOME::GenericObj::UnRegister ( ) [inherited]

Decrease the reference count (release by another object).

Here is the caller graph for this function:


The documentation for this interface was generated from the following file: