#include "SALOMEDS_AttributeComment.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributeComment::SALOMEDS_AttributeComment(const Handle(SALOMEDSImpl_AttributeComment)& theAttr)
SALOMEDS_AttributeComment::~SALOMEDS_AttributeComment()
{}
-char* SALOMEDS_AttributeComment::Value()
+std::string SALOMEDS_AttributeComment::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeComment)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeComment)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributeComment::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeComment::SetValue(const char* value)
+void SALOMEDS_AttributeComment::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeComment)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributeComment::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeComment)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributeComment::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeComment(SALOMEDS::AttributeComment_ptr theAttr);
~SALOMEDS_AttributeComment();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributeExternalFileDef.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributeExternalFileDef::SALOMEDS_AttributeExternalFileDef(const Handle(SALOMEDSImpl_AttributeExternalFileDef)& theAttr)
SALOMEDS_AttributeExternalFileDef::~SALOMEDS_AttributeExternalFileDef()
{}
-char* SALOMEDS_AttributeExternalFileDef::Value()
+std::string SALOMEDS_AttributeExternalFileDef::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeExternalFileDef::SetValue(const char* value)
+void SALOMEDS_AttributeExternalFileDef::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeExternalFileDef(SALOMEDS::AttributeExternalFileDef_ptr theAttr);
~SALOMEDS_AttributeExternalFileDef();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributeFileType.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributeFileType::SALOMEDS_AttributeFileType(const Handle(SALOMEDSImpl_AttributeFileType)& theAttr)
SALOMEDS_AttributeFileType::~SALOMEDS_AttributeFileType()
{}
-char* SALOMEDS_AttributeFileType::Value()
+std::string SALOMEDS_AttributeFileType::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributeFileType::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeFileType::SetValue(const char* value)
+void SALOMEDS_AttributeFileType::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributeFileType::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributeFileType::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeFileType(SALOMEDS::AttributeFileType_ptr theAttr);
~SALOMEDS_AttributeFileType();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributeIOR.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributeIOR::SALOMEDS_AttributeIOR(const Handle(SALOMEDSImpl_AttributeIOR)& theAttr)
SALOMEDS_AttributeIOR::~SALOMEDS_AttributeIOR()
{}
-char* SALOMEDS_AttributeIOR::Value()
+std::string SALOMEDS_AttributeIOR::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributeIOR::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeIOR::SetValue(const char* value)
+void SALOMEDS_AttributeIOR::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributeIOR::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributeIOR::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeIOR(SALOMEDS::AttributeIOR_ptr theAttr);
~SALOMEDS_AttributeIOR();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributeName.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributeName::SALOMEDS_AttributeName(const Handle(SALOMEDSImpl_AttributeName)& theAttr)
SALOMEDS_AttributeName::~SALOMEDS_AttributeName()
{}
-char* SALOMEDS_AttributeName::Value()
+std::string SALOMEDS_AttributeName::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributeName::_narrow(_corba_impl)->Value();
-
- cout << "########################## Attribute Name = " << aValue << endl;
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeName::SetValue(const char* value)
+void SALOMEDS_AttributeName::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributeName::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributeName::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeName(SALOMEDS::AttributeName_ptr theAttr);
~SALOMEDS_AttributeName();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributePersistentRef.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributePersistentRef::SALOMEDS_AttributePersistentRef(const Handle(SALOMEDSImpl_AttributePersistentRef)& theAttr)
SALOMEDS_AttributePersistentRef::~SALOMEDS_AttributePersistentRef()
{}
-char* SALOMEDS_AttributePersistentRef::Value()
+std::string SALOMEDS_AttributePersistentRef::Value()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_local_impl)->Value();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_local_impl)->Value()).ToCString();
else aValue = SALOMEDS::AttributePersistentRef::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributePersistentRef::SetValue(const char* value)
+void SALOMEDS_AttributePersistentRef::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_local_impl)->SetValue(aValue);
- else SALOMEDS::AttributePersistentRef::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ else SALOMEDS::AttributePersistentRef::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributePersistentRef(SALOMEDS::AttributePersistentRef_ptr theAttr);
~SALOMEDS_AttributePersistentRef();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributePixMap.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributePixMap::SALOMEDS_AttributePixMap(const Handle(SALOMEDSImpl_AttributePixMap)& theAttr)
else ret = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->HasPixMap();
}
-char* SALOMEDS_AttributePixMap::GetPixMap()
+std::string SALOMEDS_AttributePixMap::GetPixMap()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->GetPixMap();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->GetPixMap()).ToCString();
else aValue = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->GetPixMap();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributePixMap::SetPixMap(const char* value)
+void SALOMEDS_AttributePixMap::SetPixMap(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->SetPixMap(aValue);
- else SALOMEDS::AttributePixMap::_narrow(_corba_impl)->SetPixMap(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->SetPixMap((char*)value.c_str());
+ else SALOMEDS::AttributePixMap::_narrow(_corba_impl)->SetPixMap(value.c_str());
}
~SALOMEDS_AttributePixMap();
virtual bool HasPixMap();
- virtual char* GetPixMap();
- virtual void SetPixMap(const char* value);
+ virtual std::string GetPixMap();
+ virtual void SetPixMap(const std::string& value);
};
#include "SALOMEDS_AttributePythonObject.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
SALOMEDS_AttributePythonObject::SALOMEDS_AttributePythonObject(const Handle(SALOMEDSImpl_AttributePythonObject)& theAttr)
return ret;
}
-char* SALOMEDS_AttributePythonObject::GetObject()
+std::string SALOMEDS_AttributePythonObject::GetObject()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->GetObject();
+ std::string aValue;
+ if(_isLocal)
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->GetObject()).ToCString();
else aValue = SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->GetObject();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributePythonObject::SetObject(const char* theSequence, bool IsScript)
+void SALOMEDS_AttributePythonObject::SetObject(const std::string& theSequence, bool IsScript)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)theSequence);
- if(_isLocal) Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->SetObject(aValue, IsScript);
- else SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->SetObject(aValue.ToCString(), IsScript);
+ if(_isLocal) Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->SetObject((char*)theSequence.c_str(), IsScript);
+ else SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->SetObject(theSequence.c_str(), IsScript);
}
SALOMEDS_AttributePythonObject(SALOMEDS::AttributePythonObject_ptr theAttr);
~SALOMEDS_AttributePythonObject();
- virtual void SetObject(const char* theSequence, bool IsScript);
- virtual char* GetObject();
+ virtual void SetObject(const std::string& theSequence, bool IsScript);
+ virtual std::string GetObject();
virtual bool IsScript();
};
#include "SALOMEDS_AttributeStudyProperties.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_HSequenceOfExtendedString.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
{
}
-void SALOMEDS_AttributeStudyProperties::SetUserName(const char* theName)
+void SALOMEDS_AttributeStudyProperties::SetUserName(const std::string& theName)
{
- TCollection_AsciiString aName((char*)theName);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetUserName(aName);
- else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetUserName(aName.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetUserName((char*)theName.c_str());
+ else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetUserName(theName.c_str());
}
-char* SALOMEDS_AttributeStudyProperties::GetUserName()
+std::string SALOMEDS_AttributeStudyProperties::GetUserName()
{
- TCollection_AsciiString aName;
- if(_isLocal) aName = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetCreatorName();
+ std::string aName;
+ if(_isLocal) {
+ TCollection_AsciiString N = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetCreatorName();
+ aName = N.ToCString();
+ }
else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserName();
- return aName.ToCString();
+ return aName;
}
void SALOMEDS_AttributeStudyProperties::SetCreationDate(int theMinute, int theHour, int theDay, int theMonth, int theYear)
return ret;
}
-void SALOMEDS_AttributeStudyProperties::SetCreationMode(const char* theMode)
+void SALOMEDS_AttributeStudyProperties::SetCreationMode(const std::string& theMode)
{
- TCollection_AsciiString aMode((char*)theMode);
if(_isLocal) {
- if(aMode == "from scratch")
+ if(theMode == "from scratch")
Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(1);
- else if(aMode == "copy from")
+ else if(theMode == "copy from")
Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(2);
else //Not defined
Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(0);
}
- else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationMode(aMode.ToCString());
+ else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationMode(theMode.c_str());
}
-char* SALOMEDS_AttributeStudyProperties::GetCreationMode()
+std::string SALOMEDS_AttributeStudyProperties::GetCreationMode()
{
- TCollection_AsciiString aMode;
+ std::string aMode;
if(_isLocal) {
int mode = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetCreationMode();
if(mode == 1) aMode = "from scratch";
if(mode == 2) aMode = "copy from";
}
else aMode = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetCreationMode();
- return aMode.ToCString();
+ return aMode;
}
void SALOMEDS_AttributeStudyProperties::SetModified(int theModified)
return ret;
}
-void SALOMEDS_AttributeStudyProperties::SetModification(const char* theName,
+void SALOMEDS_AttributeStudyProperties::SetModification(const std::string& theName,
int theMinute,
int theHour,
int theDay,
int theMonth,
int theYear)
{
- TCollection_AsciiString aName((char*)theName);
if(_isLocal) {
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetUserName(aName);
+ Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetUserName((char*)theName.c_str());
Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetModificationDate(theMinute,
theHour,
theDay,
theMonth,
theYear);
}
- else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModification(aName.ToCString(),
+ else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModification(theName.c_str(),
theMinute,
theHour,
theDay,
SALOMEDS_AttributeStudyProperties(SALOMEDS::AttributeStudyProperties_ptr theAttr);
~SALOMEDS_AttributeStudyProperties();
- virtual void SetUserName(const char* theName);
- virtual char* GetUserName();
+ virtual void SetUserName(const std::string& theName);
+ virtual std::string GetUserName();
virtual void SetCreationDate(int theMinute, int theHour, int theDay, int theMonth, int theYear);
virtual bool GetCreationDate(int& theMinute, int& theHour, int& theDay, int& theMonth, int& theYear);
- virtual void SetCreationMode(const char* theMode);
- virtual char* GetCreationMode();
+ virtual void SetCreationMode(const std::string& theMode);
+ virtual std::string GetCreationMode();
virtual void SetModified(int theModified);
virtual bool IsModified();
virtual int GetModified();
virtual void SetLocked(bool theLocked);
virtual bool IsLocked();
- virtual void SetModification(const char* theName,
+ virtual void SetModification(const std::string& theName,
int theMinute,
int theHour,
int theDay,
{}
-void SALOMEDS_AttributeTableOfInteger::SetTitle(const char* theTitle)
+void SALOMEDS_AttributeTableOfInteger::SetTitle(const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetTitle(aStr);
- else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetTitle(aStr.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
-char* SALOMEDS_AttributeTableOfInteger::GetTitle()
+std::string SALOMEDS_AttributeTableOfInteger::GetTitle()
{
- TCollection_AsciiString aStr;
- if(_isLocal) aStr = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetTitle();
+ std::string aStr;
+ if(_isLocal)
+ aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetTitle()).ToCString();
else aStr = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetTitle();
- return aStr.ToCString();
+ return aStr;
}
-void SALOMEDS_AttributeTableOfInteger::SetRowTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfInteger::SetRowTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aTitle((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowTitle(theIndex, aTitle);
- else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowTitle(theIndex, aTitle.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfInteger::SetRowTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = theTitles[i].c_str();
SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowTitles(aSeq);
}
Handle(TColStd_HSequenceOfExtendedString) aSeq;
aSeq = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetRowTitles();
aLength = aSeq->Length();
- for(i = 1; i<= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ for(i = 1; i<= aLength; i++) aVector.push_back(TCollection_AsciiString((aSeq->Value(i))).ToCString());
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfInteger::SetColumnTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfInteger::SetColumnTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetColumnTitle(theIndex, aStr);
- else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetColumnTitle(theIndex, aStr.ToCString());
+ if(_isLocal)
+ Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetColumnTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfInteger::SetColumnTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = theTitles[i].c_str();
SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetColumnTitles(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetColumnTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfInteger::SetRowUnit(int theIndex, const char* theUnit)
+void SALOMEDS_AttributeTableOfInteger::SetRowUnit(int theIndex, const std::string& theUnit)
{
CheckLocked();
- TCollection_AsciiString aUnit((char*)theUnit);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowUnit(theIndex, aUnit);
- else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowUnit(theIndex, aUnit.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowUnit(theIndex,
+ (char*)theUnit.c_str());
+ else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
void SALOMEDS_AttributeTableOfInteger::SetRowUnits(const std::vector<std::string>& theUnits)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theUnits[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theUnits[i].c_str();
SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowUnits(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowUnits();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
SALOMEDS_AttributeTableOfInteger(SALOMEDS::AttributeTableOfInteger_ptr theAttr);
~SALOMEDS_AttributeTableOfInteger();
- virtual void SetTitle(const char* theTitle);
- virtual char* GetTitle();
- virtual void SetRowTitle(int theIndex, const char* theTitle);
+ virtual void SetTitle(const std::string& theTitle);
+ virtual std::string GetTitle();
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle);
virtual void SetRowTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetRowTitles();
- virtual void SetColumnTitle(int theIndex, const char* theTitle);
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle);
virtual void SetColumnTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetColumnTitles();
- virtual void SetRowUnit(int theIndex, const char* theUnit);
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit);
virtual void SetRowUnits(const std::vector<std::string>& theUnits);
virtual std::vector<std::string> GetRowUnits();
{}
-void SALOMEDS_AttributeTableOfReal::SetTitle(const char* theTitle)
+void SALOMEDS_AttributeTableOfReal::SetTitle(const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetTitle(aStr);
- else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetTitle(aStr.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
-char* SALOMEDS_AttributeTableOfReal::GetTitle()
+std::string SALOMEDS_AttributeTableOfReal::GetTitle()
{
- TCollection_AsciiString aStr;
- if(_isLocal) aStr = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetTitle();
+ std::string aStr;
+ if(_isLocal)
+ aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetTitle()).ToCString();
else aStr = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetTitle();
- return aStr.ToCString();
+ return aStr;
}
-void SALOMEDS_AttributeTableOfReal::SetRowTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfReal::SetRowTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aTitle((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowTitle(theIndex, aTitle);
- else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowTitle(theIndex, aTitle.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfReal::SetRowTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theTitles[i].c_str();
SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowTitles(aSeq);
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfReal::SetColumnTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfReal::SetColumnTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetColumnTitle(theIndex, aStr);
- else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetColumnTitle(theIndex, aStr.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetColumnTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfReal::SetColumnTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theTitles[i].c_str();
SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetColumnTitles(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetColumnTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfReal::SetRowUnit(int theIndex, const char* theUnit)
+void SALOMEDS_AttributeTableOfReal::SetRowUnit(int theIndex, const std::string& theUnit)
{
CheckLocked();
- TCollection_AsciiString aUnit((char*)theUnit);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowUnit(theIndex, aUnit);
- else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowUnit(theIndex, aUnit.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowUnit(theIndex,
+ (char*)theUnit.c_str());
+ else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
void SALOMEDS_AttributeTableOfReal::SetRowUnits(const std::vector<std::string>& theUnits)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theUnits[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theUnits[i].c_str();
SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowUnits(aSeq);
}
}
SALOMEDS_AttributeTableOfReal(SALOMEDS::AttributeTableOfReal_ptr theAttr);
~SALOMEDS_AttributeTableOfReal();
- virtual void SetTitle(const char* theTitle);
- virtual char* GetTitle();
- virtual void SetRowTitle(int theIndex, const char* theTitle);
+ virtual void SetTitle(const std::string& theTitle);
+ virtual std::string GetTitle();
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle);
virtual void SetRowTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetRowTitles();
- virtual void SetColumnTitle(int theIndex, const char* theTitle);
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle);
virtual void SetColumnTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetColumnTitles();
- virtual void SetRowUnit(int theIndex, const char* theUnit);
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit);
virtual void SetRowUnits(const std::vector<std::string>& theUnits);
virtual std::vector<std::string> GetRowUnits();
#include "SALOMEDS_AttributeTableOfString.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
#include <TColStd_HSequenceOfReal.hxx>
{}
-void SALOMEDS_AttributeTableOfString::SetTitle(const char* theTitle)
+void SALOMEDS_AttributeTableOfString::SetTitle(const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetTitle(aStr);
- else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetTitle(aStr.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
-char* SALOMEDS_AttributeTableOfString::GetTitle()
+std::string SALOMEDS_AttributeTableOfString::GetTitle()
{
- TCollection_AsciiString aStr;
- if(_isLocal) aStr = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetTitle();
+ std::string aStr;
+ if(_isLocal)
+ aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetTitle()).ToCString();
else aStr = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetTitle();
- return aStr.ToCString();
+ return aStr;
}
-void SALOMEDS_AttributeTableOfString::SetRowTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfString::SetRowTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aTitle((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowTitle(theIndex, aTitle);
- else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowTitle(theIndex, aTitle.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfString::SetRowTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theTitles[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowTitles(aSeq);
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfString::SetColumnTitle(int theIndex, const char* theTitle)
+void SALOMEDS_AttributeTableOfString::SetColumnTitle(int theIndex, const std::string& theTitle)
{
CheckLocked();
- TCollection_AsciiString aStr((char*)theTitle);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetColumnTitle(theIndex, aStr);
- else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetColumnTitle(theIndex, aStr.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetColumnTitle(theIndex,
+ (char*)theTitle.c_str());
+ else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
void SALOMEDS_AttributeTableOfString::SetColumnTitles(const std::vector<std::string>& theTitles)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theTitles[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theTitles[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetColumnTitles(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetColumnTitles();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-void SALOMEDS_AttributeTableOfString::SetRowUnit(int theIndex, const char* theUnit)
+void SALOMEDS_AttributeTableOfString::SetRowUnit(int theIndex, const std::string& theUnit)
{
CheckLocked();
- TCollection_AsciiString aUnit((char*)theUnit);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowUnit(theIndex, aUnit);
- else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowUnit(theIndex, aUnit.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowUnit(theIndex,
+ (char*)theUnit.c_str());
+ else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
void SALOMEDS_AttributeTableOfString::SetRowUnits(const std::vector<std::string>& theUnits)
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theUnits[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theUnits[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowUnits(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowUnits();
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theData[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theData[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->AddRow(aSeq);
}
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
aSeq->length(aLength);
- for(i = 0; i < aLength; i++) aSeq[i] = TCollection_AsciiString((char*)theData[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aSeq[i] = (char*)theData[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRow(theRow, aSeq);
}
}
}
else {
SALOMEDS::StringSeq_var aRow = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRow(theRow);
- for(i = 0; i < aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aRow[i].in()).ToCString());
+ for(i = 0; i < aLength; i++) aVector.push_back((char*)aRow[i].in());
}
return aVector;
else {
SALOMEDS::StringSeq_var aColumn = new SALOMEDS::StringSeq();
aColumn->length(aLength);
- for(i = 0; i < aLength; i++) aColumn[i] = TCollection_AsciiString((char*)theData[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aColumn[i] = (char*)theData[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->AddColumn(aColumn);
}
}
else {
SALOMEDS::StringSeq_var aColumn = new SALOMEDS::StringSeq();
aColumn->length(aLength);
- for(i = 0; i < aLength; i++) aColumn[i] = TCollection_AsciiString((char*)theData[i].c_str()).ToCString();
+ for(i = 0; i < aLength; i++) aColumn[i] = (char*)theData[i].c_str();
SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRow(theColumn, aColumn);
}
}
return aVector;
}
-void SALOMEDS_AttributeTableOfString::PutValue(const char* theValue, int theRow, int theColumn)
+void SALOMEDS_AttributeTableOfString::PutValue(const std::string& theValue, int theRow, int theColumn)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)theValue);
if(_isLocal) {
try {
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->PutValue(aValue, theRow, theColumn);
+ Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->PutValue((char*)theValue.c_str(),
+ theRow,
+ theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
}
}
else {
- SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->PutValue(aValue.ToCString(), theRow, theColumn);
+ SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->PutValue(theValue.c_str(), theRow, theColumn);
}
}
return ret;
}
-char* SALOMEDS_AttributeTableOfString::GetValue(int theRow, int theColumn)
+std::string SALOMEDS_AttributeTableOfString::GetValue(int theRow, int theColumn)
{
- TCollection_AsciiString aValue;
+ std::string aValue;
if(_isLocal) {
try {
- aValue = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetValue(theRow, theColumn);
+ aValue =
+ TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetValue(theRow,
+ theColumn)).ToCString();
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
else {
aValue = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetValue(theRow, theColumn);
}
- return aValue.ToCString();
+ return aValue;
}
std::vector<int> SALOMEDS_AttributeTableOfString::GetRowSetIndices(int theRow)
SALOMEDS_AttributeTableOfString(SALOMEDS::AttributeTableOfString_ptr theAttr);
~SALOMEDS_AttributeTableOfString();
- virtual void SetTitle(const char* theTitle);
- virtual char* GetTitle();
- virtual void SetRowTitle(int theIndex, const char* theTitle);
+ virtual void SetTitle(const std::string& theTitle);
+ virtual std::string GetTitle();
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle);
virtual void SetRowTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetRowTitles();
- virtual void SetColumnTitle(int theIndex, const char* theTitle);
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle);
virtual void SetColumnTitles(const std::vector<std::string>& theTitles);
virtual std::vector<std::string> GetColumnTitles();
- virtual void SetRowUnit(int theIndex, const char* theUnit);
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit);
virtual void SetRowUnits(const std::vector<std::string>& theUnits);
virtual std::vector<std::string> GetRowUnits();
virtual void AddColumn(const std::vector<std::string>& theData);
virtual void SetColumn(int theColumn, const std::vector<std::string>& theData);
virtual std::vector<std::string> GetColumn(int theColumn);
- virtual void PutValue(const char* theValue, int theRow, int theColumn);
+ virtual void PutValue(const std::string& theValue, int theRow, int theColumn);
virtual bool HasValue(int theRow, int theColumn);
- virtual char* GetValue(int theRow, int theColumn);
+ virtual std::string GetValue(int theRow, int theColumn);
virtual std::vector<int> GetRowSetIndices(int theRow);
virtual void SetNbColumns(int theNbColumns);
#include "SALOMEDS_AttributeTreeNode.hxx"
+#include <string>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_GUID.hxx>
return aTN;
}
-void SALOMEDS_AttributeTreeNode::SetTreeID(const char* value)
+void SALOMEDS_AttributeTreeNode::SetTreeID(const std::string& value)
{
if(_isLocal) {
Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aNode->SetTreeID(Standard_GUID((char*)value));
+ aNode->SetTreeID(Standard_GUID((char*)value.c_str()));
}
else {
SALOMEDS::AttributeTreeNode_var aNode = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl);
- aNode->SetTreeID(value);
+ aNode->SetTreeID(value.c_str());
}
}
-char* SALOMEDS_AttributeTreeNode::GetTreeID()
+std::string SALOMEDS_AttributeTreeNode::GetTreeID()
{
TCollection_AsciiString aGUID;
if(_isLocal) {
aGUID = TCollection_AsciiString(aNode->GetTreeID());
}
- return aGUID.ToCString();
+ return std::string(aGUID.ToCString());
}
void SALOMEDS_AttributeTreeNode::Append(SALOMEDSClient_AttributeTreeNode* value)
return ret;
}
-char* SALOMEDS_AttributeTreeNode::Label()
+std::string SALOMEDS_AttributeTreeNode::Label()
{
TCollection_AsciiString aLabel;
if(_isLocal) TDF_Tool::Entry(_local_impl->Label(), aLabel);
else aLabel = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl)->Label();
- return aLabel.ToCString();
+ return std::string(aLabel.ToCString());
}
virtual void SetFirst(SALOMEDSClient_AttributeTreeNode* value);
virtual bool HasFirst();
virtual SALOMEDSClient_AttributeTreeNode* GetFirst();
- virtual void SetTreeID(const char* value);
- virtual char* GetTreeID();
+ virtual void SetTreeID(const std::string& value);
+ virtual std::string GetTreeID();
virtual void Append(SALOMEDSClient_AttributeTreeNode* value);
virtual void Prepend(SALOMEDSClient_AttributeTreeNode* value);
virtual void InsertBefore(SALOMEDSClient_AttributeTreeNode* value);
virtual bool IsDescendant(SALOMEDSClient_AttributeTreeNode* value);
virtual bool IsFather(SALOMEDSClient_AttributeTreeNode* value);
virtual bool IsChild(SALOMEDSClient_AttributeTreeNode* value);
- virtual char* Label();
+ virtual std::string Label();
};
#endif
#include "SALOMEDS_AttributeUserID.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_GUID.hxx>
SALOMEDS_AttributeUserID::~SALOMEDS_AttributeUserID()
{}
-char* SALOMEDS_AttributeUserID::Value()
+std::string SALOMEDS_AttributeUserID::Value()
{
- TCollection_AsciiString aValue;
+ std::string aValue;
if(_isLocal) {
char guid[40];
Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_local_impl)->Value().ToCString(guid);
- aValue = TCollection_AsciiString(guid);
+ aValue = std::string(guid);
}
else aValue = SALOMEDS::AttributeUserID::_narrow(_corba_impl)->Value();
- return aValue.ToCString();
+ return aValue;
}
-void SALOMEDS_AttributeUserID::SetValue(const char* value)
+void SALOMEDS_AttributeUserID::SetValue(const std::string& value)
{
CheckLocked();
- TCollection_AsciiString aValue((char*)value);
- if(_isLocal) Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_local_impl)->SetValue(Standard_GUID(aValue.ToCString()));
- else SALOMEDS::AttributeUserID::_narrow(_corba_impl)->SetValue(aValue.ToCString());
+ if(_isLocal) Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_local_impl)->SetValue(Standard_GUID((char*)value.c_str()));
+ else SALOMEDS::AttributeUserID::_narrow(_corba_impl)->SetValue(value.c_str());
}
SALOMEDS_AttributeUserID(SALOMEDS::AttributeUserID_ptr theAttr);
~SALOMEDS_AttributeUserID();
- virtual char* Value();
- virtual void SetValue(const char* value);
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
};
#endif
#include "SALOMEDS_AttributeFlags.hxx"
#include "SALOMEDS_AttributeGraphic.hxx"
-#define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
+#define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theGA); \
aGA = new SALOMEDS_##CORBA_Name(A); \
}
-#define __CreateClientAttributeCORBA(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
+#define __CreateClientAttributeCORBA(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
SALOMEDS::CORBA_Name##_var A = SALOMEDS::CORBA_Name::_narrow(theGA); \
aGA = new SALOMEDS_##CORBA_Name(A); \
}
using namespace std;
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDSImpl_SObject.hxx"
}
}
-char* SALOMEDS_GenericAttribute::Type()
+std::string SALOMEDS_GenericAttribute::Type()
{
- TCollection_AsciiString aType;
+ std::string aType;
if(_isLocal) {
- aType = _local_impl->Type();
+ aType = _local_impl->Type().ToCString();
}
else {
aType = _corba_impl->Type();
}
- return aType.ToCString();
+ return aType;
}
-char* SALOMEDS_GenericAttribute::GetClassType()
+std::string SALOMEDS_GenericAttribute::GetClassType()
{
- TCollection_AsciiString aType;
+ std::string aType;
if(_isLocal) {
- aType = _local_impl->GetClassType();
+ aType = _local_impl->GetClassType().ToCString();
}
else {
aType = _corba_impl->GetClassType();
}
- return aType.ToCString();
+ return aType;
}
SALOMEDSClient_SObject* SALOMEDS_GenericAttribute::GetSObject()
SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute(const Handle(SALOMEDSImpl_GenericAttribute)& theGA)
{
SALOMEDS_GenericAttribute* aGA = NULL;
- char* aTypeOfAttribute = theGA->GetClassType().ToCString();
+ std::string aTypeOfAttribute = theGA->GetClassType().ToCString();
__CreateGenericClientAttributeLocal
return aGA;
}
SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute(SALOMEDS::GenericAttribute_ptr theGA)
{
SALOMEDS_GenericAttribute* aGA = NULL;
- char* aTypeOfAttribute = theGA->GetClassType();
+ std::string aTypeOfAttribute = theGA->GetClassType();
__CreateGenericClientAttributeCORBA
return aGA;
}
virtual ~SALOMEDS_GenericAttribute();
void CheckLocked();
- char* Type();
- char* GetClassType();
+ std::string Type();
+ std::string GetClassType();
SALOMEDSClient_SObject* GetSObject();
static SALOMEDS_GenericAttribute* CreateAttribute(const Handle(SALOMEDSImpl_GenericAttribute)& theGA);
using namespace std;
#include "SALOMEDS_SComponent.hxx"
+#include <string>
+#include <TCollection_AsciiString.hxx>
SALOMEDS_SComponent::SALOMEDS_SComponent(SALOMEDS::SComponent_ptr theSComponent)
:SALOMEDS_SObject(theSComponent)
SALOMEDS_SComponent::~SALOMEDS_SComponent()
{}
-char* SALOMEDS_SComponent::ComponentDataType()
+std::string SALOMEDS_SComponent::ComponentDataType()
{
- TCollection_AsciiString aType;
+ std::string aType;
if(_isLocal) {
- aType = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentDataType();
+ aType = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentDataType().ToCString();
}
else aType = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentDataType();
- return aType.ToCString();
+ return aType;
}
-bool SALOMEDS_SComponent::ComponentIOR(char* theID)
+bool SALOMEDS_SComponent::ComponentIOR(std::string& theID)
{
bool ret;
if(_isLocal) {
theID = anIOR.ToCString();
}
else {
- ret = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentIOR(theID);
+ CORBA::String_var anIOR;
+ ret = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentIOR(anIOR.out());
+ theID = std::string(anIOR.in());
+
}
return ret;
SALOMEDS_SComponent(SALOMEDS::SComponent_ptr theSComponent);
~SALOMEDS_SComponent();
- virtual char* ComponentDataType();
- virtual bool ComponentIOR(char* theID);
+ virtual std::string ComponentDataType();
+ virtual bool ComponentIOR(std::string& theID);
};
#endif
using namespace std;
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include "SALOMEDS_SObject.hxx"
if(!_isLocal) CORBA::release(_corba_impl);
}
-char* SALOMEDS_SObject::GetID()
+std::string SALOMEDS_SObject::GetID()
{
- TCollection_AsciiString aValue;
- if(_isLocal) aValue = _local_impl->GetID();
+ std::string aValue;
+ if(_isLocal) aValue = _local_impl->GetID().ToCString();
else aValue = _corba_impl->GetID();
- return aValue.ToCString();
+ return aValue;
}
SALOMEDSClient_SComponent* SALOMEDS_SObject::GetFatherComponent()
return new SALOMEDS_SObject(_corba_impl->GetFather());
}
-bool SALOMEDS_SObject::FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const char* aTypeOfAttribute)
+bool SALOMEDS_SObject::FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const std::string& aTypeOfAttribute)
{
bool ret = false;
- TCollection_AsciiString aType((char*)aTypeOfAttribute);
if(_isLocal) {
Handle(SALOMEDSImpl_GenericAttribute) anAttr;
- ret = _local_impl->FindAttribute(anAttr, aType);
+ ret = _local_impl->FindAttribute(anAttr, (char*)aTypeOfAttribute.c_str());
if(ret) anAttribute = SALOMEDS_GenericAttribute::CreateAttribute(anAttr);
}
else {
SALOMEDS::GenericAttribute_var anAttr;
- ret = _corba_impl->FindAttribute(anAttr.out(), aType.ToCString());
+ ret = _corba_impl->FindAttribute(anAttr.out(), aTypeOfAttribute.c_str());
if(ret) anAttribute = SALOMEDS_GenericAttribute::CreateAttribute(anAttr);
}
return new SALOMEDS_Study(_corba_impl->GetStudy());
}
-char* SALOMEDS_SObject::Name()
+std::string SALOMEDS_SObject::Name()
{
- TCollection_AsciiString aName;
- if(_isLocal) aName = _local_impl->Name();
+ std::string aName;
+ if(_isLocal) aName = _local_impl->Name().ToCString();
else aName = _corba_impl->Name();
- return aName.ToCString();
+ return aName;
}
-void SALOMEDS_SObject::Name(const char* theName)
+void SALOMEDS_SObject::Name(const std::string& theName)
{
- TCollection_AsciiString aName((char*)theName);
- if(_isLocal) _local_impl->Name(aName);
- else _corba_impl->Name(aName.ToCString());
+ if(_isLocal) _local_impl->Name((char*)theName.c_str());
+ else _corba_impl->Name(theName.c_str());
}
vector<SALOMEDSClient_GenericAttribute*> SALOMEDS_SObject::GetAllAttributes()
return aVector;
}
-char* SALOMEDS_SObject::GetName()
+std::string SALOMEDS_SObject::GetName()
{
- TCollection_AsciiString aName;
- if(_isLocal) aName = _local_impl->GetName();
+ std::string aName;
+ if(_isLocal) aName = _local_impl->GetName().ToCString();
else aName = _corba_impl->GetName();
- return aName.ToCString();
+ return aName;
}
-char* SALOMEDS_SObject::GetComment()
+std::string SALOMEDS_SObject::GetComment()
{
- TCollection_AsciiString aComment;
- if(_isLocal) aComment = _local_impl->GetComment();
+ std::string aComment;
+ if(_isLocal) aComment = _local_impl->GetComment().ToCString();
else aComment = _corba_impl->GetComment();
- return aComment.ToCString();
+ return aComment;
}
-char* SALOMEDS_SObject::GetIOR()
+std::string SALOMEDS_SObject::GetIOR()
{
- TCollection_AsciiString anIOR;
- if(_isLocal) anIOR = _local_impl->GetIOR();
+ std::string anIOR;
+ if(_isLocal) anIOR = _local_impl->GetIOR().ToCString();
else anIOR = _corba_impl->GetIOR();
- return anIOR.ToCString();
+ return anIOR;
}
int SALOMEDS_SObject::Tag()
{
CORBA::Object_var obj;
if(_isLocal) {
- TCollection_AsciiString anIOR = GetIOR();
+ std::string anIOR = GetIOR();
SALOMEDS_Study* aStudy = dynamic_cast<SALOMEDS_Study*>(GetStudy());
- obj = CORBA::Object::_duplicate(aStudy->ConvertIORToObject(anIOR.ToCString()));
+ obj = CORBA::Object::_duplicate(aStudy->ConvertIORToObject(anIOR));
delete aStudy;
}
else obj = CORBA::Object::_duplicate(_corba_impl->GetObject());
SALOMEDS_SObject(const Handle(SALOMEDSImpl_SObject)& theSObject);
virtual ~SALOMEDS_SObject();
- virtual char* GetID();
+ virtual std::string GetID();
virtual SALOMEDSClient_SComponent* GetFatherComponent();
virtual SALOMEDSClient_SObject* GetFather();
- virtual bool FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const char* aTypeOfAttribute);
+ virtual bool FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const std::string& aTypeOfAttribute);
virtual bool ReferencedObject(SALOMEDSClient_SObject*& theObject);
virtual bool FindSubObject(int theTag, SALOMEDSClient_SObject*& theObject);
virtual SALOMEDSClient_Study* GetStudy();
- virtual char* Name();
- virtual void Name(const char* theName);
+ virtual std::string Name();
+ virtual void Name(const std::string& theName);
virtual vector<SALOMEDSClient_GenericAttribute*> GetAllAttributes();
- virtual char* GetName();
- virtual char* GetComment();
- virtual char* GetIOR();
+ virtual std::string GetName();
+ virtual std::string GetComment();
+ virtual std::string GetIOR();
virtual int Tag();
virtual int Depth();
#include "SALOMEDS_Driver_i.hxx"
+#include <TCollection_AsciiString.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
if(!_isLocal) CORBA::release(_corba_impl);
}
-char* SALOMEDS_Study::GetPersistentReference()
+std::string SALOMEDS_Study::GetPersistentReference()
{
- TCollection_AsciiString aRef;
- if(_isLocal) aRef = _local_impl->GetPersistentReference();
+ std::string aRef;
+ if(_isLocal) aRef = _local_impl->GetPersistentReference().ToCString();
else aRef = _corba_impl->GetPersistentReference();
- return aRef.ToCString();
+ return aRef;
}
-char* SALOMEDS_Study::GetTransientReference()
+std::string SALOMEDS_Study::GetTransientReference()
{
- TCollection_AsciiString aRef;
- if(_isLocal) aRef = _local_impl->GetTransientReference();
+ std::string aRef;
+ if(_isLocal) aRef = _local_impl->GetTransientReference().ToCString();
else aRef = _corba_impl->GetTransientReference();
- return aRef.ToCString();
+ return aRef;
}
bool SALOMEDS_Study::IsEmpty()
return ret;
}
-SALOMEDSClient_SComponent* SALOMEDS_Study::FindComponent (const char* aComponentName)
+SALOMEDSClient_SComponent* SALOMEDS_Study::FindComponent (const std::string& aComponentName)
{
SALOMEDS_SComponent* aSCO = NULL;
- TCollection_AsciiString aName((char*)aComponentName);
if(_isLocal) {
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponent(aName);
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponent((char*)aComponentName.c_str());
if(aSCO_impl.IsNull()) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
- SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponent(aName.ToCString());
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponent((char*)aComponentName.c_str());
if(CORBA::is_nil(aSCO_impl)) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
return aSCO;
}
-SALOMEDSClient_SComponent* SALOMEDS_Study::FindComponentID(const char* aComponentID)
+SALOMEDSClient_SComponent* SALOMEDS_Study::FindComponentID(const std::string& aComponentID)
{
SALOMEDS_SComponent* aSCO = NULL;
- TCollection_AsciiString anID((char*)aComponentID);
if(_isLocal) {
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponentID(anID);
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->FindComponentID((char*)aComponentID.c_str());
if(aSCO_impl.IsNull()) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
- SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponentID(anID.ToCString());
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->FindComponentID((char*)aComponentID.c_str());
if(CORBA::is_nil(aSCO_impl)) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
}
-SALOMEDSClient_SObject* SALOMEDS_Study::FindObject(const char* anObjectName)
+SALOMEDSClient_SObject* SALOMEDS_Study::FindObject(const std::string& anObjectName)
{
SALOMEDS_SObject* aSO = NULL;
- TCollection_AsciiString aName((char*)anObjectName);
if(_isLocal) {
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObject(aName);
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObject((char*)anObjectName.c_str());
if(aSO_impl.IsNull()) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
- SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObject(aName.ToCString());
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObject((char*)anObjectName.c_str());
if(CORBA::is_nil(aSO_impl)) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
return aSO;
}
-std::vector<SALOMEDSClient_SObject*> SALOMEDS_Study::FindObjectByName(const char* anObjectName,
- const char* aComponentName)
+std::vector<SALOMEDSClient_SObject*> SALOMEDS_Study::FindObjectByName(const std::string& anObjectName,
+ const std::string& aComponentName)
{
std::vector<SALOMEDSClient_SObject*> aVector;
int i, aLength = 0;
- TCollection_AsciiString anObjName((char*)anObjectName);
- TCollection_AsciiString aCompName((char*)aComponentName);
if(_isLocal) {
- Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->FindObjectByName(anObjName, aCompName);
+ Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->FindObjectByName((char*)anObjectName.c_str(), (char*)aComponentName.c_str());
aLength = aSeq->Length();
for(i = 1; i<= aLength; i++)
aVector.push_back(new SALOMEDS_SObject(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i))));
}
else {
- SALOMEDS::Study::ListOfSObject_var aSeq = _corba_impl->FindObjectByName(anObjName.ToCString(), aCompName.ToCString());
+ SALOMEDS::Study::ListOfSObject_var aSeq = _corba_impl->FindObjectByName((char*)anObjectName.c_str(), (char*)aComponentName.c_str());
aLength = aSeq->length();
for(i = 0; i< aLength; i++) aVector.push_back(new SALOMEDS_SObject(aSeq[i]));
}
return aVector;
}
-SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectID(const char* anObjectID)
+SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectID(const std::string& anObjectID)
{
SALOMEDS_SObject* aSO = NULL;
- TCollection_AsciiString anID((char*)anObjectID);
if(_isLocal) {
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectID(anID);
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectID((char*)anObjectID.c_str());
if(aSO_impl.IsNull()) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
- SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectID(anID.ToCString());
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectID((char*)anObjectID.c_str());
if(CORBA::is_nil(aSO_impl)) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
return aSO;
}
-SALOMEDSClient_SObject* SALOMEDS_Study::CreateObjectID(const char* anObjectID)
+SALOMEDSClient_SObject* SALOMEDS_Study::CreateObjectID(const std::string& anObjectID)
{
SALOMEDS_SObject* aSO = NULL;
- TCollection_AsciiString anID((char*)anObjectID);
- if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->CreateObjectID(anID));
- else aSO = new SALOMEDS_SObject(_corba_impl->CreateObjectID(anID.ToCString()));
+ if(_isLocal) aSO = new SALOMEDS_SObject(_local_impl->CreateObjectID((char*)anObjectID.c_str()));
+ else aSO = new SALOMEDS_SObject(_corba_impl->CreateObjectID((char*)anObjectID.c_str()));
return aSO;
}
-SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectIOR(const char* anObjectIOR)
+SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectIOR(const std::string& anObjectIOR)
{
SALOMEDS_SObject* aSO = NULL;
- TCollection_AsciiString anIOR((char*)anObjectIOR);
if(_isLocal) {
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectIOR(anIOR);
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectIOR((char*)anObjectIOR.c_str());
if(aSO_impl.IsNull()) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
- SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectIOR(anIOR.ToCString());
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectIOR((char*)anObjectIOR.c_str());
if(CORBA::is_nil(aSO_impl)) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
return aSO;
}
-SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectByPath(const char* thePath)
+SALOMEDSClient_SObject* SALOMEDS_Study::FindObjectByPath(const std::string& thePath)
{
SALOMEDS_SObject* aSO = NULL;
- TCollection_AsciiString aPath((char*)thePath);
if(_isLocal) {
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectByPath(aPath);
+ Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectByPath((char*)thePath.c_str());
if(aSO_impl.IsNull()) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
- SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectByPath(aPath.ToCString());
+ SALOMEDS::SObject_var aSO_impl = _corba_impl->FindObjectByPath((char*)thePath.c_str());
if(CORBA::is_nil(aSO_impl)) return NULL;
aSO = new SALOMEDS_SObject(aSO_impl);
}
return aSO;
}
-char* SALOMEDS_Study::GetObjectPath(SALOMEDSClient_SObject* theSO)
+std::string SALOMEDS_Study::GetObjectPath(SALOMEDSClient_SObject* theSO)
{
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aPath;
- if(_isLocal) aPath = _local_impl->GetObjectPath(aSO->GetLocalImpl());
+ std::string aPath;
+ if(_isLocal) aPath = _local_impl->GetObjectPath(aSO->GetLocalImpl()).ToCString();
else aPath = _corba_impl->GetObjectPath(aSO->GetCORBAImpl());
- return aPath.ToCString();
+ return aPath;
}
-void SALOMEDS_Study::SetContext(const char* thePath)
+void SALOMEDS_Study::SetContext(const std::string& thePath)
{
- TCollection_AsciiString aPath((char*)thePath);
- if(_isLocal) _local_impl->SetContext(aPath);
- else _corba_impl->SetContext(aPath.ToCString());
+ if(_isLocal) _local_impl->SetContext((char*)thePath.c_str());
+ else _corba_impl->SetContext((char*)thePath.c_str());
}
-char* SALOMEDS_Study::GetContext()
+std::string SALOMEDS_Study::GetContext()
{
- TCollection_AsciiString aPath;
- if(_isLocal) aPath = _local_impl->GetContext();
+ std::string aPath;
+ if(_isLocal) aPath = _local_impl->GetContext().ToCString();
else aPath = _corba_impl->GetContext();
- return aPath.ToCString();
+ return aPath;
}
-std::vector<std::string> SALOMEDS_Study::GetObjectNames(const char* theContext)
+std::vector<std::string> SALOMEDS_Study::GetObjectNames(const std::string& theContext)
{
std::vector<std::string> aVector;
- TCollection_AsciiString aContext((char*)theContext);
int aLength, i;
if(_isLocal) {
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetObjectNames(aContext);
+ Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetObjectNames((char*)theContext.c_str());
aLength = aSeq->Length();
for(i = 1; i<=aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
}
else {
- SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetObjectNames(aContext.ToCString());
+ SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetObjectNames((char*)theContext.c_str());
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back(std::string((std::string)aSeq[i].in()));
}
return aVector;
}
-std::vector<std::string> SALOMEDS_Study::GetDirectoryNames(const char* theContext)
+std::vector<std::string> SALOMEDS_Study::GetDirectoryNames(const std::string& theContext)
{
std::vector<std::string> aVector;
- TCollection_AsciiString aContext((char*)theContext);
int aLength, i;
if(_isLocal) {
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetDirectoryNames(aContext);
+ Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetDirectoryNames((char*)theContext.c_str());
aLength = aSeq->Length();
for(i = 1; i<=aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
}
else {
- SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetDirectoryNames(aContext.ToCString());
+ SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetDirectoryNames((char*)theContext.c_str());
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-std::vector<std::string> SALOMEDS_Study::GetFileNames(const char* theContext)
+std::vector<std::string> SALOMEDS_Study::GetFileNames(const std::string& theContext)
{
std::vector<std::string> aVector;
- TCollection_AsciiString aContext((char*)theContext);
int aLength, i;
if(_isLocal) {
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetFileNames(aContext);
+ Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetFileNames((char*)theContext.c_str());
aLength = aSeq->Length();
for(i = 1; i<=aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
}
else {
- SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetFileNames(aContext.ToCString());
+ SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetFileNames((char*)theContext.c_str());
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
-std::vector<std::string> SALOMEDS_Study::GetComponentNames(const char* theContext)
+std::vector<std::string> SALOMEDS_Study::GetComponentNames(const std::string& theContext)
{
std::vector<std::string> aVector;
- TCollection_AsciiString aContext((char*)theContext);
int aLength, i;
if(_isLocal) {
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetComponentNames(aContext);
+ Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetComponentNames((char*)theContext.c_str());
aLength = aSeq->Length();
for(i = 1; i<=aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
}
else {
- SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetComponentNames(aContext.ToCString());
+ SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetComponentNames((char*)theContext.c_str());
aLength = aSeq->length();
- for(i = 0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i = 0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
return aSB;
}
-char* SALOMEDS_Study::Name()
+std::string SALOMEDS_Study::Name()
{
- TCollection_AsciiString aName;
- if(_isLocal) aName = _local_impl->Name();
+ std::string aName;
+ if(_isLocal) aName = _local_impl->Name().ToCString();
else aName = _corba_impl->Name();
- return aName.ToCString();
+ return aName;
}
-void SALOMEDS_Study::Name(const char* name)
+void SALOMEDS_Study::Name(const std::string& theName)
{
- TCollection_AsciiString aName((char*)name);
- if(_isLocal) _local_impl->Name(aName);
- else _corba_impl->Name(aName.ToCString());
+ if(_isLocal) _local_impl->Name((char*)theName.c_str());
+ else _corba_impl->Name((char*)theName.c_str());
}
bool SALOMEDS_Study::IsSaved()
return isModified;
}
-char* SALOMEDS_Study::URL()
+std::string SALOMEDS_Study::URL()
{
- TCollection_AsciiString aURL;
- if(_isLocal) aURL = _local_impl->URL();
+ std::string aURL;
+ if(_isLocal) aURL = _local_impl->URL().ToCString();
else aURL = _corba_impl->URL();
- return aURL.ToCString();
+ return aURL;
}
-void SALOMEDS_Study::URL(const char* url)
+void SALOMEDS_Study::URL(const std::string& url)
{
- TCollection_AsciiString aURL((char*)url);
- if(_isLocal) _local_impl->URL(aURL);
- else _corba_impl->URL(aURL.ToCString());
+ if(_isLocal) _local_impl->URL((char*)url.c_str());
+ else _corba_impl->URL((char*)url.c_str());
}
int SALOMEDS_Study::StudyId()
return aProp;
}
-char* SALOMEDS_Study::GetLastModificationDate()
+std::string SALOMEDS_Study::GetLastModificationDate()
{
- TCollection_AsciiString aDate;
- if(_isLocal) aDate = _local_impl->GetLastModificationDate();
+ std::string aDate;
+ if(_isLocal) aDate = _local_impl->GetLastModificationDate().ToCString();
else aDate = _corba_impl->GetLastModificationDate();
- return aDate.ToCString();
+ return aDate;
}
std::vector<std::string> SALOMEDS_Study::GetModificationsDate()
else {
SALOMEDS::ListOfDates_var aSeq = _corba_impl->GetModificationsDate();
aLength = aSeq->length();
- for(i=0; i<aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for(i=0; i<aLength; i++) aVector.push_back((char*)aSeq[i].in());
}
return aVector;
}
else _corba_impl->EnableUseCaseAutoFilling(isEnabled);
}
-bool SALOMEDS_Study::DumpStudy(const char* thePath, const char* theBaseName, bool isPublished)
+bool SALOMEDS_Study::DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished)
{
- TCollection_AsciiString aPath((char*)thePath);
- TCollection_AsciiString aBaseName((char*)theBaseName);
bool ret;
if(_isLocal) {
SALOMEDS_DriverFactory_i* aFactory = new SALOMEDS_DriverFactory_i(_orb);
- ret = _local_impl->DumpStudy(aPath, aBaseName, isPublished, aFactory);
+ ret = _local_impl->DumpStudy((char*)thePath.c_str(), (char*)theBaseName.c_str(), isPublished, aFactory);
delete aFactory;
}
- else ret = _corba_impl->DumpStudy(aPath.ToCString(), aBaseName.ToCString(), isPublished);
+ else ret = _corba_impl->DumpStudy((char*)thePath.c_str(), (char*)theBaseName.c_str(), isPublished);
return ret;
}
-char* SALOMEDS_Study::ConvertObjectToIOR(CORBA::Object_ptr theObject)
+std::string SALOMEDS_Study::ConvertObjectToIOR(CORBA::Object_ptr theObject)
{
return _orb->object_to_string(theObject);
}
-CORBA::Object_ptr SALOMEDS_Study::ConvertIORToObject(const char* theIOR)
+CORBA::Object_ptr SALOMEDS_Study::ConvertIORToObject(const std::string& theIOR)
{
- return _orb->string_to_object(theIOR);
+ return _orb->string_to_object(theIOR.c_str());
}
void SALOMEDS_Study::init_orb()
SALOMEDS_Study(SALOMEDS::Study_ptr theStudy);
~SALOMEDS_Study();
- virtual char* GetPersistentReference();
- virtual char* GetTransientReference();
+ virtual std::string GetPersistentReference();
+ virtual std::string GetTransientReference();
virtual bool IsEmpty();
- virtual SALOMEDSClient_SComponent* FindComponent (const char* aComponentName);
- virtual SALOMEDSClient_SComponent* FindComponentID(const char* aComponentID);
- virtual SALOMEDSClient_SObject* FindObject(const char* anObjectName);
- virtual std::vector<SALOMEDSClient_SObject*> FindObjectByName( const char* anObjectName, const char* aComponentName ) ;
- virtual SALOMEDSClient_SObject* FindObjectID(const char* anObjectID);
- virtual SALOMEDSClient_SObject* CreateObjectID(const char* anObjectID);
- virtual SALOMEDSClient_SObject* FindObjectIOR(const char* anObjectIOR);
- virtual SALOMEDSClient_SObject* FindObjectByPath(const char* thePath);
- virtual char* GetObjectPath(SALOMEDSClient_SObject* theSO);
- virtual void SetContext(const char* thePath);
- virtual char* GetContext();
- virtual std::vector<std::string> GetObjectNames(const char* theContext);
- virtual std::vector<std::string> GetDirectoryNames(const char* theContext);
- virtual std::vector<std::string> GetFileNames(const char* theContext);
- virtual std::vector<std::string> GetComponentNames(const char* theContext);
+ virtual SALOMEDSClient_SComponent* FindComponent (const std::string& aComponentName);
+ virtual SALOMEDSClient_SComponent* FindComponentID(const std::string& aComponentID);
+ virtual SALOMEDSClient_SObject* FindObject(const std::string& anObjectName);
+ virtual std::vector<SALOMEDSClient_SObject*> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) ;
+ virtual SALOMEDSClient_SObject* FindObjectID(const std::string& anObjectID);
+ virtual SALOMEDSClient_SObject* CreateObjectID(const std::string& anObjectID);
+ virtual SALOMEDSClient_SObject* FindObjectIOR(const std::string& anObjectIOR);
+ virtual SALOMEDSClient_SObject* FindObjectByPath(const std::string& thePath);
+ virtual std::string GetObjectPath(SALOMEDSClient_SObject* theSO);
+ virtual void SetContext(const std::string& thePath);
+ virtual std::string GetContext();
+ virtual std::vector<std::string> GetObjectNames(const std::string& theContext);
+ virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext);
+ virtual std::vector<std::string> GetFileNames(const std::string& theContext);
+ virtual std::vector<std::string> GetComponentNames(const std::string& theContext);
virtual SALOMEDSClient_ChildIterator* NewChildIterator(SALOMEDSClient_SObject* theSO);
virtual SALOMEDSClient_SComponentIterator* NewComponentIterator();
virtual SALOMEDSClient_StudyBuilder* NewBuilder();
- virtual char* Name();
- virtual void Name(const char* name);
+ virtual std::string Name();
+ virtual void Name(const std::string& name);
virtual bool IsSaved();
virtual void IsSaved(bool save);
virtual bool IsModified();
- virtual char* URL();
- virtual void URL(const char* url);
+ virtual std::string URL();
+ virtual void URL(const std::string& url);
virtual int StudyId();
virtual void StudyId(int id);
virtual std::vector<SALOMEDSClient_SObject*> FindDependances(SALOMEDSClient_SObject* theSO);
virtual SALOMEDSClient_AttributeStudyProperties* GetProperties();
- virtual char* GetLastModificationDate();
+ virtual std::string GetLastModificationDate();
virtual std::vector<std::string> GetModificationsDate();
virtual SALOMEDSClient_UseCaseBuilder* GetUseCaseBuilder();
virtual void Close();
virtual void EnableUseCaseAutoFilling(bool isEnabled);
- virtual bool DumpStudy(const char* thePath, const char* theBaseName, bool isPublished);
+ virtual bool DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished);
- char* ConvertObjectToIOR(CORBA::Object_ptr theObject);
- CORBA::Object_ptr ConvertIORToObject(const char* theIOR);
+ std::string ConvertObjectToIOR(CORBA::Object_ptr theObject);
+ CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR);
private:
void init_orb();
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TDF_Attribute.hxx>
#include "SALOMEDS_StudyManager.hxx"
if(!_isLocal) CORBA::release(_corba_impl);
}
-SALOMEDSClient_SComponent* SALOMEDS_StudyBuilder::NewComponent(const char* ComponentDataType)
+SALOMEDSClient_SComponent* SALOMEDS_StudyBuilder::NewComponent(const std::string& ComponentDataType)
{
CheckLocked();
SALOMEDS_SComponent* aSCO = NULL;
- TCollection_AsciiString aType((char*)ComponentDataType);
if(_isLocal) {
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->NewComponent(aType);
+ Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->NewComponent((char*)ComponentDataType.c_str());
if(aSCO_impl.IsNull()) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
- SALOMEDS::SComponent_var aSCO_impl = _corba_impl->NewComponent(aType.ToCString());
+ SALOMEDS::SComponent_var aSCO_impl = _corba_impl->NewComponent((char*)ComponentDataType.c_str());
if(CORBA::is_nil(aSCO_impl)) return NULL;
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
}
void SALOMEDS_StudyBuilder::DefineComponentInstance (SALOMEDSClient_SComponent* theSCO,
- const char* ComponentIOR)
+ const std::string& ComponentIOR)
{
CheckLocked();
SALOMEDS_SComponent* aSCO = dynamic_cast<SALOMEDS_SComponent*>(theSCO);
- TCollection_AsciiString anIOR((char*)ComponentIOR);
- if(_isLocal) _local_impl->DefineComponentInstance(Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl()),anIOR);
+ if(_isLocal) _local_impl->DefineComponentInstance(Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl()),
+ (char*)ComponentIOR.c_str());
else {
- CORBA::Object_var obj = _orb->string_to_object(ComponentIOR);
+ CORBA::Object_var obj = _orb->string_to_object(ComponentIOR.c_str());
_corba_impl->DefineComponentInstance(SALOMEDS::SComponent::_narrow(aSCO->GetCORBAImpl()), obj);
}
}
}
-void SALOMEDS_StudyBuilder::AddDirectory(const char* thePath)
+void SALOMEDS_StudyBuilder::AddDirectory(const std::string& thePath)
{
CheckLocked();
- TCollection_AsciiString aPath((char*)thePath);
if(_isLocal) {
- _local_impl->AddDirectory(aPath);
- if(!_local_impl->AddDirectory(TCollection_AsciiString((char*)thePath))) {
- TCollection_AsciiString anErrorCode = _local_impl->GetErrorCode();
+ _local_impl->AddDirectory((char*)thePath.c_str());
+ if(_local_impl->IsError()) {
+ std::string anErrorCode = _local_impl->GetErrorCode().ToCString();
if(anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed();
if(anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory();
if(anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent();
}
}
- else _corba_impl->AddDirectory(aPath.ToCString());
+ else _corba_impl->AddDirectory((char*)thePath.c_str());
}
-void SALOMEDS_StudyBuilder::LoadWith(SALOMEDSClient_SComponent* theSCO, const char* theIOR)
+void SALOMEDS_StudyBuilder::LoadWith(SALOMEDSClient_SComponent* theSCO, const std::string& theIOR)
{
SALOMEDS_SComponent* aSCO = dynamic_cast<SALOMEDS_SComponent*>(theSCO);
- TCollection_AsciiString anIOR((char*)theIOR);
- CORBA::Object_var obj = _orb->string_to_object(theIOR);
+ CORBA::Object_var obj = _orb->string_to_object(theIOR.c_str());
SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
if(_isLocal) {
}
SALOMEDSClient_GenericAttribute* SALOMEDS_StudyBuilder::FindOrCreateAttribute(SALOMEDSClient_SObject* theSO,
- const char* aTypeOfAttribute)
+ const std::string& aTypeOfAttribute)
{
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
SALOMEDS_GenericAttribute* anAttr = NULL;
- TCollection_AsciiString aType((char*)aTypeOfAttribute);
if(_isLocal) {
Handle(SALOMEDSImpl_GenericAttribute) aGA;
try {
- aGA=Handle(SALOMEDSImpl_GenericAttribute)::DownCast(_local_impl->FindOrCreateAttribute(aSO->GetLocalImpl(),aType));
+ aGA=Handle(SALOMEDSImpl_GenericAttribute)::DownCast(_local_impl->FindOrCreateAttribute(aSO->GetLocalImpl(),
+ (char*)aTypeOfAttribute.c_str()));
}
catch (...) {
throw SALOMEDS::StudyBuilder::LockProtection();
anAttr = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
}
else {
- SALOMEDS::GenericAttribute_var aGA = _corba_impl->FindOrCreateAttribute(aSO->GetCORBAImpl(), aType.ToCString());
+ SALOMEDS::GenericAttribute_var aGA = _corba_impl->FindOrCreateAttribute(aSO->GetCORBAImpl(), (char*)aTypeOfAttribute.c_str());
anAttr = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
}
bool SALOMEDS_StudyBuilder::FindAttribute(SALOMEDSClient_SObject* theSO,
SALOMEDSClient_GenericAttribute* anAttribute,
- const char* aTypeOfAttribute)
+ const std::string& aTypeOfAttribute)
{
bool ret;
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aType((char*)aTypeOfAttribute);
anAttribute = NULL;
if(_isLocal) {
Handle(SALOMEDSImpl_GenericAttribute) aGA;
- ret = _local_impl->FindAttribute(aSO->GetLocalImpl(), aGA, aType);
+ ret = _local_impl->FindAttribute(aSO->GetLocalImpl(), aGA, (char*)aTypeOfAttribute.c_str());
if(ret) anAttribute = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
}
else {
SALOMEDS::GenericAttribute_var aGA;
- ret = _corba_impl->FindAttribute(aSO->GetCORBAImpl(), aGA.out(), aType.ToCString());
+ ret = _corba_impl->FindAttribute(aSO->GetCORBAImpl(), aGA.out(), (char*)aTypeOfAttribute.c_str());
if(ret) anAttribute = SALOMEDS_GenericAttribute::CreateAttribute(aGA);
}
return ret;
}
-void SALOMEDS_StudyBuilder::RemoveAttribute(SALOMEDSClient_SObject* theSO, const char* aTypeOfAttribute)
+void SALOMEDS_StudyBuilder::RemoveAttribute(SALOMEDSClient_SObject* theSO, const std::string& aTypeOfAttribute)
{
CheckLocked();
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aType((char*)aTypeOfAttribute);
- if(_isLocal) _local_impl->RemoveAttribute(aSO->GetLocalImpl(), aType);
- else _corba_impl->RemoveAttribute(aSO->GetCORBAImpl(), aType.ToCString());
+ if(_isLocal) _local_impl->RemoveAttribute(aSO->GetLocalImpl(), (char*)aTypeOfAttribute.c_str());
+ else _corba_impl->RemoveAttribute(aSO->GetCORBAImpl(), (char*)aTypeOfAttribute.c_str());
}
void SALOMEDS_StudyBuilder::Addreference(SALOMEDSClient_SObject* me, SALOMEDSClient_SObject* thereferencedObject)
else _corba_impl->RemoveReference(aSO->GetCORBAImpl());
}
-void SALOMEDS_StudyBuilder::SetGUID(SALOMEDSClient_SObject* theSO, const char* theGUID)
+void SALOMEDS_StudyBuilder::SetGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID)
{
CheckLocked();
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aGUID((char*)theGUID);
- if(_isLocal) _local_impl->SetGUID(aSO->GetLocalImpl(), aGUID);
- else _corba_impl->SetGUID(aSO->GetCORBAImpl(), aGUID.ToCString());
+ if(_isLocal) _local_impl->SetGUID(aSO->GetLocalImpl(), (char*)theGUID.c_str());
+ else _corba_impl->SetGUID(aSO->GetCORBAImpl(), (char*)theGUID.c_str());
}
-bool SALOMEDS_StudyBuilder::IsGUID(SALOMEDSClient_SObject* theSO, const char* theGUID)
+bool SALOMEDS_StudyBuilder::IsGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID)
{
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aGUID((char*)theGUID);
bool ret;
- if(_isLocal) ret = _local_impl->IsGUID(aSO->GetLocalImpl(), aGUID);
- else ret = _corba_impl->IsGUID(aSO->GetCORBAImpl(), aGUID.ToCString());
+ if(_isLocal) ret = _local_impl->IsGUID(aSO->GetLocalImpl(), (char*)theGUID.c_str());
+ else ret = _corba_impl->IsGUID(aSO->GetCORBAImpl(), (char*)theGUID.c_str());
return ret;
}
}
}
-void SALOMEDS_StudyBuilder::SetName(SALOMEDSClient_SObject* theSO, const char* theValue)
+void SALOMEDS_StudyBuilder::SetName(SALOMEDSClient_SObject* theSO, const std::string& theValue)
{
CheckLocked();
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aValue((char*)theValue);
- if(_isLocal) _local_impl->SetName(aSO->GetLocalImpl(), aValue);
- else _corba_impl->SetName(aSO->GetCORBAImpl(), aValue.ToCString());
+ if(_isLocal) _local_impl->SetName(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ else _corba_impl->SetName(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
-void SALOMEDS_StudyBuilder::SetComment(SALOMEDSClient_SObject* theSO, const char* theValue)
+void SALOMEDS_StudyBuilder::SetComment(SALOMEDSClient_SObject* theSO, const std::string& theValue)
{
CheckLocked();
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aValue((char*)theValue);
- if(_isLocal) _local_impl->SetComment(aSO->GetLocalImpl(), aValue);
- else _corba_impl->SetComment(aSO->GetCORBAImpl(), aValue.ToCString());
+ if(_isLocal) _local_impl->SetComment(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ else _corba_impl->SetComment(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
-void SALOMEDS_StudyBuilder::SetIOR(SALOMEDSClient_SObject* theSO, const char* theValue)
+void SALOMEDS_StudyBuilder::SetIOR(SALOMEDSClient_SObject* theSO, const std::string& theValue)
{
CheckLocked();
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO);
- TCollection_AsciiString aValue((char*)theValue);
- if(_isLocal) _local_impl->SetIOR(aSO->GetLocalImpl(), aValue);
- else _corba_impl->SetIOR(aSO->GetCORBAImpl(), aValue.ToCString());
+ if(_isLocal) _local_impl->SetIOR(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ else _corba_impl->SetIOR(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
void SALOMEDS_StudyBuilder::init_orb()
SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
~SALOMEDS_StudyBuilder();
- virtual SALOMEDSClient_SComponent* NewComponent(const char* ComponentDataType);
- virtual void DefineComponentInstance (SALOMEDSClient_SComponent*, const char* ComponentIOR);
+ virtual SALOMEDSClient_SComponent* NewComponent(const std::string& ComponentDataType);
+ virtual void DefineComponentInstance (SALOMEDSClient_SComponent*, const std::string& ComponentIOR);
virtual void RemoveComponent(SALOMEDSClient_SComponent* theSCO);
virtual SALOMEDSClient_SObject* NewObject(SALOMEDSClient_SObject* theFatherObject);
virtual SALOMEDSClient_SObject* NewObjectToTag(SALOMEDSClient_SObject* theFatherObject, int theTag);
- virtual void AddDirectory(const char* thePath);
- virtual void LoadWith(SALOMEDSClient_SComponent* theSCO, const char* theIOR);
+ virtual void AddDirectory(const std::string& thePath);
+ virtual void LoadWith(SALOMEDSClient_SComponent* theSCO, const std::string& theIOR);
virtual void Load(SALOMEDSClient_SObject* theSCO);
virtual void RemoveObject(SALOMEDSClient_SObject* theSO);
virtual void RemoveObjectWithChildren(SALOMEDSClient_SObject* theSO);
virtual SALOMEDSClient_GenericAttribute* FindOrCreateAttribute(SALOMEDSClient_SObject* theSO,
- const char* aTypeOfAttribute);
+ const std::string& aTypeOfAttribute);
virtual bool FindAttribute(SALOMEDSClient_SObject* theSO,
SALOMEDSClient_GenericAttribute* theAttribute,
- const char* aTypeOfAttribute);
- virtual void RemoveAttribute(SALOMEDSClient_SObject* theSO, const char* aTypeOfAttribute);
+ const std::string& aTypeOfAttribute);
+ virtual void RemoveAttribute(SALOMEDSClient_SObject* theSO, const std::string& aTypeOfAttribute);
virtual void Addreference(SALOMEDSClient_SObject* me, SALOMEDSClient_SObject* thereferencedObject);
virtual void RemoveReference(SALOMEDSClient_SObject* me);
- virtual void SetGUID(SALOMEDSClient_SObject* theSO, const char* theGUID);
- virtual bool IsGUID(SALOMEDSClient_SObject* theSO, const char* theGUID);
+ virtual void SetGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID);
+ virtual bool IsGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID);
virtual void NewCommand();
virtual void CommitCommand();
virtual bool HasOpenCommand();
virtual bool GetAvailableRedos();
virtual int UndoLimit();
virtual void UndoLimit(int theLimit);
- virtual void SetName(SALOMEDSClient_SObject* theSO, const char* theValue);
- virtual void SetComment(SALOMEDSClient_SObject* theSO, const char* theValue);
- virtual void SetIOR(SALOMEDSClient_SObject* theSO, const char* theValue);
+ virtual void SetName(SALOMEDSClient_SObject* theSO, const std::string& theValue);
+ virtual void SetComment(SALOMEDSClient_SObject* theSO, const std::string& theValue);
+ virtual void SetIOR(SALOMEDSClient_SObject* theSO, const std::string& theValue);
private:
void CheckLocked();
#include <unistd.h>
#endif
-#include <TCollection_AsciiString.hxx>
+#include <string>
+#include <TCollection_AsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include "OpUtil.hxx"
if(!_isLocal) CORBA::release(_corba_impl);
}
-SALOMEDSClient_Study* SALOMEDS_StudyManager::NewStudy(const char* study_name)
+SALOMEDSClient_Study* SALOMEDS_StudyManager::NewStudy(const std::string& study_name)
{
SALOMEDS_Study* aStudy;
- TCollection_AsciiString aName((char*)study_name);
if(_isLocal) {
- Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->NewStudy(aName);
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->NewStudy((char*)study_name.c_str());
if(aStudy_impl.IsNull()) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
else {
- SALOMEDS::Study_var aStudy_impl = _corba_impl->NewStudy(aName.ToCString());
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->NewStudy((char*)study_name.c_str());
if(CORBA::is_nil(aStudy_impl)) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
return aStudy;
}
-SALOMEDSClient_Study* SALOMEDS_StudyManager::Open(const char* theStudyUrl)
+SALOMEDSClient_Study* SALOMEDS_StudyManager::Open(const std::string& theStudyUrl)
{
SALOMEDS_Study* aStudy;
- TCollection_AsciiString aName((char*)theStudyUrl);
if(_isLocal) {
- Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->Open(aName);
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->Open((char*)theStudyUrl.c_str());
if(aStudy_impl.IsNull()) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
else {
- SALOMEDS::Study_var aStudy_impl = _corba_impl->Open(aName.ToCString());
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->Open((char*)theStudyUrl.c_str());
if(CORBA::is_nil(aStudy_impl)) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
_corba_impl->SaveASCII(aStudy, theMultiFile);
}
-void SALOMEDS_StudyManager::SaveAs(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile)
+void SALOMEDS_StudyManager::SaveAs(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
- TCollection_AsciiString anURL((char*)theUrl);
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->SaveAs(anURL.ToCString(), aStudy, theMultiFile);
+ _corba_impl->SaveAs((char*)theUrl.c_str(), aStudy, theMultiFile);
}
-void SALOMEDS_StudyManager::SaveAsASCII(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile)
+void SALOMEDS_StudyManager::SaveAsASCII(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
- TCollection_AsciiString anURL((char*)theUrl);
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->SaveAsASCII(anURL.ToCString(), aStudy, theMultiFile);
+ _corba_impl->SaveAsASCII((char*)theUrl.c_str(), aStudy, theMultiFile);
}
std::vector<std::string> SALOMEDS_StudyManager::GetOpenStudies()
return aVector;
}
-SALOMEDSClient_Study* SALOMEDS_StudyManager::GetStudyByName(const char* theStudyName)
+SALOMEDSClient_Study* SALOMEDS_StudyManager::GetStudyByName(const std::string& theStudyName)
{
SALOMEDS_Study* aStudy = NULL;
- TCollection_AsciiString aName((char*)theStudyName);
if(_isLocal) {
- Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByName(aName);
+ Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByName((char*)theStudyName.c_str());
if(aStudy_impl.IsNull()) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
else {
- SALOMEDS::Study_var aStudy_impl = _corba_impl->GetStudyByName(aName.ToCString());
+ SALOMEDS::Study_var aStudy_impl = _corba_impl->GetStudyByName((char*)theStudyName.c_str());
if(CORBA::is_nil(aStudy_impl)) return NULL;
aStudy = new SALOMEDS_Study(aStudy_impl);
}
SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager);
~SALOMEDS_StudyManager();
- virtual SALOMEDSClient_Study* NewStudy(const char* study_name);
- virtual SALOMEDSClient_Study* Open(const char* theStudyUrl);
+ virtual SALOMEDSClient_Study* NewStudy(const std::string& study_name);
+ virtual SALOMEDSClient_Study* Open(const std::string& theStudyUrl);
virtual void Close( SALOMEDSClient_Study* theStudy);
virtual void Save( SALOMEDSClient_Study* theStudy, bool theMultiFile);
virtual void SaveASCII( SALOMEDSClient_Study* theStudy, bool theMultiFile);
- virtual void SaveAs(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile);
- virtual void SaveAsASCII(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile);
+ virtual void SaveAs(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile);
+ virtual void SaveAsASCII(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile);
virtual std::vector<std::string> GetOpenStudies();
- virtual SALOMEDSClient_Study* GetStudyByName(const char* theStudyName) ;
+ virtual SALOMEDSClient_Study* GetStudyByName(const std::string& theStudyName) ;
virtual SALOMEDSClient_Study* GetStudyByID(int theStudyID) ;
virtual bool CanCopy(SALOMEDSClient_SObject* theSO);
virtual bool Copy(SALOMEDSClient_SObject* theSO);
#include "SALOMEDS_SObject.hxx"
#include "SALOMEDSImpl_UseCaseIterator.hxx"
#include "SALOMEDS_UseCaseIterator.hxx"
-#include <TCollection_AsciiString.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <string>
SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(const Handle(SALOMEDSImpl_UseCaseBuilder)& theBuilder)
{
return ret;
}
-bool SALOMEDS_UseCaseBuilder::SetName(const char* theName)
+bool SALOMEDS_UseCaseBuilder::SetName(const std::string& theName)
{
bool ret;
- TCollection_AsciiString aName((char*)theName);
- if(_isLocal) ret = _local_impl->SetName(aName);
- else ret = _corba_impl->SetName(aName.ToCString());
+ if(_isLocal) ret = _local_impl->SetName((char*)theName.c_str());
+ else ret = _corba_impl->SetName((char*)theName.c_str());
return ret;
}
return obj;
}
-char* SALOMEDS_UseCaseBuilder::GetName()
+std::string SALOMEDS_UseCaseBuilder::GetName()
{
- TCollection_AsciiString aName;
- if(_isLocal) aName = _local_impl->GetName();
+ std::string aName;
+ if(_isLocal) aName = _local_impl->GetName().ToCString();
else aName = _corba_impl->GetName();
- return aName.ToCString();
+ return aName;
}
-SALOMEDSClient_SObject* SALOMEDS_UseCaseBuilder::AddUseCase(const char* theName)
+SALOMEDSClient_SObject* SALOMEDS_UseCaseBuilder::AddUseCase(const std::string& theName)
{
SALOMEDS_SObject* obj = NULL;
- TCollection_AsciiString aName((char*)theName);
- if(_isLocal) obj = new SALOMEDS_SObject(_local_impl->AddUseCase(aName));
- else obj = new SALOMEDS_SObject(_corba_impl->AddUseCase(aName.ToCString()));
+ if(_isLocal) obj = new SALOMEDS_SObject(_local_impl->AddUseCase((char*)theName.c_str()));
+ else obj = new SALOMEDS_SObject(_corba_impl->AddUseCase((char*)theName.c_str()));
return obj;
}
virtual bool SetRootCurrent();
virtual bool HasChildren(SALOMEDSClient_SObject* theObject);
virtual bool IsUseCase(SALOMEDSClient_SObject* theObject);
- virtual bool SetName(const char* theName);
+ virtual bool SetName(const std::string& theName);
virtual SALOMEDSClient_SObject* GetCurrentObject();
- virtual char* GetName();
- virtual SALOMEDSClient_SObject* AddUseCase(const char* theName);
+ virtual std::string GetName();
+ virtual SALOMEDSClient_SObject* AddUseCase(const std::string& theName);
virtual SALOMEDSClient_UseCaseIterator* GetUseCaseIterator(SALOMEDSClient_SObject* anObject);
};
#define SALOMEDSClient_AttributeComment_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeComment: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#endif
#define SALOMEDSClient_AttributeExternalFileDef_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeExternalFileDef: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributeFileType_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeFileType: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributeIOR_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeIOR: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributeName_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeName: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributePersistentRef_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributePersistentRef: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributePixMap_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributePixMap: public virtual SALOMEDSClient_GenericAttribute
{
public:
virtual bool HasPixMap() = 0;
- virtual char* GetPixMap() = 0;
- virtual void SetPixMap(const char* value) = 0;
+ virtual std::string GetPixMap() = 0;
+ virtual void SetPixMap(const std::string& value) = 0;
};
#define SALOMEDSClient_AttributePythonObject_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributePythonObject: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual void SetObject(const char* theSequence, bool IsScript) = 0;
- virtual char* GetObject() = 0;
+ virtual void SetObject(const std::string& theSequence, bool IsScript) = 0;
+ virtual std::string GetObject() = 0;
virtual bool IsScript() = 0;
};
{
public:
- virtual void SetUserName(const char* theName) = 0;
- virtual char* GetUserName() = 0;
+ virtual void SetUserName(const std::string& theName) = 0;
+ virtual std::string GetUserName() = 0;
virtual void SetCreationDate(int theMinute, int theHour, int theDay, int theMonth, int theYear) = 0;
virtual bool GetCreationDate(int& theMinute, int& theHour, int& theDay, int& theMonth, int& theYear) = 0;
- virtual void SetCreationMode(const char* theMode) = 0;
- virtual char* GetCreationMode() = 0;
+ virtual void SetCreationMode(const std::string& theMode) = 0;
+ virtual std::string GetCreationMode() = 0;
virtual void SetModified(int theModified) = 0;
virtual bool IsModified() = 0;
virtual int GetModified() = 0;
virtual void SetLocked(bool theLocked) = 0;
virtual bool IsLocked() = 0;
- virtual void SetModification(const char* theName,
+ virtual void SetModification(const std::string& theName,
int theMinute,
int theHour,
int theDay,
public:
- virtual void SetTitle(const char* theTitle) = 0;
- virtual char* GetTitle() = 0;
- virtual void SetRowTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetTitle(const std::string& theTitle) = 0;
+ virtual std::string GetTitle() = 0;
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetRowTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetRowTitles() = 0;
- virtual void SetColumnTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetColumnTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetColumnTitles() = 0;
- virtual void SetRowUnit(int theIndex, const char* theUnit) = 0;
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0;
virtual void SetRowUnits(const std::vector<std::string>& theUnits) = 0;
virtual std::vector<std::string> GetRowUnits() = 0;
public:
- virtual void SetTitle(const char* theTitle) = 0;
- virtual char* GetTitle() = 0;
- virtual void SetRowTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetTitle(const std::string& theTitle) = 0;
+ virtual std::string GetTitle() = 0;
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetRowTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetRowTitles() = 0;
- virtual void SetColumnTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetColumnTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetColumnTitles() = 0;
- virtual void SetRowUnit(int theIndex, const char* theUnit) = 0;
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0;
virtual void SetRowUnits(const std::vector<std::string>& theUnits) = 0;
virtual std::vector<std::string> GetRowUnits() = 0;
{
public:
- virtual void SetTitle(const char* theTitle) = 0;
- virtual char* GetTitle() = 0;
- virtual void SetRowTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetTitle(const std::string& theTitle) = 0;
+ virtual std::string GetTitle() = 0;
+ virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetRowTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetRowTitles() = 0;
- virtual void SetColumnTitle(int theIndex, const char* theTitle) = 0;
+ virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0;
virtual void SetColumnTitles(const std::vector<std::string>& theTitles) = 0;
virtual std::vector<std::string> GetColumnTitles() = 0;
- virtual void SetRowUnit(int theIndex, const char* theUnit) = 0;
+ virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0;
virtual void SetRowUnits(const std::vector<std::string>& theUnits) = 0;
virtual std::vector<std::string> GetRowUnits() = 0;
virtual void AddColumn(const std::vector<std::string>& theData) = 0;
virtual void SetColumn(int theColumn, const std::vector<std::string>& theData) = 0;
virtual std::vector<std::string> GetColumn(int theColumn) = 0;
- virtual void PutValue(const char* theValue, int theRow, int theColumn) = 0;
+ virtual void PutValue(const std::string& theValue, int theRow, int theColumn) = 0;
virtual bool HasValue(int theRow, int theColumn) = 0;
- virtual char* GetValue(int theRow, int theColumn) = 0;
+ virtual std::string GetValue(int theRow, int theColumn) = 0;
virtual std::vector<int> GetRowSetIndices(int theRow) = 0;
virtual void SetNbColumns(int theNbColumns) = 0;
virtual void SetFirst(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual bool HasFirst() = 0;
virtual SALOMEDSClient_AttributeTreeNode* GetFirst() = 0;
- virtual void SetTreeID(const char* value) = 0;
- virtual char* GetTreeID() = 0;
+ virtual void SetTreeID(const std::string& value) = 0;
+ virtual std::string GetTreeID() = 0;
virtual void Append(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual void Prepend(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual void InsertBefore(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual bool IsDescendant(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual bool IsFather(SALOMEDSClient_AttributeTreeNode* value) = 0;
virtual bool IsChild(SALOMEDSClient_AttributeTreeNode* value) = 0;
- virtual char* Label() = 0;
+ virtual std::string Label() = 0;
};
#define SALOMEDSClient_AttributeUserID_HeaderFile
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_AttributeUserID: public virtual SALOMEDSClient_GenericAttribute
{
public:
- virtual char* Value() = 0;
- virtual void SetValue(const char* value) = 0;
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
};
#ifndef _GENERICCLIENT_ATTRIBUTE_HXX_
#define _GENERICCLIENT_ATTRIBUTE_HXX_
-#include <exception>
+#include <string>
-//SALOMEDSClient headers
#include "SALOMEDSClient_SObject.hxx"
class SALOMEDSClient_GenericAttribute
public:
virtual void CheckLocked() = 0;
- virtual char* Type() = 0;
- virtual char* GetClassType() = 0;
+ virtual std::string Type() = 0;
+ virtual std::string GetClassType() = 0;
virtual SALOMEDSClient_SObject* GetSObject() = 0;
};
#ifndef __SALOMEDSCLIENT_SCOMPONENT_H__
#define __SALOMEDSCLIENT_SCOMPONENT_H__
-//SALOMEDSClient headers
#include "SALOMEDSClient_SObject.hxx"
+#include <string>
class SALOMEDSClient_SComponent: public virtual SALOMEDSClient_SObject
{
public:
- virtual char* ComponentDataType() = 0;
- virtual bool ComponentIOR(char* theID) = 0;
+ virtual std::string ComponentDataType() = 0;
+ virtual bool ComponentIOR(std::string& theID) = 0;
};
#endif
// std C++ headers
#include <vector>
+#include <string>
class SALOMEDSClient_Study;
class SALOMEDSClient_SComponent;
class SALOMEDSClient_SObject
{
public:
- virtual char* GetID() = 0;
+ virtual std::string GetID() = 0;
virtual SALOMEDSClient_SComponent* GetFatherComponent() = 0;
virtual SALOMEDSClient_SObject* GetFather() = 0;
- virtual bool FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const char* aTypeOfAttribute) = 0;
+ virtual bool FindAttribute(SALOMEDSClient_GenericAttribute*& anAttribute, const std::string& aTypeOfAttribute) = 0;
virtual bool ReferencedObject(SALOMEDSClient_SObject*& theObject) = 0;
virtual bool FindSubObject(int theTag, SALOMEDSClient_SObject*& theObject) = 0;
virtual SALOMEDSClient_Study* GetStudy() = 0;
- virtual char* Name() = 0;
- virtual void Name(const char* theName) = 0;
+ virtual std::string Name() = 0;
+ virtual void Name(const std::string& theName) = 0;
virtual std::vector<SALOMEDSClient_GenericAttribute*> GetAllAttributes() = 0;
- virtual char* GetName() = 0;
- virtual char* GetComment() = 0;
- virtual char* GetIOR() = 0;
+ virtual std::string GetName() = 0;
+ virtual std::string GetComment() = 0;
+ virtual std::string GetIOR() = 0;
virtual int Tag() = 0;
virtual int Depth() = 0;
};
public:
- virtual char* GetPersistentReference() = 0;
- virtual char* GetTransientReference() = 0;
+ virtual std::string GetPersistentReference() = 0;
+ virtual std::string GetTransientReference() = 0;
virtual bool IsEmpty() = 0;
- virtual SALOMEDSClient_SComponent* FindComponent (const char* aComponentName) = 0;
- virtual SALOMEDSClient_SComponent* FindComponentID(const char* aComponentID) = 0;
- virtual SALOMEDSClient_SObject* FindObject(const char* anObjectName) = 0;
- virtual std::vector<SALOMEDSClient_SObject*> FindObjectByName( const char* anObjectName, const char* aComponentName ) = 0;
- virtual SALOMEDSClient_SObject* FindObjectID(const char* anObjectID) = 0;
- virtual SALOMEDSClient_SObject* CreateObjectID(const char* anObjectID) = 0;
- virtual SALOMEDSClient_SObject* FindObjectIOR(const char* anObjectIOR) = 0;
- virtual SALOMEDSClient_SObject* FindObjectByPath(const char* thePath) = 0;
- virtual char* GetObjectPath(SALOMEDSClient_SObject* theSO) = 0;
- virtual void SetContext(const char* thePath) = 0;
- virtual char* GetContext() = 0;
- virtual std::vector<std::string> GetObjectNames(const char* theContext) = 0;
- virtual std::vector<std::string> GetDirectoryNames(const char* theContext) = 0;
- virtual std::vector<std::string> GetFileNames(const char* theContext) = 0;
- virtual std::vector<std::string> GetComponentNames(const char* theContext) = 0;
+ virtual SALOMEDSClient_SComponent* FindComponent (const std::string& aComponentName) = 0;
+ virtual SALOMEDSClient_SComponent* FindComponentID(const std::string& aComponentID) = 0;
+ virtual SALOMEDSClient_SObject* FindObject(const std::string& anObjectName) = 0;
+ virtual std::vector<SALOMEDSClient_SObject*> FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) = 0;
+ virtual SALOMEDSClient_SObject* FindObjectID(const std::string& anObjectID) = 0;
+ virtual SALOMEDSClient_SObject* CreateObjectID(const std::string& anObjectID) = 0;
+ virtual SALOMEDSClient_SObject* FindObjectIOR(const std::string& anObjectIOR) = 0;
+ virtual SALOMEDSClient_SObject* FindObjectByPath(const std::string& thePath) = 0;
+ virtual std::string GetObjectPath(SALOMEDSClient_SObject* theSO) = 0;
+ virtual void SetContext(const std::string& thePath) = 0;
+ virtual std::string GetContext() = 0;
+ virtual std::vector<std::string> GetObjectNames(const std::string& theContext) = 0;
+ virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext) = 0;
+ virtual std::vector<std::string> GetFileNames(const std::string& theContext) = 0;
+ virtual std::vector<std::string> GetComponentNames(const std::string& theContext) = 0;
virtual SALOMEDSClient_ChildIterator* NewChildIterator(SALOMEDSClient_SObject* theSO) = 0;
virtual SALOMEDSClient_SComponentIterator* NewComponentIterator() = 0;
virtual SALOMEDSClient_StudyBuilder* NewBuilder() = 0;
- virtual char* Name() = 0;
- virtual void Name(const char* name) = 0;
+ virtual std::string Name() = 0;
+ virtual void Name(const std::string& name) = 0;
virtual bool IsSaved() = 0;
virtual void IsSaved(bool save) = 0;
virtual bool IsModified() = 0;
- virtual char* URL() = 0;
- virtual void URL(const char* url) = 0;
+ virtual std::string URL() = 0;
+ virtual void URL(const std::string& url) = 0;
virtual int StudyId() = 0;
virtual void StudyId(int id) = 0;
virtual std::vector<SALOMEDSClient_SObject*> FindDependances(SALOMEDSClient_SObject* theSO) = 0;
virtual SALOMEDSClient_AttributeStudyProperties* GetProperties() = 0;
- virtual char* GetLastModificationDate() = 0;
+ virtual std::string GetLastModificationDate() = 0;
virtual std::vector<std::string> GetModificationsDate() = 0;
virtual SALOMEDSClient_UseCaseBuilder* GetUseCaseBuilder() = 0;
virtual void Close() = 0;
virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0;
- virtual bool DumpStudy(const char* thePath, const char* theBaseName, bool isPublished) = 0;
+ virtual bool DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished) = 0;
};
#endif
#include "SALOMEDSClient_SObject.hxx"
#include "SALOMEDSClient_SComponent.hxx"
#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
class SALOMEDSClient_StudyBuilder
{
public:
- virtual SALOMEDSClient_SComponent* NewComponent(const char* ComponentDataType) = 0;
- virtual void DefineComponentInstance (SALOMEDSClient_SComponent*, const char* ComponentIOR) = 0;
+ virtual SALOMEDSClient_SComponent* NewComponent(const std::string& ComponentDataType) = 0;
+ virtual void DefineComponentInstance (SALOMEDSClient_SComponent*, const std::string& ComponentIOR) = 0;
virtual void RemoveComponent(SALOMEDSClient_SComponent* theSCO) = 0;
virtual SALOMEDSClient_SObject* NewObject(SALOMEDSClient_SObject* theFatherObject) = 0;
virtual SALOMEDSClient_SObject* NewObjectToTag(SALOMEDSClient_SObject* theFatherObject, int theTag) = 0;
- virtual void AddDirectory(const char* thePath) = 0;
- virtual void LoadWith(SALOMEDSClient_SComponent* theSCO, const char* theIOR) = 0;
+ virtual void AddDirectory(const std::string& thePath) = 0;
+ virtual void LoadWith(SALOMEDSClient_SComponent* theSCO, const std::string& theIOR) = 0;
virtual void Load(SALOMEDSClient_SObject* theSCO) = 0;
virtual void RemoveObject(SALOMEDSClient_SObject* theSO) = 0;
virtual void RemoveObjectWithChildren(SALOMEDSClient_SObject* theSO) = 0;
- virtual SALOMEDSClient_GenericAttribute* FindOrCreateAttribute(SALOMEDSClient_SObject* theSO, const char* aTypeOfAttribute) = 0;
+ virtual SALOMEDSClient_GenericAttribute* FindOrCreateAttribute(SALOMEDSClient_SObject* theSO, const std::string& aTypeOfAttribute) = 0;
virtual bool FindAttribute(SALOMEDSClient_SObject* theSO,
SALOMEDSClient_GenericAttribute* theAttribute,
- const char* aTypeOfAttribute) = 0;
- virtual void RemoveAttribute(SALOMEDSClient_SObject* theSO, const char* aTypeOfAttribute) = 0;
+ const std::string& aTypeOfAttribute) = 0;
+ virtual void RemoveAttribute(SALOMEDSClient_SObject* theSO, const std::string& aTypeOfAttribute) = 0;
virtual void Addreference(SALOMEDSClient_SObject* me, SALOMEDSClient_SObject* thereferencedObject) = 0;
virtual void RemoveReference(SALOMEDSClient_SObject* me) = 0;
- virtual void SetGUID(SALOMEDSClient_SObject* theSO, const char* theGUID) = 0;
- virtual bool IsGUID(SALOMEDSClient_SObject* theSO, const char* theGUID) = 0;
+ virtual void SetGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID) = 0;
+ virtual bool IsGUID(SALOMEDSClient_SObject* theSO, const std::string& theGUID) = 0;
virtual void NewCommand() = 0;
virtual void CommitCommand()= 0;
virtual bool HasOpenCommand() = 0;
virtual bool GetAvailableRedos() = 0;
virtual int UndoLimit() = 0;
virtual void UndoLimit(int theLimit) = 0;
- virtual void SetName(SALOMEDSClient_SObject* theSO, const char* theValue) = 0;
- virtual void SetComment(SALOMEDSClient_SObject* theSO, const char* theValue) = 0;
- virtual void SetIOR(SALOMEDSClient_SObject* theSO, const char* theValue) = 0;
+ virtual void SetName(SALOMEDSClient_SObject* theSO, const std::string& theValue) = 0;
+ virtual void SetComment(SALOMEDSClient_SObject* theSO, const std::string& theValue) = 0;
+ virtual void SetIOR(SALOMEDSClient_SObject* theSO, const std::string& theValue) = 0;
};
#endif
{
public:
- virtual SALOMEDSClient_Study* NewStudy(const char* study_name) = 0;
- virtual SALOMEDSClient_Study* Open(const char* theStudyUrl) = 0;
+ virtual SALOMEDSClient_Study* NewStudy(const std::string& study_name) = 0;
+ virtual SALOMEDSClient_Study* Open(const std::string& theStudyUrl) = 0;
virtual void Close( SALOMEDSClient_Study* theStudy) = 0;
virtual void Save( SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
virtual void SaveASCII( SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
- virtual void SaveAs(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
- virtual void SaveAsASCII(const char* theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
+ virtual void SaveAs(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
+ virtual void SaveAsASCII(const std::string& theUrl, SALOMEDSClient_Study* theStudy, bool theMultiFile) = 0;
virtual std::vector<std::string> GetOpenStudies() = 0;
- virtual SALOMEDSClient_Study* GetStudyByName(const char* theStudyName) = 0;
+ virtual SALOMEDSClient_Study* GetStudyByName(const std::string& theStudyName) = 0;
virtual SALOMEDSClient_Study* GetStudyByID(int theStudyID) = 0;
virtual bool CanCopy(SALOMEDSClient_SObject* theSO) = 0;
virtual bool Copy(SALOMEDSClient_SObject* theSO) = 0;
#include "SALOMEDSClient_UseCaseIterator.hxx"
#include "SALOMEDSClient_SObject.hxx"
+#include <string>
class SALOMEDSClient_UseCaseBuilder
{
virtual bool SetRootCurrent() = 0;
virtual bool HasChildren(SALOMEDSClient_SObject* theObject) = 0;
virtual bool IsUseCase(SALOMEDSClient_SObject* theObject) = 0;
- virtual bool SetName(const char* theName) = 0;
+ virtual bool SetName(const std::string& theName) = 0;
virtual SALOMEDSClient_SObject* GetCurrentObject() = 0;
- virtual char* GetName() = 0;
- virtual SALOMEDSClient_SObject* AddUseCase(const char* theName) = 0;
+ virtual std::string GetName() = 0;
+ virtual SALOMEDSClient_SObject* AddUseCase(const std::string& theName) = 0;
virtual SALOMEDSClient_UseCaseIterator* GetUseCaseIterator(SALOMEDSClient_SObject* anObject) = 0;
};