// Module : SALOME
// $Header$
-#include "SALOMEDS_AttributeTableOfInteger_i.hxx"
-#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfInteger.hxx>
+#include <TCollection_AsciiString.hxx>
#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
+
+#include "SALOMEDS_AttributeTableOfInteger_i.hxx"
+#include "SALOMEDS.hxx"
#include "Utils_ExceptHandlers.hxx"
#include <stdexcept>
#include <strstream>
#include <string>
+
using namespace std;
#define SEPARATOR '\1'
return aString;
}
-
-
void SALOMEDS_AttributeTableOfInteger_i::SetTitle(const char* theTitle) {
+ SALOMEDS::Locker lock;
+
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
CORBA::String_var aStr = CORBA::string_dup(theTitle);
}
char* SALOMEDS_AttributeTableOfInteger_i::GetTitle() {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(aTable->GetTitle()).ToCString());
return c_s._retn();
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch (ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowTitles() {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitles() {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
- Unexpect aCatch (ATI_IncorrectIndex);
+ SALOMEDS::Locker lock;
+
+ Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch (ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowUnits() {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetNbRows() {
+ SALOMEDS::Locker lock;
+
return Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr)->GetNbRows();
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetNbColumns() {
+ SALOMEDS::Locker lock;
+
return Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr)->GetNbColumns();
}
void SALOMEDS_AttributeTableOfInteger_i::AddRow(const SALOMEDS::LongSeq& theData)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
void SALOMEDS_AttributeTableOfInteger_i::SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectIndex);
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
void SALOMEDS_AttributeTableOfInteger_i::AddColumn(const SALOMEDS::LongSeq& theData)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
void SALOMEDS_AttributeTableOfInteger_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long theColumn)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectIndex);
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
void SALOMEDS_AttributeTableOfInteger_i::PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectIndex);
CheckLocked();
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
}
CORBA::Boolean SALOMEDS_AttributeTableOfInteger_i::HasValue(CORBA::Long theRow, CORBA::Long theColumn) {
+ SALOMEDS::Locker lock;
+
return Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr)->HasValue(theRow, theColumn);
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
throw (SALOMEDS::AttributeTableOfInteger::IncorrectIndex)
{
+ SALOMEDS::Locker lock;
+
Unexpect aCatch(ATI_IncorrectIndex);
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowSetIndices(CORBA::Long theRow)
{
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
void SALOMEDS_AttributeTableOfInteger_i::SetNbColumns(CORBA::Long theNbColumns)
{
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
aTable->SetNbColumns(theNbColumns);
}
bool SALOMEDS_AttributeTableOfInteger_i::ReadFromFile(const SALOMEDS::TMPFile& theStream)
{
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
istrstream aStream((char*)&theStream[0], theStream.length());
SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile()
{
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
ostrstream ostr;
}
char* SALOMEDS_AttributeTableOfInteger_i::Store() {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
ostrstream ostr;
}
void SALOMEDS_AttributeTableOfInteger_i::Restore(const char* value) {
+ SALOMEDS::Locker lock;
+
Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(_myAttr);
istrstream aStream(value, strlen(value));