matfiles/MatlabVariableName.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of matfiles.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
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 General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created: 2010-07-22
00021 **  Authors:
00022 **    Marc Wathelet (LGIT, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef MATLABVARIABLENAME_H
00027 #define MATLABVARIABLENAME_H
00028 
00029 #include <GeopsyCore.h>
00030 
00031 class MatlabVariableName : public MetaString
00032 {
00033 public:
00034   MatlabVariableName() {}
00035   MatlabVariableName(const QString& n) {setValue(n);}
00036   MatlabVariableName(const MatlabVariableName& o) : MetaString(o) {}
00037 
00038   virtual const QString& xml_tagName() const {return xmlMatlabVariableNameTag;}
00039   static const QString xmlMatlabVariableNameTag;
00040 
00041   virtual void setId(int id) const {_id=id;}
00042   virtual int id() const {return _id;}
00043   static int staticId() {return _id;}
00044 
00045   virtual QStringList subNames() const;
00046   virtual QString name(int, const QString&) const;
00047   virtual QString baseName(int) const;
00048   virtual QString title(int, const QString&) const;
00049 
00050   virtual bool isReadOnly(int) const {return true;}
00051 
00052   virtual MetaData * clone() const {return new MatlabVariableName(*this);}
00053   virtual const MetaData * defaultValue() const {return &_defaultValue;}
00054 
00055   static void registerNames();
00056 private:
00057   static MatlabVariableName _defaultValue;
00058   static int _id;
00059 };
00060 
00061 #endif // MATLABVARIABLENAME_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines