Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / Model / Model_AttributeDouble.cpp
1 // File:        ModelAPI_AttributeDouble.cxx
2 // Created:     2 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #include "Model_AttributeDouble.h"
6
7 using namespace std;
8
9 void Model_AttributeDouble::setValue(const double theValue)
10 {
11   myReal->Set(theValue);
12 }
13
14 double Model_AttributeDouble::value()
15 {
16   return myReal->Get();
17 }
18
19 Model_AttributeDouble::Model_AttributeDouble(TDF_Label& theLabel)
20 {
21   // check the attribute could be already presented in this doc (after load document)
22   if (!theLabel.FindAttribute(TDataStd_Real::GetID(), myReal)) {
23     // create attribute: not initialized by value yet, just zero
24     myReal = TDataStd_Real::Set(theLabel, 0.);
25   }
26 }