Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
EventHandler.h
Package: vxwork_src.rar [view]
Upload User: nvosite88
Upload Date: 2007-01-17
Package Size: 4983k
Code Size: 2k
Category:
VxWorks
Development Platform:
C/C++
- /* EventHandler - Base class for Reactor events */
- /* Copyright (c) 1999 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01a,07may99,aim created
- */
- #ifndef __INCEventHandler_h
- #define __INCEventHandler_h
- #include "ReactorTypes.h"
- #include "TimeValue.h"
- #include "iostream"
- class Reactor;
- class EventHandler
- {
- public:
- enum {
- NULL_MASK = 0,
- READ_MASK = (1 << 0),
- ACCEPT_MASK = (1 << 0),
- WRITE_MASK = (1 << 1),
- CONNECT_MASK = (1 << 3),
- EXCEPT_MASK = (1 << 4),
- ALL_EVENTS_MASK = READ_MASK|WRITE_MASK|ACCEPT_MASK|CONNECT_MASK,
- DONT_CALL = (1 << 16)
- };
- virtual ~EventHandler ();
- virtual REACTOR_HANDLE handleGet () const;
- // Get the I/O REACTOR_HANDLE.
- virtual REACTOR_HANDLE handleSet (REACTOR_HANDLE);
- // Set the I/O REACTOR_HANDLE.
- virtual int handleInput (REACTOR_HANDLE h);
- // Called when input events occur (e.g., connection or data).
- virtual int handleOutput (REACTOR_HANDLE h);
- // Called when output events are possible. (e.g., flow control
- // abates).
- virtual int handleClose
- (
- REACTOR_HANDLE = INVALID_REACTOR_HANDLE,
- REACTOR_EVENT_MASK = ALL_EVENTS_MASK
- );
- virtual int handleException (REACTOR_HANDLE);
- virtual int handleTimeout (const TimeValue& timeValue);
- // Called when timer expires.
- virtual Reactor* reactorSet (Reactor *reactor);
- virtual Reactor* reactorGet () const;
- friend ostream& operator<< (ostream& os, const EventHandler&);
- protected:
- EventHandler ();
- // Force EventHandler to be an abstract base class.
- Reactor* m_reactor;
- };
- #endif // __INCEventHandler_h