|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : LandmarksUtils.h 00004 * Part of : Landmark Reference Application 00005 * Interface : - 00006 * Description : See class description below 00007 * Version : 1.0 00008 * 00009 * Copyright (c) 2004-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 #ifndef __LANDMARKS_UTILS_H__ 00017 #define __LANDMARKS_UTILS_H__ 00018 00019 /** 00020 * Coordinate data conversion utility methods 00021 */ 00022 class LandmarksUtils 00023 { 00024 public: 00025 00026 /** Converts a float to a descriptor. 00027 * Handles the case when the float is NaN 00028 * @param aFloat the source float 00029 * @param aDes the target descriptor 00030 * @param aRealFormat Format used for real value conversion to text 00031 */ 00032 static void FloatToDesL(TReal aFloat, TDes& aDes, TRealFormat aRealFormat); 00033 00034 /** Converts a float lat/long to a descriptor. 00035 * Handles the case when the float is NaN 00036 * @param aFloat the source float 00037 * @param aDes the target descriptor 00038 */ 00039 static void LatLongToDes(TReal aFloat, TDes& aDes); 00040 00041 /** Converts a latitude or longitude in float format 00042 * to a descriptor containing degrees, minutes and seconds. 00043 * 00044 * @param aLatLong the source float 00045 * @param aDes the target descriptor (degrees, minutes and seconds) 00046 */ 00047 static void LatLongFloatToDegMinSecDesL(TReal aLatLong, TDes& aDes); 00048 00049 /** Panics the application due to some programming error 00050 * @param aReason The panic number or error code 00051 */ 00052 static void Panic(TInt aReason); 00053 00054 private: 00055 00056 //! Internal struct for LatLongFloatToDegMinSecDesL 00057 struct SDegMinSec 00058 { 00059 //! degrees 00060 TInt32 iDegrees; 00061 //! minutes 00062 TInt32 iMinutes; 00063 //! seconds 00064 TReal iSeconds; 00065 }; 00066 }; 00067 00068 #endif // __LANDMARKS_UTILS_H__ 00069 00070 // End of File 00071
|
© Nokia 2006 |