]> SALOME platform Git repositories - modules/shaper.git/blob - src/Model/Model_Object.cpp
Salome HOME
Intermediate changes for sketch builder
[modules/shaper.git] / src / Model / Model_Object.cpp
1 // File:        Model_Object.cpp
2 // Created:     19 May 2014
3 // Author:      Mikhail PONIKAROV
4
5 #include "Model_Object.h"
6 #include <TCollection_AsciiString.hxx>
7 #include "Model_Events.h"
8 #include <Events_Loop.h>
9
10 boost::shared_ptr<ModelAPI_Feature> Model_Object::featureRef()
11 {
12   return myRef;
13 }
14
15 std::string Model_Object::getName()
16 {
17   return TCollection_AsciiString(myName->Get()).ToCString();
18 }
19
20 void Model_Object::setName(std::string theName)
21 {
22   if (myName->Get() != theName.c_str()) {
23     myName->Set(theName.c_str());
24     /*
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);
28     */
29   }
30 }
31
32 Model_Object::Model_Object(boost::shared_ptr<ModelAPI_Feature> theRef,
33                            Handle_TDataStd_Name theName)
34                            : myRef(theRef), myName(theName)
35 {
36 }