/***************************************************************************
**
**    $Header$
**
**    $Log$
** 
****************************************************************************/

/****************************************************************************
**  Name:   AdFmtStr.h
**
**  Description:  This file describe the sub class of string format type.
**
**  Status:       Initialization
**                1996/02/15                    Daniel Lin
**
**  Copyright (C) 1996 Microtek International.  All rights reserved.
*****************************************************************************/

#ifndef __ADFMTSTR__H
#define __ADFMTSTR__H

class CFormatString : public CFormatType
{
protected:
    // Attribute
    CString  m_strOrigin;
    DWORD    m_dwData;

    BOOL     Dec2Num     ( char* lpsz,
                           DWORD& dw );   // decimal string to numerica
    BOOL     Hex2Num     ( const char* lpsz,
                           DWORD& dw );   // hexadecimal string to numerica
    BOOL     Str2Num     ( char* lpsz,
                           DWORD& dw );   // string to numerica
    BOOL     Str2Num     ( CString str,
                           DWORD& dw );   // string to numerica
    BOOL     Num2HexStr  ( const DWORD dw,
                           char* lpsz );  // convert numerica to hex string
    BOOL     Num2HexStr  ( const DWORD dw,
                           CString& str); // convert numerica to hex string
    BOOL     Num2DecStr  ( const DWORD dw,
                           char* lpsz );  // convert numerica to dec string
    BOOL     Num2DecStr  ( const DWORD dw,
                           CString& str); // convert numerica to dec string
public:
    // Constructor
    CFormatString()
    {
        m_strOrigin = "";
        m_dwData = 0;
    }

    // Implementation
    virtual  void  Convert();
};

#endif

///////////////////////////////////(EOF)///////////////////////////////////////

