Changeset 10344


Ignore:
Timestamp:
Apr 10, 2011, 10:16:21 AM (9 years ago)
Author:
tbretz
Message:
Added arguments to PrintListOfEvents.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r10327 r10344  
    363363//! @param out
    364364//!    ostream to which the output should be redirected
    365 //
    366 void StateMachineImp::PrintListOfEvents(std::ostream &out) const
     365//!
     366//! @param evt
     367//!    if given only the given event is selected
     368//
     369void StateMachineImp::PrintListOfEvents(ostream &out, const string &evt) const
    367370{
    368371    for (vector<EventImp*>::const_iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
    369         (*c)->Print(out);
     372        if (evt.empty() || GetName()+'/'+evt==(*c)->GetName())
     373            (*c)->Print(out);
    370374}
    371375
     
    373377//
    374378//! Call PrintListOfEvents with fOut as the output stream
    375 //
    376 void StateMachineImp::PrintListOfEvents() const
    377 {
    378     PrintListOfEvents(Out());
     379//!
     380//! @param str
     381//!    if given only the given event is selected
     382//
     383//
     384void StateMachineImp::PrintListOfEvents(const string &str) const
     385{
     386    PrintListOfEvents(Out(), str);
    379387}
    380388
     
    658666//! @param name
    659667//!    A name which should be assigned to the state, e.g. "Tracking"
     668//!
     669//! @param doc
     670//!    A explanatory text describing the state
    660671//!
    661672//! @todo  FIX THE DOCU
  • trunk/FACT++/src/StateMachineImp.h

    r10314 r10344  
    119119    const std::vector<std::string> GetEventNames() const;
    120120
    121     void PrintListOfEvents(std::ostream &out) const;
    122     void PrintListOfEvents() const;
     121    void PrintListOfEvents(std::ostream &out, const std::string &evt="") const;
     122    void PrintListOfEvents(const std::string &evt="") const;
    123123
    124124    void PrintListOfStates(std::ostream &out) const;
Note: See TracChangeset for help on using the changeset viewer.