"Fossies" - the Fresh Open Source Software Archive

Member "ivtools-ivtools-2.0.4/src/AceDispatch/ace_dispatcher.h" (9 Oct 2020, 2380 Bytes) of package /linux/misc/ivtools-ivtools-2.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ace_dispatcher.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 1996,1999 Vectaport Inc.
    3  *
    4  * Permission to use, copy, modify, distribute, and sell this software and
    5  * its documentation for any purpose is hereby granted without fee, provided
    6  * that the above copyright notice appear in all copies and that both that
    7  * copyright notice and this permission notice appear in supporting
    8  * documentation, and that the names of the copyright holders not be used in
    9  * advertising or publicity pertaining to distribution of the software
   10  * without specific, written prior permission.  The copyright holders make
   11  * no representations about the suitability of this software for any purpose.
   12  * It is provided "as is" without express or implied warranty.
   13  *
   14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
   15  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
   16  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
   17  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
   18  * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
   19  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
   20  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   21  * 
   22  */
   23 
   24 #ifndef _ace_dispatcher_h
   25 #define _ace_dispatcher_h
   26 
   27 #ifdef HAVE_ACE
   28 
   29 #include <stdio.h>
   30 #include <signal.h> 
   31 #include <Dispatch/dispatcher.h>
   32 #include <Dispatch/iohandler.h>
   33 #include <OS/table.h>
   34 
   35 class ACE_Reactor;
   36 
   37 declareTable(TimerTable,IOHandler*,int)
   38 
   39 // A Dispatcher implemented with an ACE_Reactor.  Make sure that
   40 // Dispatcher::_instance is set to one of these when using InterViews
   41 // with ACE.
   42 
   43 class AceDispatcher : public Dispatcher {
   44 public:
   45     AceDispatcher();
   46     AceDispatcher(ACE_Reactor*);
   47     virtual ~AceDispatcher();
   48 
   49     ACE_Reactor* reactor() { return _reactor; }
   50 
   51   //    virtual void link(int fd, DispatcherMask, IOHandler*);
   52   //    virtual IOHandler* handler(int fd, DispatcherMask) const;
   53   //    virtual void unlink(int fd);
   54 
   55     virtual void startTimer(long sec, long usec, IOHandler*);
   56     virtual void stopTimer(IOHandler*);
   57 
   58   //    virtual boolean setReady(int fd, DispatcherMask);
   59     virtual void dispatch();
   60     virtual boolean dispatch(long& sec, long& usec);
   61 protected:
   62     virtual void attach(int fd, DispatcherMask, IOHandler*);
   63     virtual void detach(int fd);
   64 
   65     ACE_Reactor* _reactor;
   66     TimerTable* _table;
   67 };
   68 
   69 #endif
   70 
   71 #endif