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