📄 mapinfo.h
字号:
/*
============================================================================
Name : MapInfo.h
Author :
Version : 1.0
Copyright : Your copyright notice
Description : CMapInfo declaration
============================================================================
*/
#ifndef MAPINFO_H
#define MAPINFO_H
// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <gdi.h>
#include "map/SourceMapInfo.h"
#include "map/MapPointInfo.h"
#include "map/SourceMapProvider.h"
// CLASS DECLARATION
/**
* CMapInfo
* 地图信息
*/
class CMapInfo : public CBase
{
public:
// Constructors and destructor
/**
* Destructor.
*/
~CMapInfo();
/**
* Two-phased constructor.
*/
static CMapInfo* NewL(RFs& aFs, CSourceMapProvider& aSourceMapProvider);
/**
* Two-phased constructor.
*/
static CMapInfo* NewLC(RFs& aFs, CSourceMapProvider& aSourceMapProvider);
private:
/**
* Constructor for performing 1st stage construction
*/
CMapInfo(RFs& aFs, CSourceMapProvider& aSourceMapProvider);
/**
* EPOC default constructor for performing 2nd stage construction
*/
void ConstructL();
private:
void ClearMatrix();
void ParseMapSizeL(const TDesC8& aDesC, TInt& aOffset);
void ParseSourceMapL(const TDesC8& aDesC, TInt& aOffset);
void ParseMapPointItemsL(const TDesC8& aDesC, TInt& aOffset);
private:
TInt iMapIndex;
TInt iMapWidth;
TInt iMapHeight;
RPointerArray<CSourceMapInfo> iUsedSourceMaps;
RFs& iFs;
/**
* 地图矩阵二维数组
*/
RPointerArray<CMapPointInfo> iMapMatrix;
CSourceMapProvider& iSourceMapProvider;
public:
void LoadMapL(const TInt aMapIndex);
/**
* 绘制地图
*/
void DrawMap(CBitmapContext& aGc, const TRect& aMapRect, const TInt aMapOffsetX, const TInt aMapOffsetY);
};
#endif // MAPINFO_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -