Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / Model / Model_Data.cpp
index a9ac29bf05dc6d9303df6c33972a99b63a89fb58..87c7be8672fda2dfa7b0a6b7c95ad461598d2bbc 100644 (file)
@@ -41,35 +41,35 @@ void Model_Data::addAttribute(string theID, string theAttrType)
     anAttr = new Model_AttributeDouble(anAttrLab);
 
   if (anAttr)
-    myAttrs[theID] = std::shared_ptr<ModelAPI_Attribute>(anAttr);
+    myAttrs[theID] = boost::shared_ptr<ModelAPI_Attribute>(anAttr);
   else
     ; // TODO: generate error on unknown attribute request and/or add mechanism for customization
 }
 
-shared_ptr<ModelAPI_AttributeDocRef> Model_Data::docRef(const string theID)
+boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::docRef(const string theID)
 {
-  map<string, shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
+  map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return std::shared_ptr<ModelAPI_AttributeDocRef>();
+    return boost::shared_ptr<ModelAPI_AttributeDocRef>();
   }
-  shared_ptr<ModelAPI_AttributeDocRef> aRes = 
-    dynamic_pointer_cast<ModelAPI_AttributeDocRef>(aFound->second);
+  boost::shared_ptr<ModelAPI_AttributeDocRef> aRes = 
+    boost::dynamic_pointer_cast<ModelAPI_AttributeDocRef>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
   }
   return aRes;
 }
 
-shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const string theID)
+boost::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const string theID)
 {
-  map<string, shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
+  map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
   if (aFound == myAttrs.end()) {
     // TODO: generate error on unknown attribute request and/or add mechanism for customization
-    return std::shared_ptr<ModelAPI_AttributeDouble>();
+    return boost::shared_ptr<ModelAPI_AttributeDouble>();
   }
-  shared_ptr<ModelAPI_AttributeDouble> aRes = 
-    dynamic_pointer_cast<ModelAPI_AttributeDouble>(aFound->second);
+  boost::shared_ptr<ModelAPI_AttributeDouble> aRes = 
+    boost::dynamic_pointer_cast<ModelAPI_AttributeDouble>(aFound->second);
   if (!aRes) {
     // TODO: generate error on invalid attribute type request
   }