Quantum GIS API Documentation  1.7.4
src/core/qgsprojectfiletransform.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           qgsprojectfiletransform.h  -  description
00003                              -------------------
00004     begin                : Sun 15 dec 2007
00005     copyright            : (C) 2007 by Magnus Homann
00006     email                : magnus at homann.se
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 
00025 /* $Id$ */
00026 
00027 #ifndef QGSPROJECTFILETRANSFORM_H
00028 #define QGSPROJECTFILETRANSFORM_H
00029 
00030 #include <QString>
00031 #include <QDomDocument>
00032 #include <vector>
00033 #include "qgsprojectversion.h"
00034 
00035 class QgsProjectFileTransform
00036 {
00037   public:
00038     //Default constructor
00039     //QgsProjectfiletransform() {}
00040     ~QgsProjectFileTransform() {}
00041 
00046     QgsProjectFileTransform( QDomDocument & domDocument,
00047                              QgsProjectVersion version )
00048     {
00049       mDom = domDocument;
00050       mCurrentVersion = version;
00051     }
00052 
00053 
00054     bool updateRevision( QgsProjectVersion version );
00055 
00058     void dump();
00059 
00060 
00061   private:
00062 
00063     typedef struct
00064     {
00065       QgsProjectVersion from;
00066       QgsProjectVersion to;
00067       void ( QgsProjectFileTransform::* transformFunc )();
00068     } transform;
00069 
00070     static transform transformers[];
00071 
00072     QDomDocument mDom;
00073     QgsProjectVersion mCurrentVersion;
00074 
00075     // Transformer functions below. Declare functions here,
00076     // define them in qgsprojectfiletransform.cpp and add them
00077     // to the transformArray with proper version number
00078     void transformNull() {}; // Do absolutely nothing
00079     void transform081to090();
00080     void transform091to0100();
00081     void transform0100to0110();
00082     void transform0110to1000();
00083     void transform1100to1200();
00084     void transform1400to1500();
00085 };
00086 
00087 
00088 #endif //QGSPROJECTFILETRANSFORM_H
00089 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines