Ignore:
Timestamp:
05/12/11 21:52:22 (14 years ago)
Author:
tbretz
Message:
Renamed AddConfiguration and AddTransition to AddEvent
File:
1 edited

Legend:

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

    r10657 r10688  
    109109//! Subsequent, i.e. derived classes should setup all allowed state
    110110//! transitions as well as all allowed configuration event by
    111 //! AddTransition, AddConfiguration and AddStateName.
     111//! AddEvent and AddStateName.
    112112//!
    113113//! @param out
     
    492492//!    greater or equal zero. A negative target state is used to flag
    493493//!    commands which do not initiate a state transition. If this is
    494 //!    desired use AddConfiguration instead.
     494//!    desired use AddEvent instead.
    495495//!
    496496//! @param name
     
    523523//!    greater or equal zero. A negative target state is used to flag
    524524//!    commands which do not initiate a state transition. If this is
    525 //!    desired use AddConfiguration instead.
     525//!    desired use AddEvent instead.
    526526//!
    527527//! @param name
     
    540540//!    received commands is properly extracted. No check is done.
    541541//
    542 EventImp &StateMachineImp::AddTransition(int targetstate, const char *name, const char *states, const char *fmt)
     542EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, const char *states, const char *fmt)
    543543{
    544544    EventImp *evt = CreateEvent(targetstate, name, fmt);
     
    564564//!    greater or equal zero. A negative target state is used to flag
    565565//!    commands which do not initiate a state transition. If this is
    566 //!    desired use AddConfiguration instead.
     566//!    desired use AddEvent instead.
    567567//!
    568568//! @param name
     
    575575//!    by this command.
    576576//
    577 EventImp &StateMachineImp::AddTransition(int targetstate, const char *name, int s1, int s2, int s3, int s4, int s5)
     577EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, int s1, int s2, int s3, int s4, int s5)
    578578{
    579579    ostringstream str;
    580580    str << s1 << ' '  << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5;
    581     return AddTransition(targetstate, name, str.str().c_str(), "");
     581    return AddEvent(targetstate, name, str.str().c_str(), "");
    582582}
    583583
     
    592592//!    greater or equal zero. A negative target state is used to flag
    593593//!    commands which do not initiate a state transition. If this is
    594 //!    desired use AddConfiguration instead.
     594//!    desired use AddEvent instead.
    595595//!
    596596//! @param name
     
    609609//!    by this command.
    610610//
    611 EventImp &StateMachineImp::AddTransition(int targetstate, const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
     611EventImp &StateMachineImp::AddEvent(int targetstate, const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
    612612{
    613613    ostringstream str;
    614614    str << s1 << ' '  << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5;
    615     return AddTransition(targetstate, name, str.str().c_str(), fmt);
    616 }
    617 
    618 // --------------------------------------------------------------------------
    619 //
    620 //! This function calls AddTransition with a target-state of -1 which means
     615    return AddEvent(targetstate, name, str.str().c_str(), fmt);
     616}
     617
     618// --------------------------------------------------------------------------
     619//
     620//! This function calls AddEvent with a target-state of -1 which means
    621621//! that the command will not change the state at all. This shell be used
    622 //! for configuration commands. As well as in AddTransition the states in
     622//! for configuration commands. As well as in AddEvent the states in
    623623//! which such a configuration command is accepted can be given.
    624624//!
     
    638638//!    received commands is properly extracted. No check is done.
    639639//!
    640 EventImp &StateMachineImp::AddConfiguration(const char *name, const char *states, const char *fmt)
    641 {
    642     return AddTransition(-1, name, states, fmt);
    643 }
    644 
    645 // --------------------------------------------------------------------------
    646 //
    647 //! This function calls AddTransition with a target-state of -1 which means
     640EventImp &StateMachineImp::AddEvent(const char *name, const char *states, const char *fmt)
     641{
     642    return AddEvent(-1, name, states, fmt);
     643}
     644
     645// --------------------------------------------------------------------------
     646//
     647//! This function calls AddEvent with a target-state of -1 which means
    648648//! that the command will not change the state at all. This shell be used
    649 //! for configuration commands. As well as in AddTransition the states in
     649//! for configuration commands. As well as in AddEvent the states in
    650650//! which such a configuration command is accepted can be given.
    651651//!
     
    659659//!    by this command.
    660660//
    661 EventImp &StateMachineImp::AddConfiguration(const char *name, int s1, int s2, int s3, int s4, int s5)
    662 {
    663     return AddTransition(-1, name, s1, s2, s3, s4, s5);
    664 }
    665 
    666 // --------------------------------------------------------------------------
    667 //
    668 //! This function calls AddTransition with a target-state of -1 which means
     661EventImp &StateMachineImp::AddEvent(const char *name, int s1, int s2, int s3, int s4, int s5)
     662{
     663    return AddEvent(-1, name, s1, s2, s3, s4, s5);
     664}
     665
     666// --------------------------------------------------------------------------
     667//
     668//! This function calls AddEvent with a target-state of -1 which means
    669669//! that the command will not change the state at all. This shell be used
    670 //! for configuration commands. As well as in AddTransition the states in
     670//! for configuration commands. As well as in AddEvent the states in
    671671//! which such a configuration command is accepted can be given.
    672672//!
     
    686686//!    by this command.
    687687//
    688 EventImp &StateMachineImp::AddConfiguration(const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
    689 {
    690     return AddTransition(-1, name, fmt, s1, s2, s3, s4, s5);
     688EventImp &StateMachineImp::AddEvent(const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
     689{
     690    return AddEvent(-1, name, fmt, s1, s2, s3, s4, s5);
    691691}
    692692
Note: See TracChangeset for help on using the changeset viewer.