Quantum GIS API Documentation  1.8
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 
00026 #ifndef QGSPROJECTFILETRANSFORM_H
00027 #define QGSPROJECTFILETRANSFORM_H
00028 
00029 #include <QString>
00030 #include <QDomDocument>
00031 #include <vector>
00032 #include "qgsprojectversion.h"
00033 
00034 class QgsProjectFileTransform
00035 {
00036   public:
00037     //Default constructor
00038     //QgsProjectfiletransform() {}
00039     ~QgsProjectFileTransform() {}
00040 
00045     QgsProjectFileTransform( QDomDocument & domDocument,
00046                              QgsProjectVersion version )
00047     {
00048       mDom = domDocument;
00049       mCurrentVersion = version;
00050     }
00051 
00052 
00053     bool updateRevision( QgsProjectVersion version );
00054 
00057     void dump();
00058 
00059 
00060   private:
00061 
00062     typedef struct
00063     {
00064       QgsProjectVersion from;
00065       QgsProjectVersion to;
00066       void ( QgsProjectFileTransform::* transformFunc )();
00067     } transform;
00068 
00069     static transform transformers[];
00070 
00071     QDomDocument mDom;
00072     QgsProjectVersion mCurrentVersion;
00073 
00074     // Transformer functions below. Declare functions here,
00075     // define them in qgsprojectfiletransform.cpp and add them
00076     // to the transformArray with proper version number
00077     void transformNull() {}; // Do absolutely nothing
00078     void transform081to090();
00079     void transform091to0100();
00080     void transform0100to0110();
00081     void transform0110to1000();
00082     void transform1100to1200();
00083     void transform1400to1500();
00084 };
00085 
00086 
00087 #endif //QGSPROJECTFILETRANSFORM_H
00088 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines