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

TDataRecord.hh

解説を見る。
00001 // =====================================================================
00002 //  $Id: TDataRecord.hh,v 1.3 2003/08/25 09:19:37 goiwai Exp $
00003 //  $Name: CLDAQ-1-08-02 $
00004 //
00005 //  $Log: TDataRecord.hh,v $
00006 //  Revision 1.3  2003/08/25 09:19:37  goiwai
00007 //  operator[]( const Tstring& id ) を加えました.
00008 //  record[0] とか record["tag"] とかすれば,TDataSection を得ることが出来
00009 //  ます.
00010 //  size()を越えた範囲にも,チェックしないでアクセスします.
00011 //  マッチしなかった場合は落ちます.
00012 //  同じ名前でタグされた DataSection がある場合,最初にマッチしたものが返っ
00013 //  てきます.
00014 //
00015 //  Revision 1.2  2003/07/30 16:17:51  goiwai
00016 //  ファイルにコミットログをつけることにしました.
00017 //
00018 // =====================================================================
00019 #ifndef __TDATARECORD_HH
00020 #define __TDATARECORD_HH
00021 
00022 #include "Tglobals.h"
00023 #include "TStreamableObject.hh"
00024 #include "TDataSectionList.hh"
00025 
00026 class TOutputObjectStream;
00027 
00028 class TDataRecord
00029   : public TStreamableObject, public TDataSectionList
00030 {
00031 
00032   public:
00033     TDataRecord( const Tstring& id = TunknownID );
00034     TDataRecord( const TDataRecord& right );
00035     ~TDataRecord();
00036 
00037   public:
00038     Tint GetRecordSize();
00039     Tint Record( TOutputObjectStream* output );
00040     Tvoid Clear();
00041     Tint Serialize( Tvoid* buffer );
00042 
00043   public:
00044     const TDataRecord& operator=( const TDataRecord& right );
00045     Tbool operator==( const TDataRecord& right ) const;
00046     Tbool operator!=( const TDataRecord& right ) const;
00047     //operator[]( const Tstring& secid )を加えたかったら
00048     //reference operator [](size_type n);
00049     //const_reference operator [](size_type n) const;
00050     //TDataSection& operator[]( Tsize_t n );も
00051     //実装しなくちゃだめみたい.めんどくさいな〜
00052     const TDataSection& operator[]( Tint n ) const;
00053     TDataSection& operator[]( Tint n );
00054     const TDataSection& operator[]( const Tstring& id ) const;
00055     TDataSection& operator[]( const Tstring& id );
00056     friend Tostream& operator<<( Tostream& tos, const TDataRecord& right );
00057 
00058   public:
00059     Tbool FindDataSection( const Tstring& id, TDataSection& section ) const;
00060     Tint FindDataSection( const Tstring& id ) const;
00061     Tbool FindDataSegment( const Tstring& secid, const Tstring& segid, TDataSegment& segment ) const;
00062     Tint FindDataSegment( const Tstring& secid, const Tstring& segid ) const;
00063     Tbool FindDataSegment( Tstring idset[ 2 ], TDataSegment& segment ) const;
00064     Tint FindDataSegment( Tstring idset[ 2 ] ) const;
00065     Tbool FindDataSegment( const TstringList& idset, TDataSegment& segment ) const;
00066     Tint FindDataSegment( const TstringList& idset ) const;
00067     Tbool FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid, TDataElement& element ) const;
00068     Tint FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid ) const;
00069     Tbool FindDataElement( Tstring idset[ 3 ], TDataElement& element ) const;
00070     Tint FindDataElement( Tstring idset[ 3 ] ) const;
00071     Tbool FindDataElement( const TstringList& idset, TDataElement& element ) const;
00072     Tint FindDataElement( const TstringList& idset ) const;
00073 
00074   private:
00075     Tint record( TOutputObjectFile* ofile );
00076     Tint record( TOutputObjectSocket* osocket );
00077     Tint record( TOutputObjectSharedMemory* omemory );
00078 
00079 };
00080 
00081 #endif

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