Ignore:
Timestamp:
Apr 7, 2011, 12:39:27 PM (10 years ago)
Author:
tbretz
Message:
Implemented event description into all kind of events.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventImp.h

    r10295 r10299  
    1414    std::vector<int> fAllowedStates; /// List of states in which this event is allowed
    1515
    16     std::string      fDescription;   /// A human readable description of the event
    17 
    1816    /// http://www.boost.org/doc/libs/1_45_0/libs/bind/bind.html
    1917    boost::function<int(const EventImp &)> fFunction;
     
    2624
    2725    // Description
    28     EventImp &SetDescription(const std::string &str) { fDescription=str; return *this; }
     26    virtual void SetDescription(const std::string &) { }
     27    virtual std::string GetDescription() const { return ""; }
    2928
    3029    // Function handling
     
    3534    // Configuration helper
    3635    EventImp &operator()(boost::function<int(const EventImp &)> func) { return AssignFunction(func); }
    37     EventImp &operator()(const std::string str) { return SetDescription(str); }
    38     EventImp &operator()(const char *str) { return SetDescription(str); }
     36    EventImp &operator()(const std::string str) { SetDescription(str); return *this; }
     37    EventImp &operator()(const char *str) { SetDescription(str); return *this; }
    3938
    4039    // Print contents
Note: See TracChangeset for help on using the changeset viewer.