#include <cassert>
#include <config/xf-config.h>

#if (USE_XF_COMMON_DISPATCHER_CLASS != 0)
#if defined(XF_TRACE_EVENT_PUSH_POP) && (XF_TRACE_EVENT_PUSH_POP != 0)
    #include "trace/trace.h"
#endif // XF_TRACE_EVENT_PUSH_POP
#include "xf/interface/timeoutmanager.h"
#include "xf/interface/behavior.h"
#include "xf/interface/mutex.h"
#include "dispatcher.h"

using interface::XFTimeoutManager;      // Allows to use expression 'XFTimeoutManager' instead of 'interface::XFTimeoutManager'.
using interface::XFBehavior;            // Expression XFBehavior used in code below is in fact the XFBehavior interface class.
using Mutex = interface::XFMutex;       // Rename XFMutex interface class to Mutex for easier use.

// Implementation of the getInstance() method of the 'interface::XFDispatcher' class.
//
// Note: The implementation is done here because only in this file the real XFDispatcher
//       class is known (port specific class). An instance of the XFDispatcher class is
//       returned by the 'interface::XFDispatcher' class.
interface::XFDispatcher * interface::XFDispatcher::getInstance()
{
    static ::XFDispatcher dispatcher;
    return &dispatcher;
}

// TODO: Implement code for XFDispatcher class

#endif // USE_XF_COMMON_DISPATCHER_CLASS
