You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
617 B
C++

/**
* @file VariantCast.h
* @brief 从_variant_t类型转换为其他类型
* @author 沙漠乌鸦
* @time 2009-10-17
*/
#pragma once
class AFX_EXT_CLASS CVariantCast
{
public:
CVariantCast(void);
CVariantCast(const _variant_t& value);
~CVariantCast(void);
void SetVariantValue(const _variant_t& value);
void GetValue(CString& strValue);
void GetValue(double& dValue);
void GetValue(bool& bValue);
void GetValue(COleDateTime& timeValue);
void GetValue(int& iValue);
void GetValue(long& lValue);
void GetValue(float& fValue);
void GetValue(short& sValue);
private:
_variant_t m_variant; ///< _variant_t型值
};