00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __TDATARECORD_HH
00011 #define __TDATARECORD_HH
00012
00013 #include "Tglobals.h"
00014 #include "TStreamableObject.hh"
00015 #include "TDataSectionList.hh"
00016
00017 class TOutputObjectStream;
00018
00019 class TDataRecord
00020 : public TStreamableObject, public TDataSectionList
00021 {
00022
00023 public:
00024 TDataRecord( const Tstring& id = TunknownID );
00025 TDataRecord( const TDataRecord& right );
00026 ~TDataRecord();
00027
00028 public:
00029 Tint GetRecordSize();
00030 Tint Record( TOutputObjectStream* output );
00031 Tvoid Clear();
00032 Tint Serialize( Tvoid* buffer );
00033
00034 public:
00035 const TDataRecord& operator=( const TDataRecord& right );
00036 Tbool operator==( const TDataRecord& right ) const;
00037 Tbool operator!=( const TDataRecord& right ) const;
00038 friend Tostream& operator<<( Tostream& tos, const TDataRecord& right );
00039
00040 public:
00041 Tbool FindDataSection( const Tstring& id, TDataSection& section ) const;
00042 Tint FindDataSection( const Tstring& id ) const;
00043 Tbool FindDataSegment( const Tstring& secid, const Tstring& segid, TDataSegment& segment ) const;
00044 Tint FindDataSegment( const Tstring& secid, const Tstring& segid ) const;
00045 Tbool FindDataSegment( Tstring idset[ 2 ], TDataSegment& segment ) const;
00046 Tint FindDataSegment( Tstring idset[ 2 ] ) const;
00047 Tbool FindDataSegment( const TstringList& idset, TDataSegment& segment ) const;
00048 Tint FindDataSegment( const TstringList& idset ) const;
00049 Tbool FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid, TDataElement& element ) const;
00050 Tint FindDataElement( const Tstring& secid, const Tstring& segid, const Tstring& eleid ) const;
00051 Tbool FindDataElement( Tstring idset[ 3 ], TDataElement& element ) const;
00052 Tint FindDataElement( Tstring idset[ 3 ] ) const;
00053 Tbool FindDataElement( const TstringList& idset, TDataElement& element ) const;
00054 Tint FindDataElement( const TstringList& idset ) const;
00055
00056 private:
00057 Tint record( TOutputObjectFile* ofile );
00058 Tint record( TOutputObjectSocket* osocket );
00059 Tint record( TOutputObjectSharedMemory* omemory );
00060
00061 };
00062
00063 #endif