Changeset 13948 for trunk/FACT++/src


Ignore:
Timestamp:
05/28/12 10:45:17 (12 years ago)
Author:
tbretz
Message:
Revised the order of callback etc.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DimState.h

    r13906 r13948  
    3737    }
    3838
    39     virtual void Handler(const EventImp &evt)
     39    void HandlerImp(const EventImp &evt)
    4040    {
    4141        const bool disconnected = evt.GetSize()==0;
     
    4444
    4545        msg = disconnected ? "" : evt.GetString();
    46 
     46    }
     47
     48    void Callback(const EventImp &evt)
     49    {
    4750        if (fCallback)
    4851            fCallback(evt);
    4952    }
     53
     54    virtual void Handler(const EventImp &evt)
     55    {
     56        HandlerImp(evt);
     57        Callback(evt);
     58    }
     59
    5060
    5161    const Time &time() const { return info.first; }
     
    127137    void Handler(const EventImp &evt)
    128138    {
    129         DimState::Handler(evt);
     139        HandlerImp(evt);
    130140
    131141        info.second = evt.GetSize()==4 ? evt.GetInt() : -256;
    132142        if (info.second==0)
    133143            info.second=-256;
     144
     145        Callback(evt);
    134146    }
    135147
     
    168180    void Handler(const EventImp &evt)
    169181    {
    170         DimState::Handler(evt);
     182        HandlerImp(evt);
    171183
    172184        shortmsg    = msg;
     
    197209        shortmsg.erase(p0, p3-p0);
    198210
     211        Callback(evt);
     212
    199213        const auto func = fCallbacks.find(file);
    200214        if (func==fCallbacks.end())
Note: See TracChangeset for help on using the changeset viewer.