00001 // 00002 // WorldGPS.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 00022 #if !defined(AFX_WORLDGPS_H__763AAF9D_7289_45A1_9026_4E2BF703C0E8__INCLUDED_) 00023 #define AFX_WORLDGPS_H__763AAF9D_7289_45A1_9026_4E2BF703C0E8__INCLUDED_ 00024 00025 #pragma once 00026 00027 class CWorldCountry; 00028 class CWorldCity; 00029 class CXMLElement; 00030 00031 00032 class CWorldGPS 00033 { 00034 // Construction 00035 public: 00036 CWorldGPS(); 00037 ~CWorldGPS(); 00038 00039 // Attributes 00040 public: 00041 CWorldCountry* m_pCountry; 00042 DWORD m_nCountry; 00043 00044 // Operations 00045 public: 00046 BOOL Load(LPCTSTR pszFile = NULL); 00047 void Clear(); 00048 protected: 00049 void Serialize(CArchive& ar); 00050 BOOL LoadFrom(CXMLElement* pRoot); 00051 00052 00053 }; 00054 00055 class CWorldCountry 00056 { 00057 // Construction 00058 public: 00059 CWorldCountry(); 00060 ~CWorldCountry(); 00061 00062 // Attributes 00063 public: 00064 CHAR m_szID[2]; 00065 CString m_sName; 00066 public: 00067 CWorldCity* m_pCity; 00068 DWORD m_nCity; 00069 00070 // Operations 00071 public: 00072 void Serialize(CArchive& ar); 00073 BOOL LoadFrom(CXMLElement* pRoot); 00074 void Clear(); 00075 00076 }; 00077 00078 class CWorldCity 00079 { 00080 // Attributes 00081 public: 00082 CString m_sName; 00083 CString m_sState; 00084 float m_nLatitude; 00085 float m_nLongitude; 00086 00087 // Operations 00088 public: 00089 void Serialize(CArchive& ar); 00090 BOOL LoadFrom(CXMLElement* pRoot); 00091 00092 }; 00093 00094 #endif // !defined(AFX_WORLDGPS_H__763AAF9D_7289_45A1_9026_4E2BF703C0E8__INCLUDED_)