Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * P i p e C l a s s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXPipe.h,v 1.7 2006/01/22 17:58:07 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXPIPE_H 00025 #define FXFILE_H 00026 00027 #ifndef FXIO_H 00028 #include "FXIO.h" 00029 #endif 00030 00031 00032 //////////////////////////// UNDER DEVELOPMENT //////////////////////////////// 00033 00034 00035 namespace FX { 00036 00037 00038 /** 00039 * Pipe i/o device. 00040 */ 00041 class FXAPI FXPipe : public FXIO { 00042 private: 00043 FXPipe(const FXPipe&); 00044 FXPipe &operator=(const FXPipe&); 00045 public: 00046 00047 /// Construct socket 00048 FXPipe(){ } 00049 00050 /// Construct file and attach existing handle h 00051 FXPipe(FXInputHandle handle,FXuint mode); 00052 00053 /// Open device with access mode and handle 00054 virtual bool open(FXInputHandle handle,FXuint mode); 00055 00056 /// Read block of bytes, returning number of bytes read 00057 virtual FXival readBlock(void* data,FXival count); 00058 00059 /// Write block of bytes, returning number of bytes written 00060 virtual FXival writeBlock(const void* data,FXival count); 00061 00062 /// Close socket 00063 virtual bool close(); 00064 00065 /// Create a named pipe 00066 static bool create(const FXString& file,FXuint perm=FXIO::OwnerReadWrite|FXIO::GroupReadWrite|FXIO::OtherReadWrite); 00067 00068 /// Destroy 00069 virtual ~FXPipe(); 00070 }; 00071 00072 } 00073 00074 #endif
Copyright © 1997-2005 Jeroen van der Zijp |