⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rec_general.h

📁 电能质量交换格式转换库
💻 H
字号:
//  File name:          $Workfile: rec_general.h $
//  Last modified:      $Modtime: 11/13/00 3:54p $
//  Last modified by:   $Author: Bill $
//  
//  VCS archive path:   $Archive: /Hank/DMM/FirmWare/Level3/ObDatMgr/rec_general.h $
//  VCS revision:       $Revision: 7 $ 

//  Forward-declare these classes
class CPQDIF_StreamIO;

class CPQDIF_E_Collection;
class CPQDIF_E_Scalar;
class CPQDIF_E_Vector;

class PQAlloc;

union PQDIFValue;


class CPQDIF_R_General : public CPQDIFRecord
    {
    //  Subclasses are friends - need to fix?
    friend class CPQDIF_R_Observation;
    friend class CPQDIF_R_DataSource;

    public:
        CPQDIF_R_General();
        virtual ~CPQDIF_R_General();

    // Operations
    public:
        virtual bool ReadHeader( CPQDIF_StreamIO * pstream );
        virtual bool ReadBody( CPQDIF_StreamIO * pstream );

        virtual bool WriteHeader( CPQDIF_StreamIO * pstream );
        virtual bool WriteBody( CPQDIF_StreamIO * pstream );

        // Attributes
    public:
        virtual bool HeaderGetPos( LINKABS4& pos ) const
            {
            pos = m_posThisRecord;
            return true;
            }
        virtual bool HeaderSetPos( LINKABS4 pos )
            {
            m_posThisRecord = pos;
            return true;
            }
        virtual bool HeaderGetTag( GUID& tagRecord ) const
            {
            tagRecord = m_headerRecord.tagRecordType;
            return true;
            }
        virtual bool HeaderSetTag( GUID tagRecord )
            {
            m_headerRecord.tagRecordType = tagRecord;
            return true;
            }
        virtual bool HeaderGetSize( SIZE4& sizeHeader, SIZE4& sizeBody ) const
            {
            sizeHeader = m_headerRecord.sizeHeader;
            sizeBody   = m_headerRecord.sizeData  ;
            return true;
            }
        virtual bool HeaderSetSize( SIZE4 sizeHeader, SIZE4 sizeBody )
            {
            m_headerRecord.sizeHeader = sizeHeader;
            m_headerRecord.sizeData   = sizeBody  ;
            return true;
            }
        virtual bool HeaderGetChecksum( UINT& checksum ) const
            {
            checksum = m_headerRecord.checksum;
            return true;
            }
        virtual bool HeaderSetChecksum( UINT checksum )
            {
            m_headerRecord.checksum = checksum;
            return true;
            }
        virtual bool HeaderGetPosNextRecord( LINKABS4& pos ) const
            {
            pos = m_headerRecord.linkNextRecord;
            return true;
            }
        virtual bool HeaderSetPosNextRecord( LINKABS4 pos )
            {
            m_headerRecord.linkNextRecord = pos;
            return true;
            }
        virtual CPQDIF_E_Collection * GetMainCollection( void ) const
            {
            return m_pcollMain;
            }
        virtual bool SetMainCollection( CPQDIF_E_Collection * collMain );
        virtual bool GetChanged( void )
            {
            return m_changed;
            }
        virtual void SetChanged( bool changed )
            {
            m_changed = changed;
            }

        bool SetTimeInMainCollection  (const GUID &tag, const TIMESTAMPPQDIF & timeTime);
        bool SetREAL8InMainCollection (const GUID &tag, const REAL8 dVal);
        bool SetBOOL4InMainCollection (const GUID &tag, const BOOL4 bVal);

        bool GetTimeInMainCollection  (const GUID &tag, TIMESTAMPPQDIF & timeTime);
        bool GetREAL8InMainCollection (const GUID &tag, REAL8 & dVal);
        bool GetBOOL4InMainCollection (const GUID &tag, BOOL4 & bVal);

    // Overrides
    public:

	//  Implementation
	protected:
        bool BufferUpCollection
            ( 
            CPQDIF_StreamIO *       pstream, 
            PQAlloc&                allocator,
            CPQDIF_E_Collection *   pcoll,
            c_collection_element *  aem
            );

    //  Member data
    protected:
        c_record_mainheader     m_headerRecord;
        LINKABS4                m_posThisRecord;

        CPQDIF_E_Collection *   m_pcollMain;    //  Main collection element
                                                //  (if NULL, record has not been read yet)

        bool                    m_changed;      //  Record changed flag.

    };

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -