]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSetPlugin/PartSetPlugin_Duplicate.cpp
Salome HOME
Refactoring: static constants are replaced by inline functions in:
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Duplicate.cpp
index 9b6a47e162bf23a009d2b01782f5de71d035678c..726f6487b7a1d8810b02219b4885fb3efd9669aa 100644 (file)
@@ -17,9 +17,9 @@ PartSetPlugin_Duplicate::PartSetPlugin_Duplicate()
 void PartSetPlugin_Duplicate::initAttributes()
 {
   PartSetPlugin_Part::initAttributes();
-  data()->addAttribute(PART_DUPLICATE_ATTR_REF, ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(PartSetPlugin_Duplicate::DOC_REF(), ModelAPI_AttributeRefAttr::type());
 
-  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = data()->refattr(PART_DUPLICATE_ATTR_REF);
+  boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef = data()->refattr(PartSetPlugin_Duplicate::DOC_REF());
   if (!aRef->attr()) { // create a copy: if not created yet attribute is not initialized
     boost::shared_ptr<ModelAPI_PluginManager> aPManager = ModelAPI_PluginManager::get();
     boost::shared_ptr<ModelAPI_Document> aRoot = aPManager->rootDocument();
@@ -27,13 +27,13 @@ void PartSetPlugin_Duplicate::initAttributes()
     for(int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
       aSource = boost::dynamic_pointer_cast<PartSetPlugin_Part>(
         aRoot->feature(getGroup(), a, true));
-      if (aSource->data()->docRef(PART_ATTR_DOC_REF)->value() == aPManager->currentDocument())
+      if (aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value() == aPManager->currentDocument())
         break;
       aSource.reset();
     }
     if (aSource) {
       boost::shared_ptr<ModelAPI_Document> aCopy = 
-        aPManager->copy(aSource->data()->docRef(PART_ATTR_DOC_REF)->value(), data()->getName());
+        aPManager->copy(aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value(), data()->getName());
       aRef->setFeature(aSource);
     }
   }