Changeset 10423 for trunk


Ignore:
Timestamp:
04/20/11 15:22:38 (14 years ago)
Author:
tbretz
Message:
Added boolean option to Print to suppress the SERVER name if any.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r10332 r10423  
    195195//!    An ostream to which the output should be redirected.
    196196//!
    197 void EventImp::Print(ostream &out) const
     197void EventImp::Print(ostream &out, bool strip) const
    198198{
    199199    out << " \xc2\xb7 ";
     
    201201    const string str = GetName();
    202202    if (!str.empty())
    203         out << kBold << str;
     203        out << kBold << str.substr(strip?str.find_first_of('/')+1:0);
    204204
    205205    const string fmt = GetFormat();
     
    264264//! Calls Print(std::cout)
    265265//
    266 void EventImp::Print() const
    267 {
    268     Print(cout);
    269 }
     266void EventImp::Print(bool strip) const
     267{
     268    Print(cout, strip);
     269}
  • trunk/FACT++/src/EventImp.h

    r10371 r10423  
    1010
    1111class EventImp
    12 {
    13     int              fTargetState;   /// Target state of an event
     12{   int              fTargetState;   /// Target state of an event
    1413    std::vector<int> fAllowedStates; /// List of states in which this event is allowed
    1514
     
    3837
    3938    // Print contents
    40     virtual void Print(std::ostream &out) const;
    41     virtual void Print() const;
     39    virtual void Print(std::ostream &out, bool strip=false) const;
     40    virtual void Print(bool strip=false) const;
    4241
    4342    // Handling of the states
Note: See TracChangeset for help on using the changeset viewer.