2 // File : SALOMEDS_AttLong_i.cxx
3 // Created : Mon Jun 10 10:54:58 CEST 2002
4 // Author : Estelle Deville
8 // Copyright : CEA 2002
13 #include "SALOMEDS_AttLong_i.hxx"
14 #include "utilities.h"
15 #include <TDF_Tool.hxx>
18 //============================================================================
20 * Purpose : Affect a value to the basic attribute
22 //============================================================================
23 void SALOMEDS_AttLong_i::Set(CORBA::Long i)
26 TDataStd_Integer::Set (_Lab,i);
29 //============================================================================
31 * Purpose : Get basic attribute's value
33 //============================================================================
34 CORBA::Long SALOMEDS_AttLong_i::Get()
36 Handle(TDataStd_Integer) Att;
38 if (_Lab.FindAttribute(TDataStd_Integer::GetID(),Att))
43 //============================================================================
47 //============================================================================
48 char* SALOMEDS_AttLong_i::Save()
50 BEGIN_OF("SALOMEDS_AttLong_i::Save");
51 CORBA::Long x = this->Get();
52 char* out= new char[12];
57 //============================================================================
61 //============================================================================
62 void SALOMEDS_AttLong_i::Load()
64 BEGIN_OF("SALOMEDS_AttLong_i::Load");
67 //============================================================================
69 * Purpose : return sobject associated to the basic attribute (if exist)
71 //============================================================================
72 CORBA::Boolean SALOMEDS_AttLong_i::GetPtr(SALOMEDS::SObject_ptr anObject)
74 Handle(TDataStd_Integer) Att;
75 return _Lab.FindAttribute(TDataStd_Integer::GetID(),Att);
78 //============================================================================
79 /*! Function : GetType
82 //============================================================================
83 char* SALOMEDS_AttLong_i::GetType()
85 return CORBA::string_dup(_type);