Salome HOME
ENV: Windows porting.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_AttributeExternalFileDef.cxx
1 //  File   : SALOMEDS_AttributeExternalFileDef.cxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #include "SALOMEDS_AttributeExternalFileDef.hxx"
6
7 #include <string>
8 #include <TCollection_AsciiString.hxx> 
9 #include <TCollection_ExtendedString.hxx>
10
11 SALOMEDS_AttributeExternalFileDef::SALOMEDS_AttributeExternalFileDef(const Handle(SALOMEDSImpl_AttributeExternalFileDef)& theAttr)
12 :SALOMEDS_GenericAttribute(theAttr)
13 {}
14
15 SALOMEDS_AttributeExternalFileDef::SALOMEDS_AttributeExternalFileDef(SALOMEDS::AttributeExternalFileDef_ptr theAttr)
16 :SALOMEDS_GenericAttribute(theAttr)
17 {}
18
19 SALOMEDS_AttributeExternalFileDef::~SALOMEDS_AttributeExternalFileDef()
20 {}
21
22 std::string SALOMEDS_AttributeExternalFileDef::Value()
23 {
24   std::string aValue;
25   if(_isLocal) 
26    aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->Value()).ToCString();
27   else aValue = SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->Value();
28   return aValue;
29 }
30  
31 void SALOMEDS_AttributeExternalFileDef::SetValue(const std::string& value)
32 {
33   CheckLocked();
34   if(_isLocal) Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->SetValue((char*)value.c_str());
35   else SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->SetValue(value.c_str());
36 }