const std::shared_ptr<ModelHighAPI_Interface> & theValue)
: myObject(std::shared_ptr<ModelAPI_Object>(theValue->defaultResult()))
{
+ // the result is not constructed yet, forcibly do it
+ if (!myObject) {
+ theValue->execute(true);
+ myObject = std::shared_ptr<ModelAPI_Object>(theValue->defaultResult());
+ }
}
ModelHighAPI_Reference::~ModelHighAPI_Reference()
{
theAttribute->append(myObject);
}
+
+//--------------------------------------------------------------------------------------
+std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Reference::feature() const
+{
+ return ModelAPI_Feature::feature(myObject);
+}