Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgscrscache.h 00003 -------------- 00004 begin : September 6th, 2011 00005 copyright : (C) 2011 by Marco Hugentobler 00006 email : marco dot hugentobler at sourcepole dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QGSCRSCACHE_H 00019 #define QGSCRSCACHE_H 00020 00021 #include "qgscoordinatereferencesystem.h" 00022 #include <QHash> 00023 00024 class CORE_EXPORT QgsCRSCache 00025 { 00026 public: 00027 static QgsCRSCache* instance(); 00028 ~QgsCRSCache(); 00030 const QgsCoordinateReferenceSystem& crsByAuthId( const QString& authid ); 00031 const QgsCoordinateReferenceSystem& crsByEpsgId( long epgs ); 00032 00033 protected: 00034 QgsCRSCache(); 00035 00036 private: 00037 static QgsCRSCache* mInstance; 00038 QHash< QString, QgsCoordinateReferenceSystem > mCRS; 00040 QgsCoordinateReferenceSystem mInvalidCRS; 00041 }; 00042 00043 #endif // QGSCRSCACHE_H