clocationexamplelocationengine.h

来自「Symbian Demo, why do you want to get 20 」· C头文件 代码 · 共 85 行

H
85
字号
/*
* ============================================================================
*  Name     : CLocationExampleLocationEngine.h
*  Part of  : Location Example
*  Created  : 21.05.2007 by Forum Nokia
*  Description:
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

// INCLUDE FILES
#ifndef __CLOCATIONEXAMPLELOCATIONENGINE_H__
#define __CLOCATIONEXAMPLELOCATIONENGINE_H__

// INCLUDES
#include <e32base.h>
#include <lbsposition.h>


// CONSTANS
const TReal KEarthRadius = 6378136.0f; // Meters
const TReal KPiDouble = 3.1415926535897932384626433832795;
const TReal KDectorad = KPiDouble / 180;

_LIT(KInvalidDirection,"-");
_LIT(KNorth,"N");
_LIT(KSouth,"S");
_LIT(KWest,"W");
_LIT(KEast,"E");
_LIT(KNorthWest,"NW");
_LIT(KNorthEast,"NE");
_LIT(KSouthEast,"SE");
_LIT(KSouthWest,"SW");

class CLocationExampleLocationEngine : public CBase
	{
    public:

        /**
        * NewL
        * Two-phased constructor.
        * @return a pointer to the created instance of CLocationExampleLocationEngine
        */
        static CLocationExampleLocationEngine* NewL();

        /**
        * NewLC
        * Two-phased constructor.
        * @return a pointer to the created instance of CLocationExampleLocationEngine
        */
    	static CLocationExampleLocationEngine* NewLC();

        /**
        * Destructor.
        */
    	virtual ~CLocationExampleLocationEngine();

    public:
        TReal CalculateDistanceL(const TCoordinate& aFrom, const TCoordinate& aTo);
        TDesC& GetDirection(const TCoordinate& aFrom, const TCoordinate& aTo);
    

    private:
        /**
        * ConstructL.
        * 2nd phase constructor.
        */
    	void ConstructL();

        /**
        * CLocationExampleLocationEngine.
        * C++ default constructor.
        */
    	CLocationExampleLocationEngine();

    private:

        TBuf<2>             iDirection;

	};


#endif // __CLOCATIONEXAMPLELOCATIONENGINE_H__

⌨️ 快捷键说明

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