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
}