Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DigitConverter.h

Go to the documentation of this file.
00001 
00002 //
00003 // This file is part of the MADELINE 2 program 
00004 // written by Edward H. Trager, Ritu Khanna and Adrian Marrs
00005 // Copyright (c) 2005 by the
00006 // Regents of the University of Michigan.
00007 // All Rights Reserved.
00008 // 
00009 // The latest version of this program is available from:
00010 // 
00011 //   http://eyegene.ophthy.med.umich.edu/madeline/
00012 //   
00013 // Released under the GNU General Public License.
00014 // A copy of the GPL is included in the distribution
00015 // package of this software, or see:
00016 // 
00017 //   http://www.gnu.org/copyleft/
00018 //   
00019 // ... for licensing details.
00020 // 
00022 
00024 
00035 #include <string>
00036 #include <ostream>
00037 
00038 #ifndef DigitConverter_INCLUDED
00039 #define DigitConverter_INCLUDED
00040 
00041 class DigitConverter{
00042         
00043 private:
00044         
00045         std::string _input;
00046         
00047         bool _isASCII( void );
00048         void _normalize( void );
00049         
00050         static const char *_digits[];
00051         static const char *_ArabicIndicDigits[];
00052         // 22 rows of ten digits each
00053         // Defining all the non-ASCII decimal
00054         // digits in Unicode version 3:
00055         static const int TABLE_SIZE=220;
00056         
00057 public:
00058         
00059         // Constructors:
00060         DigitConverter(const char *p,int stt, int end);
00061         DigitConverter(const char *p);
00062         DigitConverter(const std::string &input);
00063         
00064         
00065         // Set functions:
00066         void set(const char *p, int stt, int end);
00067         void set(const char *p);
00068         void set(const std::string &input);
00069         
00070         // Get function:
00071         const std::string get( void ) const;
00072         
00073 };
00074 
00075 std::ostream& operator<<(std::ostream& s, const DigitConverter& dc);
00076 
00077 #endif
00078 

Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4