class WXDLLIMPEXP_BASE wxSelectDispatcher : public wxMappedFDIODispatcher
{
public:
- // creates an instance of this class, the caller takes ownership of it
- static wxSelectDispatcher *Create();
+ // default ctor
+ wxSelectDispatcher() { m_maxFD = -1; }
// implement pure virtual methods of the base class
virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL);
virtual bool UnregisterFD(int fd);
virtual void Dispatch(int timeout = TIMEOUT_INFINITE);
-protected:
- // ctor is not public, use Create()
- wxSelectDispatcher();
-
private:
// common part of RegisterFD() and ModifyFD()
bool DoUpdateFDAndHandler(int fd, wxFDIOHandler *handler, int flags);
if ( !gs_dispatcher )
#endif // wxUSE_EPOLL_DISPATCHER
#if wxUSE_SELECT_DISPATCHER
- gs_dispatcher = wxSelectDispatcher::Create();
+ gs_dispatcher = new wxSelectDispatcher();
#endif // wxUSE_SELECT_DISPATCHER
}
// wxSelectDispatcher
// ----------------------------------------------------------------------------
-/* static */
-wxSelectDispatcher *wxSelectDispatcher::Create()
-{
- return new wxSelectDispatcher;
-}
-
-wxSelectDispatcher::wxSelectDispatcher()
-{
- m_maxFD = -1;
-}
-
bool wxSelectDispatcher::RegisterFD(int fd, wxFDIOHandler *handler, int flags)
{
if ( !wxMappedFDIODispatcher::RegisterFD(fd, handler, flags) )