Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / Model / Model_ResultPart.cpp
1 // File:        ModelAPI_ResultPart.cpp
2 // Created:     07 Jul 2014
3 // Author:      Mikhail PONIKAROV
4
5 #include <Model_ResultPart.h>
6 #include <ModelAPI_Data.h>
7 #include <ModelAPI_AttributeDocRef.h>
8
9 boost::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
10 {
11   return data()->docRef("PartDocument")->value();
12 }
13
14 boost::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
15 {
16   return boost::shared_ptr<ModelAPI_Feature>();  // return empty pointer
17 }
18
19 Model_ResultPart::Model_ResultPart()
20 {
21 }
22
23 void Model_ResultPart::setData(boost::shared_ptr<ModelAPI_Data> theData)
24 {
25   ModelAPI_Result::setData(theData);
26   if (theData) {
27     data()->addAttribute(DOC_REF(), ModelAPI_AttributeDocRef::type());
28   }
29 }