Version: 9.12.0
SALOMEDS::AttributeTableOfReal Interface Reference

Table of real values. More...

import"SALOMEDS_Attributes.idl";

Inheritance diagram for SALOMEDS::AttributeTableOfReal:

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

Detailed Description

Table of real values.

This attribute allows to store a table of real 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 example22 for an example of usage of this attribute in batchmode of SALOME application.

See also
AttributeTable, AttributeTableOfInteger, AttributeTableOfString

Member Enumeration Documentation

◆ SortOrder

Sort order.

Enumerator
AscendingOrder 

The items are sorted ascending.

DescendingOrder 

The items are sorted descending.

◆ SortPolicy

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

◆ AddColumn()

void SALOMEDS::AttributeTableOfReal::AddColumn ( in DoubleSeq  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()

◆ AddRow()

void SALOMEDS::AttributeTableOfReal::AddRow ( in DoubleSeq  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()

◆ CheckLocked()

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.

◆ Destroy()

void SALOME::GenericObj::Destroy ( )
inherited

Obsolete, left for compatibility reasons only.

Use UnRegister() instead.

◆ GetClassType()

string SALOMEDS::GenericAttribute::GetClassType ( )
inherited

Get the class type.

◆ GetColumn()

DoubleSeq SALOMEDS::AttributeTableOfReal::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.0 value is returned.
Parameters
columncolumn index
Returns
sequence of values which are set as elements of the column.
See also
SetColumn(), AddColumn()

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

◆ GetColumnTitles()

StringSeq SALOMEDS::AttributeTable::GetColumnTitles ( )
inherited

Returns the titles of all columns of the table.

Returns
list of all columns titles
See also
SetColumnTitles()

◆ GetLocalImpl()

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

◆ GetNbColumns()

long SALOMEDS::AttributeTable::GetNbColumns ( )
inherited

Returns the number of columns of the table.

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

◆ GetNbRows()

long SALOMEDS::AttributeTable::GetNbRows ( )
inherited

Returns the number of rows of the table.

Returns
rows count
See also
GetNbColumns()

◆ GetRow()

DoubleSeq SALOMEDS::AttributeTableOfReal::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.0 value is returned.
Parameters
rowrow index
Returns
sequence of values which are set as elements of the row.
See also
SetRow(), AddRow()

◆ GetRowSetIndices()

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

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

◆ GetRowTitles()

StringSeq SALOMEDS::AttributeTable::GetRowTitles ( )
inherited

Returns the titles of all rows of the table.

Returns
list of all rows titles
See also
SetRowTitles()

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

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

◆ GetSObject()

SObject SALOMEDS::GenericAttribute::GetSObject ( )
inherited

Get SObject.

◆ GetTitle()

string SALOMEDS::AttributeTable::GetTitle ( )
inherited

Returns the title of the table.

Returns
table title (empty string if not set)
See also
SetTitle()

◆ GetValue()

double SALOMEDS::AttributeTableOfReal::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()

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

◆ PutValue()

void SALOMEDS::AttributeTableOfReal::PutValue ( in double  value,
in long  row,
in long  volumn 
)
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()

◆ ReadFromFile()

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

◆ Register()

void SALOME::GenericObj::Register ( )
inherited

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

◆ RemoveValue()

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

◆ SaveToFile()

SALOMEDS::TMPFile SALOMEDS::AttributeTable::SaveToFile ( )
inherited

Saves a table into a byte stream.

Returns
byte stream with table representation
See also
ReadFromFile()

◆ SetColumn()

void SALOMEDS::AttributeTableOfReal::SetColumn ( in long  column,
in DoubleSeq  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()

◆ SetColumnTitle()

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

◆ SetColumnTitles()

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

◆ SetNbColumns()

void SALOMEDS::AttributeTable::SetNbColumns ( in long  columns)
inherited

Sets the maximum number of columns 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()

◆ SetRow()

void SALOMEDS::AttributeTableOfReal::SetRow ( in long  row,
in DoubleSeq  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()

◆ SetRowTitle()

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

◆ SetRowTitles()

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

◆ SetRowUnit()

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

◆ SetRowUnits()

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

◆ SetTitle()

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

◆ SortByColumn()

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

◆ SortByRow()

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

◆ SortColumn()

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

◆ SortRow()

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

◆ SwapCells()

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

◆ SwapColumns()

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

◆ SwapRows()

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

◆ Type()

string SALOMEDS::GenericAttribute::Type ( )
inherited

Get Type.

◆ UnRegister()

void SALOME::GenericObj::UnRegister ( )
inherited

Decrease the reference count (release by another object).

Referenced by SALOME_PyNode.Generic::Destroy().