00001 // ===================================================================== 00002 // $Id: TDataSegment.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-02 $ 00004 // ===================================================================== 00005 #ifndef __TDATASEGMENT_HH 00006 #define __TDATASEGMENT_HH 00007 00008 #include "Tglobals.h" 00009 #include "TStreamableObject.hh" 00010 #include "TDataElementList.hh" 00011 00012 class TOutputObjectStream; 00013 class TOutputObjectFile; 00014 class TOutputObjectSocket; 00015 class TOutputObjectSharedMemory; 00016 00017 class TDataSegment 00018 : public TStreamableObject, public TDataElementList 00019 { 00020 00021 public: 00022 TDataSegment( const Tstring& id = TunknownID ); 00023 TDataSegment( const TDataSegment& right ); 00024 ~TDataSegment(); 00025 00026 public: 00027 Tint GetRecordSize(); 00028 Tint Record( TOutputObjectStream* output ); 00029 Tvoid Clear(); 00030 Tint Serialize( Tvoid* buffer ); 00031 00032 public: 00033 const TDataSegment& operator=( const TDataSegment& right ); 00034 Tbool operator==( const TDataSegment& right ) const; 00035 Tbool operator!=( const TDataSegment& right ) const; 00036 friend Tostream& operator<<( Tostream& tos, const TDataSegment& right ); 00037 00038 public: 00039 Tbool FindDataElement( const Tstring& id, TDataElement& element ) const; 00040 Tint FindDataElement( const Tstring& id ) const; 00041 00042 private: 00043 Tint record( TOutputObjectFile* ofile ); 00044 Tint record( TOutputObjectSocket* osocket ); 00045 Tint record( TOutputObjectSharedMemory* omemory ); 00046 00047 00048 }; 00049 00050 #endif