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

📄 rec_container.cpp

📁 电能质量交换格式转换库
💻 CPP
字号:
/*
**  CPQDIF_R_Container class. Implements a PQDIF record "wrapper" for the
**  data source record. You can cast a standard record object to this class.
**  --------------------------------------------------------------------------
**
**  File name:          $Workfile: rec_container.cpp $
**  Last modified:      $Modtime: 7/07/99 8:11p $
**  Last modified by:   $Author: Erich $
**
**  VCS archive path:   $Archive: /PQDIF/PQDcom/PQDcom4/pqdiflib/rec_container.cpp $
**  VCS revision:       $Revision: 2 $ 
*/
#include "PQDIF_classes.h"


//  Operations

bool CPQDIF_R_Container::GetCompressionInfo
	(
    UINT4&  styleComp,		//	Compression style (output)
    UINT4&  algComp			//	Compression algorithm (output)
	)
{
	bool		status = false;
	GUID		tagRecord;
	PQDIFValue	value;

	//	Verify that the record has the right header tag
	status = HeaderGetTag( tagRecord );
	if( status && PQDIF_IsEqualGUID( tagRecord, tagContainer) && m_pcollMain )
	{
		//	It's the right type of record.
		//	
		status = GetScalarValueInCollection( m_pcollMain, 
			tagCompressionStyleID, ID_PHYS_TYPE_UNS_INTEGER4, value );
		if( status )
		{
			//	We got compression style.
			styleComp = value.uint4;

			//	Now try to get compression algorithm
			status = GetScalarValueInCollection( m_pcollMain, 
				tagCompressionAlgorithmID, ID_PHYS_TYPE_UNS_INTEGER4, value );
			if( status )
			{
				//	We got compression algorithm. All done.
				algComp = value.uint4;
			}
		}
	}

	return status;
}


bool CPQDIF_R_Container::SetInfo
            (
            const   char *  language,
            const   char *  title,
            const   char *  subject,
            const   char *  author,
            const   char *  keywords,
            const   char *  comments,
            const   char *  lastSavedBy,
            const   char *  application,
            const   char *  security,
            const   char *  owner,
            const   char *  copyright,
            const   char *  trademarks,
            const   char *  notes
            )
    {
    bool rc = false;

    if( m_pcollMain )
        {
        //  Add string entries
        m_pcollMain->SetVectorString( tagLanguage, language );
        m_pcollMain->SetVectorString( tagTitle, title );
        m_pcollMain->SetVectorString( tagSubject, subject );
        m_pcollMain->SetVectorString( tagAuthor, author );
        m_pcollMain->SetVectorString( tagKeywords, keywords );
        m_pcollMain->SetVectorString( tagComments, comments );
        m_pcollMain->SetVectorString( tagLastSavedBy, lastSavedBy );
        m_pcollMain->SetVectorString( tagApplication, application );
        m_pcollMain->SetVectorString( tagSecurity, security );

        m_pcollMain->SetVectorString( tagOwner, owner );
        m_pcollMain->SetVectorString( tagCopyright, copyright );
        m_pcollMain->SetVectorString( tagTrademarks, trademarks );

        m_pcollMain->SetVectorString( tagNotes, notes );

        rc = true;
        }

    return rc;
    }

⌨️ 快捷键说明

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