}
}
-boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::docRef(const std::string& theID)
+boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::document(const std::string& theID)
{
std::map<std::string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
/// Defines the name of the feature visible by the user in the object browser
MODEL_EXPORT virtual void setName(const std::string& theName);
/// Returns the attribute that references to another document
- MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string& theID);
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID);
/// Returns the attribute that contains real value with double precision
MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID);
/// Returns the attribute that contains integer value
boost::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
{
- return data()->docRef("PartDocument")->value();
+ return data()->document("PartDocument")->value();
}
boost::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
void Model_ResultPart::activate()
{
- boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->docRef(DOC_REF());
+ boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
if (!aDocRef->value()) { // create (or open) a document if it is not yet created
boost::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
virtual void setName(const std::string& theName) = 0;
/// Returns the attribute that references to another document
- virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string& theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeDocRef> document(const std::string& theID) = 0;
/// Returns the attribute that contains real value with double precision
virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID) = 0;
/// Returns the attribute that contains integer value
for (int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
aSource = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(aRoot->object(getGroup(), a));
if (aSource && aSource->data()
- && aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value()
+ && aSource->data()->document(ModelAPI_ResultPart::DOC_REF())->value()
== aPManager->activeDocument())
break;
aSource.reset();
}
if (aSource) {
boost::shared_ptr<ModelAPI_Document> aCopy = aPManager->copy(
- aSource->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value(), data()->name());
+ aSource->data()->document(ModelAPI_ResultPart::DOC_REF())->value(), data()->name());
data()->refattr(ORIGIN_REF())->setObject(aSource);
}
}
ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(
aRoot->object(ModelAPI_ResultPart::group(), a));
if (aPart
- && aPart->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value()
+ && aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()
== aPManager->activeDocument()) {
FeaturePtr aFeature = aRoot->feature(aPart);
if (aFeature) {
// do remove
- aPart->data()->docRef(ModelAPI_ResultPart::DOC_REF())->value()->close();
+ aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()->close();
aRoot->removeFeature(aFeature);
}
}