Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcEventHandler.cpp

    r1573 r1943  
    102102}
    103103
     104//-------------------------------------------------------------------
     105// event() -- return the action for an event.
     106//-------------------------------------------------------------------
     107
     108CbcEventHandler::CbcAction CbcEventHandler::event(CbcEvent event,
     109                                                  void * /*data*/)
     110/*
     111  If an event/action map exists and contains an entry for the event, return it.
     112  Otherwise return the default action.
     113*/
     114{
     115    if (eaMap_ != 0) {
     116        eaMapPair::iterator entry = eaMap_->find(event) ;
     117        if (entry != eaMap_->end()) {
     118            return (entry->second) ;
     119        } else {
     120            return (dfltAction_) ;
     121        }
     122    } else {
     123        return (dfltAction_) ;
     124    }
     125}
     126
Note: See TracChangeset for help on using the changeset viewer.