![]() |
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,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (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 * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXPipe.h,v 1.16 2009/01/06 13:07:26 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXPIPE_H 00024 #define FXPIPE_H 00025 00026 #ifndef FXIO_H 00027 #include "FXIO.h" 00028 #endif 00029 00030 00031 //////////////////////////// UNDER DEVELOPMENT //////////////////////////////// 00032 00033 00034 namespace FX { 00035 00036 00037 /** 00038 * Pipe i/o device. 00039 */ 00040 class FXAPI FXPipe : public FXIO { 00041 private: 00042 FXPipe(const FXPipe&); 00043 FXPipe &operator=(const FXPipe&); 00044 public: 00045 00046 /// Construct socket 00047 FXPipe(){ } 00048 00049 /// Construct file and attach existing handle h 00050 FXPipe(FXInputHandle h,FXuint m); 00051 00052 /// Open device with access mode and handle 00053 virtual FXbool open(FXInputHandle h,FXuint m); 00054 00055 /// Read block of bytes, returning number of bytes read 00056 virtual FXival readBlock(void* data,FXival count); 00057 00058 /// Write block of bytes, returning number of bytes written 00059 virtual FXival writeBlock(const void* data,FXival count); 00060 00061 /// Close socket 00062 virtual FXbool close(); 00063 00064 /// Create a named pipe 00065 static FXbool create(const FXString& file,FXuint perm=FXIO::AllReadWrite); 00066 00067 /// Destroy 00068 virtual ~FXPipe(); 00069 }; 00070 00071 } 00072 00073 #endif
![]() |