2 // File : SALOMEDS_AttReal_i.cxx
3 // Created : Mon Jun 10 10:54:58 CEST 2002
4 // Author : Estelle Deville
8 // Copyright : CEA 2002
13 #include "SALOMEDS_AttReal_i.hxx"
14 #include "utilities.h"
15 #include <TDF_Tool.hxx>
19 //============================================================================
21 * Purpose : Affect a value to the basic attribute
23 //============================================================================
24 void SALOMEDS_AttReal_i::Set(CORBA::Double r)
27 TDataStd_Real::Set (_Lab,r);
30 //============================================================================
32 * Purpose : Get basic attribute's value
34 //============================================================================
35 CORBA::Double SALOMEDS_AttReal_i::Get()
37 Handle(TDataStd_Real) Att;
39 if (_Lab.FindAttribute(TDataStd_Real::GetID(),Att))
44 //============================================================================
48 //============================================================================
49 char* SALOMEDS_AttReal_i::Save()
51 BEGIN_OF("SALOMEDS_AttReal_i::Save");
52 CORBA::Double x = this->Get();
53 char* out= new char[12];
58 //============================================================================
62 //============================================================================
63 void SALOMEDS_AttReal_i::Load()
65 BEGIN_OF("SALOMEDS_AttReal_i::Load");
68 //============================================================================
70 * Purpose : return sobject associated to the basic attribute (if exist)
72 //============================================================================
73 CORBA::Boolean SALOMEDS_AttReal_i::GetPtr(SALOMEDS::SObject_ptr anObject)
75 Handle(TDataStd_Real) Att;
76 return _Lab.FindAttribute(TDataStd_Real::GetID(),Att);
79 //============================================================================
80 /*! Function : GetType
83 //============================================================================
84 char* SALOMEDS_AttReal_i::GetType()
86 return CORBA::string_dup(_type);