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

TDataRecord.hh

解説を見る。
00001 // =====================================================================
00051 // =====================================================================
00052 #ifndef CLDAQ__TDATARECORD_HH
00053 #define CLDAQ__TDATARECORD_HH
00054 
00055 #include "Tglobals.h"
00056 #include "TStreamableObject.hh"
00057 #include "TDataSectionList.hh"
00058 
00059 class TOutputObjectStream;
00060 
00061 
00081 class TDataRecord
00082   : public TStreamableObject, public TDataSectionList
00083 {
00084 
00085   public:
00086     TDataRecord( const Tstring& id = TunknownID );
00087     TDataRecord( const TDataRecord& right );
00088     ~TDataRecord();
00089 
00090   public:
00091     Tint GetRecordSize();
00092     Tint Record( TOutputObjectStream* output );
00093     Tvoid Clear();
00094     Tint Serialize( const Tvoid* buffer );
00095     Tint Deserialize( const Tvoid* buffer );
00096     Tint Size() const;
00097 
00098   public:
00099     const TDataRecord& operator=( const TDataRecord& right );
00100     Tbool operator==( const TDataRecord& right ) const;
00101     Tbool operator!=( const TDataRecord& right ) const;
00102     Tbool operator==( const Tstring& right ) const;
00103     Tbool operator!=( const Tstring& right ) const;
00104     //operator[]( const Tstring& secid )を加えたかったら
00105     //reference operator [](size_type n);
00106     //const_reference operator [](size_type n) const;
00107     //TDataSection& operator[]( Tsize_t n );も
00108     //実装しなくちゃだめみたい.めんどくさいな〜
00109     const TDataSection& operator[]( Tint n ) const;
00110     TDataSection& operator[]( Tint n );
00111     const TDataSection& operator[]( const Tstring& id ) const;
00112     TDataSection& operator[]( const Tstring& id );
00113     friend Tostream& operator<<( Tostream& tos, const TDataRecord& right );
00114 
00115   public:
00116     TDataRecord Test( Tint somevalue = 0 );
00117 
00118   public:
00119     Tbool FindDataSection( const Tstring& id, TDataSection& section ) const;
00120     Tint FindDataSection( const Tstring& id ) const;
00121     Tbool FindDataSegment( const Tstring& secid, const Tstring& segid, TDataSegment& segment ) const;
00122     Tint FindDataSegment( const Tstring& secid, const Tstring& segid ) const;
00123     Tbool FindDataSegment( Tstring idset[ 2 ], TDataSegment& segment ) const;
00124     Tint FindDataSegment( Tstring idset[ 2 ] ) const;
00125     Tbool FindDataSegment( const TstringList& idset, TDataSegment& segment ) const;
00126     Tint FindDataSegment( const TstringList& idset ) const;
00127     Tbool FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid, TDataElement& element ) const;
00128     Tint FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid ) const;
00129     Tbool FindDataElement( Tstring idset[ 3 ], TDataElement& element ) const;
00130     Tint FindDataElement( Tstring idset[ 3 ] ) const;
00131     Tbool FindDataElement( const TstringList& idset, TDataElement& element ) const;
00132     Tint FindDataElement( const TstringList& idset ) const;
00133 
00134   private:
00135     Tint record( TOutputObjectFile* ofile );
00136     Tint record( TOutputObjectSocket* osocket );
00137     Tint record( TOutputObjectSharedMemory* omemory );
00138 
00139 };
00140 
00141 inline Tint TDataRecord::Size() const
00142 {
00143   return (Tint)size();
00144 }
00145 
00146 #endif

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