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

TDataRecord.hh

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

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