TDataSection.hh Source File

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

# TDataSection.hh

解説を見る。

    00001 // =====================================================================
    00047 // =====================================================================
    00048 #ifndef __TDATASECTION_HH
    00049 #define __TDATASECTION_HH
    00050
    00051 #include "Tglobals.h"
    00052 #include "TStreamableObject.hh"
    00053 #include "TDataSegmentList.hh"
    00054
    00055 class TOutputObjectStream;
    00056 class TOutputObjectFile;
    00057 class TOutputObjectSocket;
    00058 class TOutputObjectSharedMemory;
    00059
    00060
    00080 class TDataSection
    00081   : public TStreamableObject, public TDataSegmentList
    00082 {
    00083
    00084   public:
    00085     TDataSection( const Tstring& id = TunknownID );
    00086     TDataSection( const TDataSection& right );
    00087     ~TDataSection();
    00088
    00089   public:
    00090     Tint GetRecordSize();
    00091     Tint Record( TOutputObjectStream* objectfile );
    00092     Tvoid Clear();
    00093     Tint Serialize( const Tvoid* buffer );
    00094     Tint Deserialize( const Tvoid* buffer );
    00095     Tint Size() const;
    00096
    00097   public:
    00098     const TDataSection& operator=( const TDataSection& right );
    00099     Tbool operator==( const TDataSection& right ) const;
    00100     Tbool operator!=( const TDataSection& right ) const;
    00101     Tbool operator==( const Tstring& right ) const;
    00102     Tbool operator!=( const Tstring& right ) const;
    00103     const TDataSegment& operator[]( Tint n ) const;
    00104     TDataSegment& operator[]( Tint n );
    00105     const TDataSegment& operator[]( const Tstring& id ) const;
    00106     TDataSegment& operator[]( const Tstring& id );
    00107     friend Tostream& operator<<( Tostream& tos, const TDataSection& right );
    00108
    00109   public:
    00110     Tbool FindDataSegment( const Tstring& id, TDataSegment& segment ) const;
    00111     Tint FindDataSegment( const Tstring& id ) const;
    00112     Tbool FindDataElement( const Tstring& segid, const Tstring& eleid, TDataElement& element ) const;
    00113     Tint FindDataElement( const Tstring& segid, const Tstring& eleid ) const;
    00114     Tbool FindDataElement( Tstring idset[ 2 ], TDataElement& element ) const;
    00115     Tint FindDataElement( Tstring idset[ 2 ] ) const;
    00116     Tbool FindDataElement( const TstringList& idset, TDataElement& element ) const;
    00117     Tint FindDataElement( const TstringList& idset ) const;
    00118
    00119   private:
    00120     Tint record( TOutputObjectFile* ofile );
    00121     Tint record( TOutputObjectSocket* osocket );
    00122     Tint record( TOutputObjectSharedMemory* omemory );
    00123
    00124 };
    00125
    00126 inline Tint TDataSection::Size() const
    00127 {
    00128   return (Tint)size();
    00129 }
    00130
    00131 #endif