1 // File : SALOMEDS_AttributePythonObject.cxx
2 // Author : Sergey RUIN
5 #include "SALOMEDS_AttributePythonObject.hxx"
8 #include <TCollection_AsciiString.hxx>
9 #include <TCollection_ExtendedString.hxx>
11 SALOMEDS_AttributePythonObject::SALOMEDS_AttributePythonObject(const Handle(SALOMEDSImpl_AttributePythonObject)& theAttr)
12 :SALOMEDS_GenericAttribute(theAttr)
15 SALOMEDS_AttributePythonObject::SALOMEDS_AttributePythonObject(SALOMEDS::AttributePythonObject_ptr theAttr)
16 :SALOMEDS_GenericAttribute(theAttr)
19 SALOMEDS_AttributePythonObject::~SALOMEDS_AttributePythonObject()
22 bool SALOMEDS_AttributePythonObject::IsScript()
25 if(_isLocal) ret = Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->IsScript();
26 else ret = SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->IsScript();
30 std::string SALOMEDS_AttributePythonObject::GetObject()
34 aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->GetObject()).ToCString();
35 else aValue = SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->GetObject();
39 void SALOMEDS_AttributePythonObject::SetObject(const std::string& theSequence, bool IsScript)
42 if(_isLocal) Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->SetObject((char*)theSequence.c_str(), IsScript);
43 else SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->SetObject(theSequence.c_str(), IsScript);