00001 /*************************************************************************** 00002 ** 00003 ** This file is part of GeopsyCore. 00004 ** 00005 ** This library is free software; you can redistribute it and/or 00006 ** modify it under the terms of the GNU Lesser General Public 00007 ** License as published by the Free Software Foundation; either 00008 ** version 2.1 of the License, or (at your option) any later version. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00013 ** License for more details. 00014 ** 00015 ** You should have received a copy of the GNU Lesser General Public 00016 ** License along with this library; if not, write to the Free Software 00017 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 ** 00019 ** See http://www.geopsy.org for more information. 00020 ** 00021 ** Created: 2010-07-28 00022 ** Authors: 00023 ** Marc Wathelet (LGIT, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef METADATAINDEX_H 00028 #define METADATAINDEX_H 00029 00030 #include <QtCore> 00031 00032 #include "GeopsyCoreDLLExport.h" 00033 00034 namespace GeopsyCore { 00035 00036 class GEOPSYCORE_EXPORT MetaDataIndex 00037 { 00038 public: 00039 inline MetaDataIndex(); 00040 inline MetaDataIndex(int id, int subId=0, const QString& index=QString::null); 00041 inline MetaDataIndex(const MetaDataIndex& o); 00042 00043 bool operator<(const MetaDataIndex& o) const; 00044 bool isValid() const {return _id>=0;} 00045 00046 int id() const {return _id;} 00047 int subId() const {return _subId;} 00048 const QString& index() const {return _index;} 00049 00050 void setIndex(const QString& i) {_index=i;} 00051 private: 00052 int _id; 00053 int _subId; 00054 QString _index; 00055 }; 00056 00057 inline MetaDataIndex::MetaDataIndex() 00058 { 00059 _id=-1; 00060 _subId=0; 00061 } 00062 00063 inline MetaDataIndex::MetaDataIndex(int id, int subId, const QString& index) 00064 { 00065 _id=id; 00066 _subId=subId; 00067 _index=index; 00068 } 00069 00070 inline MetaDataIndex::MetaDataIndex(const MetaDataIndex& o) 00071 { 00072 _id=o._id; 00073 _subId=o._subId; 00074 _index=o._index; 00075 } 00076 00077 } // namespace GeopsyCore 00078 00079 #endif // METADATAINDEX_H