Changeset 14005 for trunk/FACT++/src


Ignore:
Timestamp:
05/31/12 17:02:48 (12 years ago)
Author:
tbretz
Message:
replaced more 'const char *' by std::string& 
Location:
trunk/FACT++/src
Files:
4 edited

Legend:

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

    r13908 r14005  
    149149//!    no real consistency check is done.
    150150//
    151 void EventImp::AddAllowedStates(const char *states)
     151void EventImp::AddAllowedStates(const string &states)
    152152{
    153153    stringstream stream(states);
  • trunk/FACT++/src/EventImp.h

    r13830 r14005  
    4444    // Handling of the states
    4545    void AddAllowedState(int state);
    46     void AddAllowedStates(const char *states);
     46    void AddAllowedStates(const std::string &states);
    4747
    4848    bool IsStateAllowed(int state) const;
  • trunk/FACT++/src/StateMachineImp.cc

    r14002 r14005  
    503503//!    true if the event was found, false otherwise
    504504//
    505 EventImp *StateMachineImp::FindEvent(const std::string &evt) const
     505EventImp *StateMachineImp::FindEvent(const string &evt) const
    506506{
    507507    // Find the command from the list of commands and queue it
     
    537537//!    received commands is properly extracted. No check is done.
    538538//
    539 EventImp &StateMachineImp::AddEvent(const char *name, const char *states, const char *fmt)
     539EventImp &StateMachineImp::AddEvent(const string &name, const string &states, const string &fmt)
    540540{
    541541    EventImp *evt = CreateEvent(name, fmt);
     
    569569//!    by this command.
    570570//
    571 EventImp &StateMachineImp::AddEvent(const char *name, int s1, int s2, int s3, int s4, int s5)
     571EventImp &StateMachineImp::AddEvent(const string &name, int s1, int s2, int s3, int s4, int s5)
    572572{
    573573    ostringstream str;
    574574    str << s1 << ' '  << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5;
    575     return AddEvent(name, str.str().c_str(), "");
     575    return AddEvent(name, str.str(), "");
    576576}
    577577
     
    597597//!    by this command.
    598598//
    599 EventImp &StateMachineImp::AddEvent(const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
     599EventImp &StateMachineImp::AddEvent(const string &name, const string &fmt, int s1, int s2, int s3, int s4, int s5)
    600600{
    601601    ostringstream str;
    602602    str << s1 << ' '  << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5;
    603     return AddEvent(name, str.str().c_str(), fmt);
     603    return AddEvent(name, str.str(), fmt);
    604604}
    605605
  • trunk/FACT++/src/StateMachineImp.h

    r14002 r14005  
    8181    virtual std::string SetCurrentState(int state, const char *txt="", const std::string &cmd="");
    8282
    83     EventImp &AddEvent(const char *name, const char *states, const char *fmt);
    84     EventImp &AddEvent(const char *name, int s1=-1, int s2=-1, int s3=-1, int s4=-1, int s5=-1);
    85     EventImp &AddEvent(const char *name, const char *fmt, int s1=-1, int s2=-1, int s3=-1, int s4=-1, int s5=-1);
     83    EventImp &AddEvent(const std::string &name, const std::string &states, const std::string &fmt);
     84    EventImp &AddEvent(const std::string &name, int s1=-1, int s2=-1, int s3=-1, int s4=-1, int s5=-1);
     85    EventImp &AddEvent(const std::string &name, const std::string &fmt, int s1=-1, int s2=-1, int s3=-1, int s4=-1, int s5=-1);
    8686
    8787    virtual void AddStateName(const int state, const std::string &name, const std::string &doc="");
Note: See TracChangeset for help on using the changeset viewer.