// UnitCnt.h: interface for the CUnitCnt class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_UNITCNT_H__2EBDCD31_6732_4549_BA52_80DA75B18D0C__INCLUDED_)
#define AFX_UNITCNT_H__2EBDCD31_6732_4549_BA52_80DA75B18D0C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef  BUILD_MCCTRDLL
#define     MCCTRDLLCLASS   __declspec(dllexport)
#else
#define     MCCTRDLLCLASS   __declspec(dllimport)
#endif

class MCCTRDLLCLASS CUnitCnt
{
public:
//  default constructor
    CUnitCnt();

//  default destructor
    virtual ~CUnitCnt();

//  Get unit count
    static unsigned long int GetUnitCnt();

protected:
//  set unit count
    static void SetUnitCnt(unsigned long int uliUnitCnt);

//  increament unit count
    static void IncUnitCnt(unsigned long int uliUnitCnt);

//  reset unit count
    static void ResetUnitCnt();

//  read unit count from file
    static void ReadUnitCntFromFile(const char *ccsKeyName = "Unit Count",
                                    const char *ccsSectionName = "SEMIE10",
                                    const char *ccsFileName = RUNTIME_INI);

//  write unit count to file
    static void WriteUnitCntToFile(const char *ccsKeyName = "Unit Count",
                                   const char *ccsSectionName = "SEMIE10",
                                   const char *ccsFileName = RUNTIME_INI);

private:
    static unsigned long int m_uliUnitCnt;     // unit count
    static unsigned long int m_uliPrevUnitCnt; // prev unit count
};

#endif // !defined(AFX_UNITCNT_H__2EBDCD31_6732_4549_BA52_80DA75B18D0C__INCLUDED_)
