//---------------------------------------------------------------------------- // Dr.Frucht Systems Ltd. // Copyright © 2000-2016. All Rights Reserved. // Version 2.0 3/30/2016 // Last modification: 3/30/2016 // PROJECT: // SUBSYSTEM: // FILE: basicLogEngine.cpp // AUTHOR: gagua // OVERVIEW // ~~~~~~~~ // Header file of basicLogEngine.cpp //---------------------------------------------------------------------------- // #include "basicLogEngine.h" basicLogEngine * basicLogEngine::_instance = 0; /** * Returns the single instance of the object. */ basicLogEngine * basicLogEngine::getInstance() { // check if the instance has been created yet if (0 == _instance) { // if not, then create it _instance = new basicLogEngine; } // return the single instance return _instance; } bool basicLogEngine::attach(basicEvtDispatcher * EvtDsp) { m_vpDispatcherQueue.push_back(EvtDsp); } void basicLogEngine::logEvt(basicEvent * Evt) { for (pDispatcherQueue::iterator currentDispatcher = m_vpDispatcherQueue.begin(); currentDispatcher < m_vpDispatcherQueue.end(); currentDispatcher++) { (*currentDispatcher)->dispatch(Evt); }; }