📄 el_base.h
字号:
/*
** class CPQDIF_Element
** --------------------------------------------------------------------------
**
** File name: $Workfile: el_base.h $
** Last modified: $Modtime: 12/01/00 8:34a $
** Last modified by: $Author: Bill $
**
** VCS archive path: $Archive: /Hank/DMM/FirmWare/Level3/ObDatMgr/el_base.h $
** VCS revision: $Revision: 11 $
*/
union PQDIFValue
{
BOOL1 bool1;
BOOL2 bool2;
BOOL4 bool4;
CHAR1 char1; // ASCII string character
CHAR2 char2; // Unicode string character
INT1 int1;
INT2 int2;
INT4 int4;
UINT1 uint1;
UINT2 uint2;
UINT4 uint4;
REAL4 real4;
REAL8 real8;
COMPLEX8 complex8;
COMPLEX16 complex16;
TIMESTAMPPQDIF ts;
GUID guid;
};
class CPQDIF_Element
{
// Construct/destruct
public:
CPQDIF_Element();
virtual ~CPQDIF_Element() {}
// Operator(s)
public:
// Attributes
public:
virtual long GetElementType( void ) const
{return -1; }
inline CPQDIFRecord * GetRecord( void )
{
return m_pRecord;
}
virtual void SetRecord( CPQDIFRecord * pRecord )
{
m_pRecord = pRecord;
}
// Operations
public:
inline const GUID& GetTag( void ) const
{ return m_tag; }
inline void SetTag( const GUID& tag )
{
m_tag = tag;
if( m_pRecord )
m_pRecord->SetChanged( true );
}
inline long GetPhysicalType( void ) const
{ return m_typePhysical; }
virtual void SetPhysicalType( long type )
{
m_typePhysical = type;
if( m_pRecord )
m_pRecord->SetChanged( true );
}
// Implementation
protected:
#ifdef PQDIF_USE_COM // if COM support, then VARIANT is available
bool convertToVariant( const PQDIFValue& valuePQDIF, VARIANT & valueVariant ) const;
bool convertFromVariant( const VARIANT & valueVariant, PQDIFValue& valuePQDIF ) const;
#endif
bool convertToDouble( const PQDIFValue& m_value, double& value ) const;
bool convertFromDouble( double value, PQDIFValue& m_value ) const;
long getNumBytesOfType( void ) const;
inline BYTE * getPointerToValue( PQDIFValue& value ) const { return (BYTE *)&value; }
inline const BYTE * getPointerToValue( const PQDIFValue& value ) const { return (const BYTE *)&value; }
// Member data
protected:
GUID m_tag; // Tag for this element.
long m_typePhysical; // Physical type for this element.
CPQDIFRecord * m_pRecord; // The record that this element
// is associated with.
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -