メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TModule.hh

解説を見る。
00001 // =====================================================================
00028 // =====================================================================
00029 #ifndef CLDAQ__TMODULE_HH
00030 #define CLDAQ__TMODULE_HH
00031 
00032 #include "Tglobals.h"
00033 
00034 class TDataSegment;
00035 class TDataElement;
00036 
00037 
00057 class TModule
00058 {
00059 
00060   public:
00061     enum { tStatusSuccess = 0 };
00062 
00063   protected:
00064     Tint theNumberOfChannels;
00065     Tint theStatus;
00066 
00067   public:
00068     TModule( Tint nchannel = 0 );
00069     TModule( const TModule& right );
00070     virtual ~TModule();
00071 
00072   public:
00073     virtual Tint Clear() = 0;
00074     virtual Tint Update() = 0;
00075     virtual Tint Initialize() = 0;
00076     virtual Tvoid FillData( TDataElement& element, Tint channel ) = 0;
00077 
00078   public:
00079     virtual const TModule& operator=( const TModule& right );
00080     virtual Tbool operator==( const TModule& right ) const;
00081     virtual Tbool operator!=( const TModule& right ) const;
00082 
00083   public:
00084     Tint GetNumberOfChannels() const;
00085     Tint GetStatus() const;
00086     Tvoid SetNumberOfChannels( Tint nchannel );
00087     Tvoid SetStatus( Tint status );
00088     Tbool IsSuccess() const;
00089 
00090 #ifdef __CLDAQ_ROOT_DLL
00091     ClassDef(TModule,0)
00092 #endif
00093 
00094 };
00095 
00096 inline Tint TModule::GetNumberOfChannels() const
00097 {
00098   return theNumberOfChannels;
00099 }
00100 
00101 inline Tvoid TModule::SetNumberOfChannels( Tint nchannel )
00102 {
00103   theNumberOfChannels = nchannel;
00104   return;
00105 }
00106 
00107 inline Tint TModule::GetStatus() const
00108 {
00109   return theStatus;
00110 }
00111 
00112 inline Tvoid TModule::SetStatus( Tint status )
00113 {
00114   theStatus = status;
00115   return;
00116 }
00117 
00118 inline Tbool TModule::IsSuccess() const
00119 {
00120   return ( theStatus >= 0 ) ? Ttrue : Tfalse;
00121 }
00122 
00123 #endif


CLDAQ - a Class Library for DataAcQuisition (Version 1.14.3)
Go IWAI -- goiwai at users.sourceforge.jp