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

wvfile.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  * A simple class to access filesystem files using WvStreams.
00006  */
00007 #ifndef __WVFILE_H
00008 #define __WVFILE_H
00009 
00010 #include "wvfdstream.h"
00011 #include <fcntl.h>
00012 
00013 /**
00014  * WvFile implements a stream connected to a file or Unix device.  We
00015  * include no support for operations like seek().  Since files are not
00016  * really streams, you probably do not need WvStream support for seekable
00017  * files; just use standard C I/O functions in that case.
00018  *
00019  * WvFile is primarily useful for Unix device files, which have defined
00020  * select() behaviour for example.
00021  */
00022 class WvFile : public WvFDStream
00023 {
00024 public:
00025     WvFile(int rwfd = -1);
00026     WvFile(WvStringParm filename, int mode, int create_mode = 0666)
00027         { open(filename, mode, create_mode); }
00028     bool open(WvStringParm filename, int mode, int create_mode = 0666);
00029     
00030     bool readable, writable;
00031 
00032     // Force select to always return true
00033     bool skip_select;
00034     
00035     virtual bool pre_select(SelectInfo &si);
00036 };
00037 
00038 #endif // __WVFILE_H

Generated on Sat Mar 13 14:55:40 2004 for WvStreams by doxygen 1.3.6-20040222