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

TDataRecord.hh

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


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