Changeset 10371 for trunk/FACT++/src
- Timestamp:
- 04/15/11 22:59:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventImp.h
r10299 r10371 28 28 29 29 // Function handling 30 EventImp &AssignFunction( boost::function<int(const EventImp &)>func) { fFunction = func; return *this; }30 EventImp &AssignFunction(const boost::function<int(const EventImp &)> &func) { fFunction = func; return *this; } 31 31 bool HasFunc() const { return !fFunction.empty(); } 32 32 int ExecFunc() const { return HasFunc() ? fFunction(*this) : -1; } 33 33 34 34 // Configuration helper 35 EventImp &operator()( boost::function<int(const EventImp &)>func) { return AssignFunction(func); }35 EventImp &operator()(const boost::function<int(const EventImp &)> &func) { return AssignFunction(func); } 36 36 EventImp &operator()(const std::string str) { SetDescription(str); return *this; } 37 37 EventImp &operator()(const char *str) { SetDescription(str); return *this; }
Note:
See TracChangeset
for help on using the changeset viewer.