char_type.h

Go to the documentation of this file.
00001 /*
00002 This file is part of hugin.
00003 
00004 hugin is free software: you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation, either version 2 of the License, or
00007 (at your option) any later version.
00008 
00009 hugin is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with hugin.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00034 #ifndef CHARTYPE_H_
00035 #define CHARTYPE_H_
00036 
00037 #include <string>
00038 #include <boost/regex.hpp>
00039 #include <boost/filesystem/fstream.hpp>
00040 #include <boost/filesystem.hpp>
00041 
00042 //#define USE_WCHAR
00043 
00044 namespace makefile
00045 {
00046 #ifdef USE_WCHAR
00047         typedef wchar_t char_type;
00048         typedef unsigned wchar_t uchar_type;
00049 #else
00050         typedef char char_type;
00051         typedef unsigned char uchar_type;
00052 #endif
00053 
00055 typedef std::basic_filebuf<char_type> filebuf;
00056 typedef boost::filesystem::basic_ifstream<char_type> ifstream;
00057 typedef std::basic_istream<char_type> istream;
00058 typedef boost::filesystem::basic_fstream<char_type> fstream;
00059 typedef boost::filesystem::basic_ofstream<char_type> ofstream;
00060 typedef std::basic_ostream<char_type> ostream;
00061 
00063 typedef std::basic_string<char_type>    string;
00064 
00065 #ifdef USE_WCHAR
00067         typedef boost::filesystem::wpath path;
00069         typedef boost::wregex regex;
00071         #define cstr(x) L ## x
00072 #else
00074         typedef boost::filesystem::path path;
00076         typedef boost::regex regex;
00078         #define cstr(x) x
00079 #endif
00080 
00081 }
00082 
00083 #endif /* CHARTYPE_H_ */

Generated on 25 Oct 2014 for Hugintrunk by  doxygen 1.4.7