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

TModule.hh

解説を見る。
00001 // =====================================================================
00002 //  $Id: TModule.hh,v 1.2 2003/07/30 16:19:10 goiwai Exp $
00003 //  $Name: CLDAQ-1-08-00 $
00004 //
00005 //  $Log: TModule.hh,v $
00006 //  Revision 1.2  2003/07/30 16:19:10  goiwai
00007 //  ファイルにコミットログをつけることにしました.
00008 //
00009 // =====================================================================
00010 #ifndef __TMODULE_HH
00011 #define __TMODULE_HH
00012 
00013 #include "Tglobals.h"
00014 
00015 class TDataSegment;
00016 class TDataElement;
00017 
00018 class TModule
00019 {
00020 
00021   public:
00022     enum { tStatusSuccess = 0 };
00023 
00024   protected:
00025     Tint theNumberOfChannels;
00026     Tint theStatus;
00027 
00028   public:
00029     TModule( Tint nchannel = 0 );
00030     TModule( const TModule& right );
00031     virtual ~TModule();
00032 
00033   public:
00034     virtual Tint Clear() = 0;
00035     virtual Tint Update() = 0;
00036     virtual Tint Initialize() = 0;
00037     virtual Tvoid FillData( TDataElement& element, Tint channel ) = 0;
00038 
00039   public:
00040     virtual const TModule& operator=( const TModule& right );
00041     virtual Tbool operator==( const TModule& right ) const;
00042     virtual Tbool operator!=( const TModule& right ) const;
00043 
00044   public:
00045     Tint GetNumberOfChannels() const;
00046     Tint GetStatus() const;
00047     Tvoid SetNumberOfChannels( Tint nchannel );
00048     Tvoid SetStatus( Tint status );
00049     Tbool IsSuccess() const;
00050 
00051 };
00052 
00053 inline Tint TModule::GetNumberOfChannels() const
00054 {
00055   return( theNumberOfChannels );
00056 }
00057 
00058 inline Tvoid TModule::SetNumberOfChannels( Tint nchannel )
00059 {
00060   theNumberOfChannels = nchannel;
00061   return;
00062 }
00063 
00064 inline Tint TModule::GetStatus() const
00065 {
00066   return( theStatus );
00067 }
00068 
00069 inline Tvoid TModule::SetStatus( Tint status )
00070 {
00071   theStatus = status;
00072   return;
00073 }
00074 
00075 inline Tbool TModule::IsSuccess() const
00076 {
00077   return( ( theStatus >= 0 ) ? Ttrue : Tfalse );
00078 }
00079 
00080 #endif

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