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

TModule.hh

解説を見る。
00001 // =====================================================================
00021 // =====================================================================
00022 #ifndef __TMODULE_HH
00023 #define __TMODULE_HH
00024 
00025 #include "Tglobals.h"
00026 
00027 class TDataSegment;
00028 class TDataElement;
00029 
00030 
00050 class TModule
00051 {
00052 
00053   public:
00054     enum { tStatusSuccess = 0 };
00055 
00056   protected:
00057     Tint theNumberOfChannels;
00058     Tint theStatus;
00059 
00060   public:
00061     TModule( Tint nchannel = 0 );
00062     TModule( const TModule& right );
00063     virtual ~TModule();
00064 
00065   public:
00066     virtual Tint Clear() = 0;
00067     virtual Tint Update() = 0;
00068     virtual Tint Initialize() = 0;
00069     virtual Tvoid FillData( TDataElement& element, Tint channel ) = 0;
00070 
00071   public:
00072     virtual const TModule& operator=( const TModule& right );
00073     virtual Tbool operator==( const TModule& right ) const;
00074     virtual Tbool operator!=( const TModule& right ) const;
00075 
00076   public:
00077     Tint GetNumberOfChannels() const;
00078     Tint GetStatus() const;
00079     Tvoid SetNumberOfChannels( Tint nchannel );
00080     Tvoid SetStatus( Tint status );
00081     Tbool IsSuccess() const;
00082 
00083 };
00084 
00085 inline Tint TModule::GetNumberOfChannels() const
00086 {
00087   return theNumberOfChannels;
00088 }
00089 
00090 inline Tvoid TModule::SetNumberOfChannels( Tint nchannel )
00091 {
00092   theNumberOfChannels = nchannel;
00093   return;
00094 }
00095 
00096 inline Tint TModule::GetStatus() const
00097 {
00098   return theStatus;
00099 }
00100 
00101 inline Tvoid TModule::SetStatus( Tint status )
00102 {
00103   theStatus = status;
00104   return;
00105 }
00106 
00107 inline Tbool TModule::IsSuccess() const
00108 {
00109   return ( theStatus >= 0 ) ? Ttrue : Tfalse;
00110 }
00111 
00112 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.11.0)
Go IWAI <goiwai@users.sourceforge.jp>