Ignore:
Timestamp:
Apr 7, 2011, 3:46:15 PM (9 years ago)
Author:
tbretz
Message:
Added typedef for StateNames; changed the getter such that they can now be declared const.
File:
1 edited

Legend:

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

    r10294 r10309  
    3131    int fCurrentState;   /// Current state of the state machine
    3232
     33    typedef std::map<const int, std::pair<std::string, std::string>> StateNames;
     34
    3335    /// Human readable names associated with the states
    34     std::map<const int, std::pair<std::string, std::string>> fStateNames;
     36    StateNames fStateNames;
    3537
    3638    std::vector<EventImp*> fListOfEvents; /// List of available commands as setup by user
     
    121123
    122124
    123     const std::string GetStateName(int state) /*const*/;
    124     const std::string GetStateName() { return GetStateName(fCurrentState); }
    125 
    126     const std::string GetStateDesc(int state) /*const*/;
    127     const std::string GetStateDesc() { return GetStateDesc(fCurrentState); }
    128 
    129     const std::string GetStateDescription(int state) /*const*/;
    130     const std::string GetStateDescription() { return GetStateDescription(fCurrentState); }
     125    const std::string GetStateName(int state) const;
     126    const std::string GetStateName() const { return GetStateName(fCurrentState); }
     127
     128    const std::string GetStateDesc(int state) const;
     129    const std::string GetStateDesc() const { return GetStateDesc(fCurrentState); }
     130
     131    const std::string GetStateDescription(int state) const;
     132    const std::string GetStateDescription() const { return GetStateDescription(fCurrentState); }
    131133};
    132134
Note: See TracChangeset for help on using the changeset viewer.