EXPORT_HEADERS= \
SALOMEDS_StudyManager_i.hxx \
- SALOMEDS_Driver_i.hxx
+ SALOMEDS_Driver_i.hxx \
+ SALOMEDS_StudyManager.hxx \
+ SALOMEDS_Study.hxx \
+ SALOMEDS_SObject.hxx \
+ SALOMEDS_SComponent.hxx \
+ SALOMEDS_GenericAttribute.hxx
# Libraries targets
SALOMEDS_AttributeTableOfReal_i.cxx \
SALOMEDS_AttributeTableOfString_i.cxx \
SALOMEDS_AttributeStudyProperties_i.cxx \
- SALOMEDS_AttributePythonObject_i.cxx
+ SALOMEDS_AttributePythonObject_i.cxx \
+ SALOMEDS_SObject.cxx \
+ SALOMEDS_SComponent.cxx \
+ SALOMEDS_GenericAttribute.cxx \
+ SALOMEDS_ChildIterator.cxx \
+ SALOMEDS_SComponentIterator.cxx \
+ SALOMEDS_UseCaseIterator.cxx \
+ SALOMEDS_UseCaseBuilder.cxx \
+ SALOMEDS_StudyBuilder.cxx \
+ SALOMEDS_Study.cxx \
+ SALOMEDS_StudyManager.cxx \
+ SALOMEDS_AttributeStudyProperties.cxx \
+ SALOMEDS_AttributeComment.cxx \
+ SALOMEDS_AttributeDrawable.cxx \
+ SALOMEDS_AttributeExpandable.cxx \
+ SALOMEDS_AttributeExternalFileDef.cxx \
+ SALOMEDS_AttributeFileType.cxx \
+ SALOMEDS_AttributeFlags.cxx \
+ SALOMEDS_AttributeGraphic.cxx \
+ SALOMEDS_AttributeIOR.cxx \
+ SALOMEDS_AttributeInteger.cxx \
+ SALOMEDS_AttributeLocalID.cxx \
+ SALOMEDS_AttributeName.cxx \
+ SALOMEDS_AttributeOpened.cxx \
+ SALOMEDS_AttributePythonObject.cxx \
+ SALOMEDS_AttributeReal.cxx \
+ SALOMEDS_AttributeSelectable.cxx \
+ SALOMEDS_AttributeSequenceOfInteger.cxx \
+ SALOMEDS_AttributePersistentRef.cxx \
+ SALOMEDS_AttributePixMap.cxx \
+ SALOMEDS_AttributeSequenceOfReal.cxx \
+ SALOMEDS_AttributeTableOfInteger.cxx \
+ SALOMEDS_AttributeTableOfReal.cxx \
+ SALOMEDS_AttributeTableOfString.cxx \
+ SALOMEDS_AttributeTarget.cxx \
+ SALOMEDS_AttributeTextColor.cxx \
+ SALOMEDS_AttributeTextHighlightColor.cxx \
+ SALOMEDS_AttributeTreeNode.cxx \
+ SALOMEDS_AttributeUserID.cxx
+
# Executables targets
BIN = SALOMEDS_Server SALOMEDS_Client
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->Value()).ToCString());
return c_s._retn();
}
CheckLocked();
TCollection_AsciiString aStr((char*)value);
- Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->Set(TCollection_ExtendedString(aStr));
+ Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->SetValue(TCollection_ExtendedString(aStr));
}
CORBA::Boolean SALOMEDS_AttributeDrawable_i::IsDrawable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->Get() == 1);
+ return (Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->IsDrawable() == 1);
}
void SALOMEDS_AttributeDrawable_i::SetDrawable(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->Set(value);
+ Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->SetDrawable(value);
}
CORBA::Boolean SALOMEDS_AttributeExpandable_i::IsExpandable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->Get() == 1);
+ return (Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->IsExpandable() == 1);
}
void SALOMEDS_AttributeExpandable_i::SetExpandable(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->Set(value);
+ Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->SetExpandable(value);
}
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->Value()).ToCString());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->Set(TCollection_ExtendedString(Str));
+ Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
}
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->Value()).ToCString());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->Set(TCollection_ExtendedString(Str));
+ Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
}
CORBA::Long SALOMEDS_AttributeInteger_i::Value()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->Get();
+ return Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->Value();
}
void SALOMEDS_AttributeInteger_i::SetValue(CORBA::Long value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->Set(value);
+ Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->SetValue(value);
}
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->Value()).ToCString());
return c_s._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->Set(TCollection_ExtendedString((char*)value));
+ Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->SetValue(TCollection_ExtendedString((char*)value));
}
CORBA::Boolean SALOMEDS_AttributeOpened_i::IsOpened()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->Get() == 1);
+ return (Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->IsOpened() == 1);
}
void SALOMEDS_AttributeOpened_i::SetOpened(CORBA::Boolean value)
Standard_Integer val = 0;
if (value != 0) val = 1;
- Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->Set(val);
+ Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->SetOpened(val);
}
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->Value()).ToCString());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->Set(TCollection_ExtendedString(Str));
+ Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
}
CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap()
{
- TCollection_ExtendedString S = Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->Get();
- if (strcmp(TCollection_AsciiString(S).ToCString(), "None") == 0) return Standard_False;
- return Standard_True;
+ return Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->HasPixMap();
}
char* SALOMEDS_AttributePixMap_i::GetPixMap()
{
SALOMEDS::Locker lock;
CORBA::String_var S =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->Get()).ToCString());
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->GetPixMap()).ToCString());
return S._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->Set(TCollection_ExtendedString(Str));
+ Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->SetPixMap(TCollection_ExtendedString(Str));
}
CORBA::Double SALOMEDS_AttributeReal_i::Value()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->Get();
+ return Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->Value();
}
void SALOMEDS_AttributeReal_i::SetValue(CORBA::Double value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->Set(value);
+ Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->SetValue(value);
}
CORBA::Boolean SALOMEDS_AttributeSelectable_i::IsSelectable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->Get() == 1);
+ return (Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->IsSelectable() == 1);
}
void SALOMEDS_AttributeSelectable_i::SetSelectable(CORBA::Boolean value)
SALOMEDS::Locker lock;
Standard_Integer val = 0;
if (value != 0) val = 1;
- Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->Set(val);
+ Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->SetSelectable(val);
}
#include <strstream>
#include <string>
-#define SEPARATOR '\1'
-
UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTableOfInteger::IncorrectIndex);
UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength);
-static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
- return aString.Split(aPos);
-}
-
-static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 1) return TCollection_ExtendedString();
- aString.Split(aPos-1);
- return aString;
-}
-
-
-
void SALOMEDS_AttributeTableOfInteger_i::SetTitle(const char* theTitle)
{
SALOMEDS::Locker lock;
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theTitle);
- TCollection_ExtendedString aTitle(aStr);
- TCollection_ExtendedString aUnit = getUnit(aTable->GetRowTitle(theIndex));
- if(aUnit.Length() > 0) {
- aTitle += SEPARATOR;
- aTitle += aUnit;
- }
-
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(getTitle(aTable->GetRowTitle(i + 1))).ToCString());
+ aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
return aTitles._retn();
}
Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- SetColumnTitle(i + 1, theTitles[i]);
+ aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
}
}
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theUnit);
- TCollection_ExtendedString aTitle = getTitle(aTable->GetRowTitle(theIndex));
- TCollection_ExtendedString aUnit(aStr);
- aTitle += SEPARATOR;
- aTitle += aUnit;
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
- SetRowUnit(i + 1, theUnits[i]);
+ aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
}
}
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(getUnit(aTable->GetRowTitle(i + 1))).ToCString());
+ aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowUnit(i + 1)).ToCString());
return aUnits._retn();
}
UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTableOfReal::IncorrectIndex);
UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength);
-#define SEPARATOR '\1'
-
-static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
- return aString.Split(aPos);
-}
-
-static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 1) return TCollection_ExtendedString();
- aString.Split(aPos-1);
- return aString;
-}
-
-
-
void SALOMEDS_AttributeTableOfReal_i::SetTitle(const char* theTitle)
{
SALOMEDS::Locker lock;
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theTitle);
- TCollection_ExtendedString aTitle(aStr);
- TCollection_ExtendedString aUnit = getUnit(aTable->GetRowTitle(theIndex));
- if(aUnit.Length() > 0) {
- aTitle += SEPARATOR;
- aTitle += aUnit;
- }
-
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
}
void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- SetRowTitle(i + 1, theTitles[i]);
+ aTable->SetRowTitle(i + 1, (char*)theTitles[i].in());
}
}
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(getTitle(aTable->GetRowTitle(i + 1))).ToCString());
+ aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
return aTitles._retn();
}
Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- SetColumnTitle(i + 1, theTitles[i]);
+ aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
}
}
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theUnit);
- TCollection_ExtendedString aTitle = getTitle(aTable->GetRowTitle(theIndex));
- TCollection_ExtendedString aUnit(aStr);
- aTitle += SEPARATOR;
- aTitle += aUnit;
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
}
void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
- SetRowUnit(i + 1, theUnits[i]);
+ aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
}
}
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(getUnit(aTable->GetRowTitle(i + 1))).ToCString());
+ aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
return aUnits._retn();
}
UNEXPECT_CATCH(ATS_IncorrectIndex, SALOMEDS::AttributeTableOfString::IncorrectIndex);
UNEXPECT_CATCH(ATS_IncorrectArgumentLength, SALOMEDS::AttributeTableOfString::IncorrectArgumentLength);
-#define SEPARATOR '\1'
-
-static TCollection_ExtendedString getUnit(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos <= 0 || aPos == aString.Length() ) return TCollection_ExtendedString();
- return aString.Split(aPos);
-}
-
-static TCollection_ExtendedString getTitle(TCollection_ExtendedString theString)
-{
- TCollection_ExtendedString aString(theString);
- int aPos = aString.Search(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 1) return TCollection_ExtendedString();
- aString.Split(aPos-1);
- return aString;
-}
-
-
-
void SALOMEDS_AttributeTableOfString_i::SetTitle(const char* theTitle)
{
SALOMEDS::Locker lock;
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theTitle);
- TCollection_ExtendedString aTitle(aStr);
- TCollection_ExtendedString aUnit = getUnit(aTable->GetRowTitle(theIndex));
- if(aUnit.Length() > 0) {
- aTitle += SEPARATOR;
- aTitle += aUnit;
- }
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
}
void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- SetRowTitle(i + 1, CORBA::string_dup(theTitles[i]));
+ aTable->SetRowTitle(i + 1, TCollection_ExtendedString((char*)theTitles[i].in()));
}
}
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(getTitle(aTable->GetRowTitle(i + 1))).ToCString());
+ aTitles[i] =CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
return aTitles._retn();
}
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theTitle);
- aTable->SetColumnTitle(theIndex, TCollection_ExtendedString(aStr));
+ aTable->SetColumnTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
}
void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- SetColumnTitle(i + 1, CORBA::string_dup(theTitles[i]));
+ aTable->SetColumnTitle(i + 1, TCollection_ExtendedString((char*)theTitles[i].in()));
}
}
CheckLocked();
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- CORBA::String_var aStr = CORBA::string_dup(theUnit);
- TCollection_ExtendedString aTitle = getTitle(aTable->GetRowTitle(theIndex));
- TCollection_ExtendedString aUnit(aStr);
- aTitle += SEPARATOR;
- aTitle += aUnit;
- aTable->SetRowTitle(theIndex, aTitle);
+ aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
}
void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
- SetRowUnit(i + 1, CORBA::string_dup(theUnits[i]));
+ aTable->SetRowUnit(i + 1, TCollection_ExtendedString((char*)theUnits[i].in()));
}
}
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(getUnit(aTable->GetRowTitle(i + 1))).ToCString());
+ aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
return aUnits._retn();
}
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDS.hxx"
-#include <TDF_LabelList.hxx>
-#include <TDF_ListIteratorOfLabelList.hxx>
+#include <TColStd_HSequenceOfTransient.hxx>
void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject)
{
SALOMEDS::Locker lock;
TDF_Label aLabel;
TDF_Tool::Label(_impl->Label().Data(),anObject->GetID(),aLabel,1);
- (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Append(aLabel);
+ (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Add(SALOMEDSImpl_Study::SObject(aLabel));
}
SALOMEDS::Study::ListOfSObject* SALOMEDS_AttributeTarget_i::Get()
{
SALOMEDS::Locker lock;
- TDF_LabelList aLList;
+ Handle(TColStd_HSequenceOfTransient) aSeq = (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Get();
SALOMEDS::Study::ListOfSObject_var aSList = new SALOMEDS::Study::ListOfSObject;
- (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Get(aLList);
- if (aLList.Extent() == 0)
- return aSList._retn();
- aSList->length(aLList.Extent());
- TDF_ListIteratorOfLabelList anIter(aLList);
- int index;
- for(index=0;anIter.More();anIter.Next(),index++) {
- SALOMEDS::SObject_var anSO = SALOMEDS_SObject_i::New(SALOMEDSImpl_Study::GetStudy(anIter.Value())->GetSObject(anIter.Value()), _orb);
- aSList[index] = anSO;
+ int aLength = aSeq->Length(), i;
+ if (aLength == 0) return aSList._retn();
+ aSList->length(aLength);
+ for(i=1; i <=aLength; i++) {
+ SALOMEDS::SObject_var anSO = SALOMEDS_SObject_i::New(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)), _orb);
+ aSList[i-1] = anSO;
}
return aSList._retn();
}
SALOMEDS::Locker lock;
TDF_Label aLabel;
TDF_Tool::Label(_impl->Label().Data(),anObject->GetID(),aLabel,1);
- (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Remove(aLabel);
+ (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Remove(SALOMEDSImpl_Study::SObject(aLabel));
}
{
SALOMEDS::Locker lock;
SALOMEDS::Color TextColor;
- Handle(TColStd_HArray1OfReal) anArray = Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_impl)->GetTextColor();
+ Handle(TColStd_HArray1OfReal) anArray = Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_impl)->TextColor();
if (anArray.IsNull() || anArray->Length()!=3) {
TextColor.R = 0;
TextColor.G = 0;
{
SALOMEDS::Locker lock;
SALOMEDS::Color TextHighlightColor;
- Handle(TColStd_HArray1OfReal) anArray=Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_impl)->GetTextColor();
+ Handle(TColStd_HArray1OfReal) anArray=Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_impl)->TextHighlightColor();
if (anArray.IsNull() || anArray->Length()!=3) {
TextHighlightColor.R = 0;
TextHighlightColor.G = 0;
#include <TCollection_AsciiString.hxx>
#include <map>
+#ifdef WNT
+#include <process.h>
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include "OpUtil.hxx"
+
UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection);
SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(const Handle(TDF_Attribute)& theImpl, CORBA::ORB_ptr theOrb)
{
SALOMEDS::Locker lock;
if (_impl.IsNull() || _impl->Label().IsNull()) return SALOMEDS::SObject::_nil();
- Handle(SALOMEDSImpl_SObject) so_impl = SALOMEDSImpl_Study::GetStudy(_impl->Label())->GetSObject(_impl->Label());
+ Handle(SALOMEDSImpl_SObject) so_impl = SALOMEDSImpl_Study::SObject(_impl->Label());
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (so_impl, _orb);
return so._retn();
}
return "";
}
+char* SALOMEDS_GenericAttribute_i::GetClassType()
+{
+ SALOMEDS::Locker lock;
+ if (!_impl.IsNull()) {
+ return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl));
+ }
+
+ return "";
+}
+
SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute(const Handle(TDF_Attribute)& theAttr,
CORBA::ORB_ptr theOrb)
return anAttribute._retn();
}
+
+//===========================================================================
+// PRIVATE FUNCTIONS
+//===========================================================================
+long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+{
+#ifdef WNT
+ long pid = (long)_getpid();
+#else
+ long pid = (long)getpid();
+#endif
+ isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
+ TDF_Attribute* local_impl = _impl.operator->();
+ return ((long)local_impl);
+}
void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection);
- char* Type();
+ virtual char* Type();
+
+ char* GetClassType();
SALOMEDS::SObject_ptr GetSObject();
virtual Handle(TDF_Attribute) GetImpl() { return _impl; }
static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb);
+
+ virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
#include <TColStd_HSequenceOfTransient.hxx>
#include <map>
+#ifdef WNT
+#include <process.h>
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include "OpUtil.hxx"
+
SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const Handle(SALOMEDSImpl_SObject)& theImpl, CORBA::ORB_ptr theORB)
{
static std::map<SALOMEDSImpl_SObject*, SALOMEDS_SObject_i*> _mapOfSO;
CORBA::String_var aStr = CORBA::string_dup(_impl->GetIOR().ToCString());
return aStr._retn();
}
+
+//===========================================================================
+// PRIVATE FUNCTIONS
+//===========================================================================
+long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+{
+#ifdef WNT
+ long pid = (long)_getpid();
+#else
+ long pid = (long)getpid();
+#endif
+ isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
+ SALOMEDSImpl_SObject* local_impl = _impl.operator->();
+ return ((long)local_impl);
+}
virtual CORBA::Short Tag();
virtual CORBA::Short Depth();
+
+ virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
#include <strstream>
using namespace std;
+#ifdef WNT
+#include <process.h>
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include "OpUtil.hxx"
+
#include "SALOME_GenericObj_i.hh"
#include "Utils_ExceptHandlers.hxx"
return driver;
}
+//===========================================================================
+// PRIVATE FUNCTIONS
+//===========================================================================
+long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+{
+#ifdef WNT
+ long pid = (long)_getpid();
+#else
+ long pid = (long)getpid();
+#endif
+ isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
+ SALOMEDSImpl_StudyManager* aManager = _impl.operator->();
+ return ((long)aManager);
+}
//===========================================================================
namespace SALOMEDS
virtual CORBA::Object_ptr ConvertIORToObject(const char* theIOR) { return _orb->string_to_object(theIOR); };
void ping(){};
+
+ virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
#include <TDF_Label.hxx>
#include <TDF_Attribute.hxx>
+#ifdef WNT
+#include <process.h>
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include "OpUtil.hxx"
//============================================================================
/*! Function : SALOMEDS_Study_i
delete factory;
return ret;
}
+
+//===========================================================================
+// PRIVATE FUNCTIONS
+//===========================================================================
+long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+{
+#ifdef WNT
+ long pid = (long)_getpid();
+#else
+ long pid = (long)getpid();
+#endif
+ isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
+ SALOMEDSImpl_Study* local_impl = _impl.operator->();
+ return ((long)local_impl);
+}
virtual CORBA::Boolean DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished);
virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; }
+
+ virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif