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

NopSourceSH.h

Go to the documentation of this file.
00001 /* Copyright (C) 2002 Carsten Griwodz 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, this code may be used in unmodified form 00006 * provided that this copyright notice and this permission notice appear 00007 * in supporting documentation. 00008 * 00009 * The code may be made subject to the terms of the GNU General Public 00010 * License, Version 2, and re-distributed under the terms of this license. 00011 * 00012 * Commercial use other than under the terms of the GNU General Public 00013 * License is allowed only after negotiation of conditions with the authors. 00014 */ 00015 #ifndef NOP_SOURCE_STREAM_HANDLER_H 00016 #define NOP_SOURCE_STREAM_HANDLER_H 00017 00018 #include <sys/types.h> 00019 #include <stdio.h> 00020 #include <list> 00021 00022 #include "MNTimeval.h" 00023 #include "MNValid.h" 00024 #include "SH.h" 00025 #include "SHEndpoint.h" 00026 #include "SHEndpointSpec.h" 00027 #include "DummyList.h" 00028 #include "var_type.h" 00029 00030 class MNRope; 00031 00032 namespace SH 00033 { 00034 00035 class NopSourceSH; 00036 00041 /**********************************************************************/ 00042 /* NopSourceEndpoint */ 00043 /**********************************************************************/ 00044 00045 class NopSourceEndpoint 00046 : public SourceEndpoint 00047 { 00048 public: 00049 NopSourceEndpoint( NopSourceSH* mySH ); 00050 virtual ~NopSourceEndpoint( ); 00051 00052 virtual SH_RC pull( DataPtr& item, 00053 SourceUnit su, 00054 size_t amount ); 00055 00056 NopSourceSH* fsh(); 00057 }; 00058 00059 /**********************************************************************/ 00060 /* NopSourceSH */ 00061 /**********************************************************************/ 00062 00063 class NopSourceSH 00064 : public Base 00065 { 00066 public: 00067 NopSourceSH( SHGraphManager* mgr, 00068 u_int32_t runtimeId, 00069 MNSelector& sel); 00070 00071 private: 00072 00077 NopSourceSH( const NopSourceSH& ); 00078 00083 NopSourceSH& operator=( const NopSourceSH& ); 00084 00085 public: 00086 SH_RC pull( DataPtr& item, 00087 SourceUnit su, 00088 size_t amount ); 00089 00090 /******************************************************************/ 00091 /* functions required for SH::Spec */ 00092 /******************************************************************/ 00093 protected: 00094 friend class NopSourceEndpoint; 00095 00096 SourceEndpoint* _out_ep_a[1]; 00097 NopSourceEndpoint _outEP; 00098 00099 public: 00100 virtual SinkEndpoint** getSinkSpecs(); 00101 virtual SourceEndpoint** getSourceSpecs(); 00102 00103 /******************************************************************/ 00104 /* functions required for SHStatus */ 00105 /******************************************************************/ 00115 virtual bool isConnected() const; 00116 00117 private: 00118 u_int32_t _blk_sz; 00119 u_int32_t _cnt; 00120 00121 private: 00125 void inc_cnt( ); 00126 }; 00127 00129 00130 }; // namespace SH 00131 00132 #endif /* NOP_SOURCE_STREAM_HANDLER_H */ 00133

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