00001 // ===================================================================== 00002 // $Id: TDataSegment.hh,v 1.2 2003/07/30 16:17:51 goiwai Exp $ 00003 // $Name: CLDAQ-1-07-01 $ 00004 // 00005 // $Log: TDataSegment.hh,v $ 00006 // Revision 1.2 2003/07/30 16:17:51 goiwai 00007 // ファイルにコミットログをつけることにしました. 00008 // 00009 // ===================================================================== 00010 #ifndef __TDATASEGMENT_HH 00011 #define __TDATASEGMENT_HH 00012 00013 #include "Tglobals.h" 00014 #include "TStreamableObject.hh" 00015 #include "TDataElementList.hh" 00016 00017 class TOutputObjectStream; 00018 class TOutputObjectFile; 00019 class TOutputObjectSocket; 00020 class TOutputObjectSharedMemory; 00021 00022 class TDataSegment 00023 : public TStreamableObject, public TDataElementList 00024 { 00025 00026 public: 00027 TDataSegment( const Tstring& id = TunknownID ); 00028 TDataSegment( const TDataSegment& right ); 00029 ~TDataSegment(); 00030 00031 public: 00032 Tint GetRecordSize(); 00033 Tint Record( TOutputObjectStream* output ); 00034 Tvoid Clear(); 00035 Tint Serialize( Tvoid* buffer ); 00036 00037 public: 00038 const TDataSegment& operator=( const TDataSegment& right ); 00039 Tbool operator==( const TDataSegment& right ) const; 00040 Tbool operator!=( const TDataSegment& right ) const; 00041 friend Tostream& operator<<( Tostream& tos, const TDataSegment& right ); 00042 00043 public: 00044 Tbool FindDataElement( const Tstring& id, TDataElement& element ) const; 00045 Tint FindDataElement( const Tstring& id ) const; 00046 00047 private: 00048 Tint record( TOutputObjectFile* ofile ); 00049 Tint record( TOutputObjectSocket* osocket ); 00050 Tint record( TOutputObjectSharedMemory* omemory ); 00051 00052 00053 }; 00054 00055 #endif