rec_container.cpp

来自「PQDIF软件包(SDK,Software Development Kit),它」· C++ 代码 · 共 55 行

CPP
55
字号
/*
**  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: 8/22/97 2:46p $
**  Last modified by:   $Author: Rob $
**
**  VCS archive path:   $Archive: /ElectrotekLibs/PQDIF/BasicPQDIF/rec_container.cpp $
**  VCS revision:       $Revision: 1 $ 
*/
#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;
}

⌨️ 快捷键说明

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