Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

wvistreamlist.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  * 
00005  * FIXME: Suspiciously similar to wvstreamlist, and with tons of duplicated
00006  * code.  Blech.
00007  */ 
00008 #ifndef __WVISTREAMLIST_H
00009 #define __WVISTREAMLIST_H
00010 
00011 #include "wvstream.h"
00012 
00013 /** Create the WvStreamListBase class - a simple linked list of WvStreams */
00014 DeclareWvList2(WvIStreamListBase, IWvStream);
00015 
00016 /**
00017  * WvStreamList holds a list of WvStream objects -- and its select() and
00018  * callback() functions know how to handle multiple simultaneous streams.
00019  */
00020 class WvIStreamList : public WvStream, public WvIStreamListBase
00021 {
00022 public:
00023     WvIStreamList();
00024     virtual ~WvIStreamList();
00025     virtual bool isok() const;
00026     virtual bool pre_select(SelectInfo &si);
00027     virtual bool post_select(SelectInfo &si);
00028     virtual void execute();
00029     
00030     void unlink(WvStream *data)
00031         { sure_thing.unlink(data); WvIStreamListBase::unlink(data); }
00032     
00033     bool auto_prune; // remove !isok() streams from the list automatically?
00034     static WvIStreamList globallist;
00035     
00036 protected:
00037     WvIStreamListBase sure_thing;
00038 
00039 private:
00040 #ifndef _WIN32
00041     static void onfork(pid_t p);
00042 #endif
00043 };
00044 
00045 #endif // __WVISTREAMLIST_H

Generated on Sat Feb 21 21:05:29 2004 for WvStreams by doxygen 1.3.5