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

MNFileSinkSH.h

Go to the documentation of this file.
00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef MN_FILE_SINK_STREAM_HANDLER_H 00025 #define MN_FILE_SINK_STREAM_HANDLER_H 00026 00027 #include <sys/types.h> 00028 00029 #include "SH.h" 00030 #include "SHEndpoint.h" 00031 #include "SHEndpointSpec.h" 00032 #include "var_type.h" 00033 00034 class MNRope; 00035 00036 namespace SH 00037 { 00038 00039 class FileSinkSH; 00040 00045 /**********************************************************************/ 00046 /* FileSinkEndpoint */ 00047 /**********************************************************************/ 00048 00049 class FileSinkEndpoint 00050 : public SinkEndpoint 00051 { 00052 public: 00053 FileSinkEndpoint( FileSinkSH* mySH ); 00054 virtual ~FileSinkEndpoint( ); 00055 00056 virtual SH_RC push( DataPtr item ); 00057 00058 FileSinkSH* fsh(); 00059 }; 00060 00061 /**********************************************************************/ 00062 /* FileSinkSH */ 00063 /**********************************************************************/ 00064 00065 class FileSinkSH 00066 : public Base 00067 { 00068 public: 00069 FileSinkSH( SHGraphManager* mgr, 00070 u_int32_t runtimeId, 00071 MNSelector& sel ); 00072 00073 virtual ~FileSinkSH(); 00074 00075 private: 00076 00081 FileSinkSH( const FileSinkSH& ); 00082 00087 FileSinkSH& operator=( const FileSinkSH& ); 00088 00089 public: 00092 virtual SH_RC initSH(); 00095 virtual SH_RC uninitSH(); 00096 00097 SH_RC push_to_file( DataPtr item ); 00098 00099 /******************************************************************/ 00100 /* additional attributes for the set() functions */ 00101 /******************************************************************/ 00102 public: 00107 SA_FILE_NAME _filename; 00108 SA_FILESNK_CREAT _creat; 00109 SA_FILESNK_APPEND _append; 00110 SA_HAS_ORDERED_DATA _hasOrderedData; 00111 00112 int _file_handle; 00113 long _call_count; 00114 long _bytes_written; 00115 long _file_offset; 00116 00117 // Attributes have been moved to SH.h 00118 00119 /******************************************************************/ 00120 /* functions required for Base::Spec */ 00121 /******************************************************************/ 00122 protected: 00123 friend class FileSinkEndpoint; 00124 00125 SinkEndpoint* _in_ep_a[1]; 00126 FileSinkEndpoint _inEP; 00127 00128 public: 00129 virtual SinkEndpoint** getSinkSpecs(); 00130 virtual SourceEndpoint** getSourceSpecs(); 00131 00132 /******************************************************************/ 00133 /* functions required for Status */ 00134 /******************************************************************/ 00144 virtual bool isConnected() const; 00145 }; 00146 00148 00149 }; // namespace SH 00150 00151 #endif /* MN_FILE_SINK_STREAM_HANDLER_H */ 00152

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8