1 // File: Model_Object.cpp
2 // Created: 19 May 2014
3 // Author: Mikhail PONIKAROV
5 #include "Model_Object.h"
6 #include <TCollection_AsciiString.hxx>
7 #include "Model_Events.h"
8 #include <Events_Loop.h>
10 boost::shared_ptr<ModelAPI_Feature> Model_Object::featureRef()
15 std::string Model_Object::getName()
17 return TCollection_AsciiString(myName->Get()).ToCString();
20 void Model_Object::setName(std::string theName)
22 if (myName->Get() != theName.c_str()) {
23 myName->Set(theName.c_str());
25 static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
26 Model_FeatureUpdatedMessage aMsg(boost::shared_ptr<ModelAPI_Object>(this), anEvent);
27 Events_Loop::loop()->send(aMsg, false);
32 Model_Object::Model_Object(boost::shared_ptr<ModelAPI_Feature> theRef,
33 Handle_TDataStd_Name theName)
34 : myRef(theRef), myName(theName)