Changeset 14002 for trunk/FACT++
- Timestamp:
- 05/31/12 16:45:52 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Event.h
r13831 r14002 18 18 public: 19 19 /// Constructs an event as a combination of an EventImp and a DimCommand 20 Event(const std::string &name, const char *fmt="");20 Event(const std::string &name, const std::string &fmt=""); 21 21 /// Copy constructor 22 22 Event(const EventImp &imp); 23 Event(const EventImp &imp, const char * name, size_t siz);23 Event(const EventImp &imp, const char *ptr, size_t siz); 24 24 25 25 void SetDescription(const std::string &str) { fDescription=str; } … … 53 53 void SetText(const char *txt) { SetData(txt, strlen(txt)+1); } 54 54 void SetString(const std::string &str) { SetData(str.c_str(), str.length()+1); } 55 56 55 }; 57 56 -
trunk/FACT++/src/StateMachine.cc
r13837 r14002 37 37 //! For parameter description see StateMachineImp. 38 38 //! 39 EventImp *StateMachine::CreateEvent(const char *name, const char *fmt)39 EventImp *StateMachine::CreateEvent(const string &name, const string &fmt) 40 40 { 41 return new Event( (GetName()+'/'+name).c_str(), fmt);41 return new Event(GetName()+'/'+name, fmt); 42 42 } 43 43 -
trunk/FACT++/src/StateMachine.h
r13837 r14002 7 7 { 8 8 protected: 9 EventImp *CreateEvent(const char *name, const char *fmt);9 EventImp *CreateEvent(const std::string &name, const std::string &fmt); 10 10 11 11 public: -
trunk/FACT++/src/StateMachineDim.cc
r13835 r14002 82 82 //! For parameter description see StateMachineImp. 83 83 //! 84 EventImp *StateMachineDim::CreateEvent(const char *name, const char *fmt)84 EventImp *StateMachineDim::CreateEvent(const string &name, const string &fmt) 85 85 { 86 86 return new EventDim(GetName()+"/"+name, fmt, this); 87 87 } 88 88 89 EventImp *StateMachineDim::CreateService(const char *name)89 EventImp *StateMachineDim::CreateService(const string &name) 90 90 { 91 91 return new ServiceDim(name, this); -
trunk/FACT++/src/StateMachineDim.h
r13835 r14002 68 68 void infoHandler(); /// Overwritten DimInfo::infoHandler 69 69 70 EventImp *CreateEvent(const char *name, const char *fmt);71 EventImp *CreateService(const char *name);70 EventImp *CreateEvent(const std::string &name, const std::string &fmt); 71 EventImp *CreateService(const std::string &name); 72 72 73 73 protected: -
trunk/FACT++/src/StateMachineImp.cc
r13951 r14002 604 604 } 605 605 606 EventImp *StateMachineImp::CreateService(const char *)606 EventImp *StateMachineImp::CreateService(const string &) 607 607 { 608 608 return new EventImp(); … … 611 611 // -------------------------------------------------------------------------- 612 612 // 613 EventImp &StateMachineImp::Subscribe(const char *name)613 EventImp &StateMachineImp::Subscribe(const string &name) 614 614 { 615 615 EventImp *evt = CreateService(name); -
trunk/FACT++/src/StateMachineImp.h
r13951 r14002 54 54 bool HandleNewState(int newstate, const EventImp *evt, const char *txt); 55 55 56 virtual EventImp *CreateEvent(const char *name, const char *fmt) = 0;57 virtual EventImp *CreateService(const char *);56 virtual EventImp *CreateEvent(const std::string &name, const std::string &fmt) = 0; 57 virtual EventImp *CreateService(const std::string &); 58 58 59 59 /// Is called continously to execute actions in the current state … … 100 100 const std::string &GetName() const { return fName; } 101 101 102 EventImp &Subscribe(const char *name);102 EventImp &Subscribe(const std::string &name); 103 103 104 104 /// return the current state of the machine
Note:
See TracChangeset
for help on using the changeset viewer.