1 // File : SALOMEDS_SComponent.cxx
2 // Author : Sergey RUIN
7 #include "SALOMEDS_SComponent.hxx"
8 #include "SALOMEDS_SComponent_i.hxx"
10 #include <TCollection_AsciiString.hxx>
14 SALOMEDS_SComponent::SALOMEDS_SComponent(SALOMEDS::SComponent_ptr theSComponent)
15 :SALOMEDS_SObject(theSComponent)
18 SALOMEDS_SComponent::SALOMEDS_SComponent(const Handle(SALOMEDSImpl_SComponent)& theSComponent)
19 :SALOMEDS_SObject(theSComponent)
22 SALOMEDS_SComponent::~SALOMEDS_SComponent()
25 std::string SALOMEDS_SComponent::ComponentDataType()
29 aType = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentDataType().ToCString();
31 else aType = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentDataType();
36 bool SALOMEDS_SComponent::ComponentIOR(std::string& theID)
40 TCollection_AsciiString anIOR;
41 ret = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentIOR(anIOR);
42 theID = anIOR.ToCString();
45 CORBA::String_var anIOR;
46 ret = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentIOR(anIOR.out());
47 theID = std::string(anIOR.in());
53 SALOMEDS::SComponent_ptr SALOMEDS_SComponent::GetSComponent()
56 if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_narrow(GetCORBAImpl());
57 SALOMEDS::SComponent_var aSCO = SALOMEDS_SComponent_i::New(Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()),
62 return SALOMEDS::SComponent::_narrow(GetCORBAImpl());
65 return SALOMEDS::SComponent::_nil();