DeltaQt  Version 0.2.0 End user documentation
A C++/Qt library for parsing DELTA (DEscription Language for TAxonomy) files
F:/Code/DeltaQt/DeltaQt/deltacharactertype.h
Go to the documentation of this file.
00001 /*  Copyright 2012 Craig Robbins
00002 
00003     This file is part of DeltaQt
00004 
00005     DeltaQt is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 3 of the License, or
00008     (at your option) any later version.
00009 
00010     DeltaQt is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with DeltaQt.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 #ifndef DELTACHARACTERTYPE_H
00020 #define DELTACHARACTERTYPE_H
00021 
00022 #include <QString>
00023 
00024 class DeltaCharacterType
00025 {
00026 public:
00027 
00028     // DCT = Delta Character Type
00029     // PT  = Pseudo Type
00030     typedef enum
00031     {
00032         DCT_UnorderedMultistate,
00033         DCT_OrderedMultistate,
00034         DCT_IntegerNumeric,
00035         DCT_RealNumeric,
00036         DCT_Text,
00037 
00038         DCT_PT_Variable,            
00039         DCT_PT_Unknown,             
00040         DCT_PT_NotApplicable,       
00041 
00042         DCT_PT_ERROR,               
00043         DCT_PT_NOTSET               
00044     } TypeId;
00045 
00046     typedef struct
00047     {
00048         TypeId id;      
00049         QString abbr;   
00050         QString name;   
00051     } Def;
00052 
00053 
00054     DeltaCharacterType();
00055 
00056     static const Def* deltaCharType(TypeId id);
00057 
00058     static const Def* deltaCharType(QString abbrev);
00059 
00060     static QString name(TypeId id);
00061 
00062     static unsigned charTypesCount(void);
00063 
00064 
00065     /* ----------------------------------------------------------------------
00066      * Debugging functions
00067      */
00068     static void debugOutputCharTypes(void);
00069 
00070 private:
00071     static const DeltaCharacterType::Def m_types[];
00072 
00073 };
00074 
00075 #endif // DELTACHARACTERTYPE_H
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines