Changeset 11302


Ignore:
Timestamp:
07/08/11 16:10:20 (13 years ago)
Author:
tbretz
Message:
Added PrintListOfAllowedEvents
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r11287 r11302  
    416416// --------------------------------------------------------------------------
    417417//
     418//! Call for each event in fListEvents its Print function with the given
     419//! stream if it is an allowed event in the current state.
     420//!
     421//! @param out
     422//!    ostream to which the output should be redirected
     423//!
     424//
     425void StateMachineImp::PrintListOfAllowedEvents(ostream &out) const
     426{
     427    for (vector<EventImp*>::const_iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
     428        if ((*c)->IsStateAllowed(fCurrentState))
     429            (*c)->Print(out, true);
     430}
     431
     432// --------------------------------------------------------------------------
     433//
    418434//! Call PrintListOfEvents with fOut as the output stream
    419435//!
  • trunk/FACT++/src/StateMachineImp.h

    r11288 r11302  
    127127    void PrintListOfEvents(const std::string &str="") const;
    128128
     129    void PrintListOfAllowedEvents(std::ostream &out) const;
     130    void PrintListOfAllowedEvents() const;
     131
    129132    void PrintListOfStates(std::ostream &out) const;
    130133    void PrintListOfStates() const;
Note: See TracChangeset for help on using the changeset viewer.