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

📄 proc_not.cpp

📁 PQDIF软件包(SDK,Software Development Kit),它能转换、生成并且显示PQDIF文件.对于开发电力系统的数据输出非常有用。
💻 CPP
字号:
/*
**  CPQDIF_SP_Nothing class. Implements a "do nothing" processor.
**  Used when the PQDIF file is not compressed -- or for certain records
**  which are never compressed.
**  --------------------------------------------------------------------------
**
**  File name:          $Workfile: proc_not.cpp $
**  Last modified:      $Modtime: 3/24/98 10:53a $
**  Last modified by:   $Author: Rob $
**
**  VCS archive path:   $Archive: /Hank/DMM/FirmWare/Level3/ObDatMgr/proc_not.cpp $
**  VCS revision:       $Revision: 5 $ 
*/
#include "PQDIF_classes.h"
#include "zlib.h"


//  Construction
//  ============

CPQDIF_SP_Nothing::CPQDIF_SP_Nothing()
    {
    //  Allocate a reasonably sized buffer; perhaps this
    //  will help performance.
    AllocateBuffer( 4096 );
    }

CPQDIF_SP_Nothing::~CPQDIF_SP_Nothing()
    {
    }

bool CPQDIF_SP_Nothing::StreamEncode( void )
    {
    bool    status = FALSE;
    bool    haveData = FALSE;
    long    sizeActual = 0;

    if( m_buffer && m_maxBuffer > 0 )
        {
        haveData = TRUE;
        while( haveData )
            {
            haveData = m_pstrm->ProcessRead( m_buffer, m_maxBuffer, sizeActual );
            if( haveData )
                {
                m_checksum = adler32( m_checksum, (const Bytef *) m_buffer, sizeActual );
                status = m_pstrm->ProcessWrite( m_buffer, sizeActual );
                }
            }
        }

    return status;
    }

bool CPQDIF_SP_Nothing::StreamDecode( void )
    {
    bool    status = FALSE;

    //  Since we're doing nothing, decoding is the same
    //  as encoding!
    status = StreamEncode();

    return status;
    }

⌨️ 快捷键说明

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