Open Chinese Convert  1.0.3
A project for conversion between Traditional and Simplified Chinese
Common.hpp
00001 /*
00002  * Open Chinese Convert
00003  *
00004  * Copyright 2010-2014 BYVoid <byvoid@byvoid.com>
00005  *
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 
00019 #pragma once
00020 
00021 // Microsoft Visual C++ specific
00022 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
00023 #pragma warning(disable : 4251 4266 4350 4503 4512 4514 4710 4820)
00024 #endif
00025 
00026 #include <algorithm>
00027 #include <fstream>
00028 #include <functional>
00029 #include <iostream>
00030 #include <list>
00031 #include <map>
00032 #include <memory>
00033 #include <sstream>
00034 #include <string>
00035 #include <vector>
00036 
00037 #include <cassert>
00038 #include <cstddef>
00039 #include <cstdio>
00040 #include <cstring>
00041 #include <ctime>
00042 
00043 #include "Exception.hpp"
00044 #include "Export.hpp"
00045 #include "Optional.hpp"
00046 
00047 using std::list;
00048 using std::string;
00049 using std::vector;
00050 
00051 // Forward decalarations and alias
00052 namespace opencc {
00053 class BinaryDict;
00054 class Config;
00055 class Conversion;
00056 class ConversionChain;
00057 class Converter;
00058 class DartsDict;
00059 class Dict;
00060 class DictEntry;
00061 class DictGroup;
00062 class Lexicon;
00063 class MultiValueDictEntry;
00064 class NoValueDictEntry;
00065 class Segmentation;
00066 class Segments;
00067 class SerializableDict;
00068 class SingleValueDictEntry;
00069 class TextDict;
00070 typedef std::shared_ptr<BinaryDict> BinaryDictPtr;
00071 typedef std::shared_ptr<Conversion> ConversionPtr;
00072 typedef std::shared_ptr<ConversionChain> ConversionChainPtr;
00073 typedef std::shared_ptr<Converter> ConverterPtr;
00074 typedef std::shared_ptr<DartsDict> DartsDictPtr;
00075 typedef std::shared_ptr<Dict> DictPtr;
00076 typedef std::shared_ptr<DictGroup> DictGroupPtr;
00077 typedef std::shared_ptr<Lexicon> LexiconPtr;
00078 typedef std::shared_ptr<Segmentation> SegmentationPtr;
00079 typedef std::shared_ptr<Segments> SegmentsPtr;
00080 typedef std::shared_ptr<SerializableDict> SerializableDictPtr;
00081 typedef std::shared_ptr<TextDict> TextDictPtr;
00082 }
00083 
00084 #ifndef PKGDATADIR
00085 const string PACKAGE_DATA_DIRECTORY = "";
00086 #else // ifndef PKGDATADIR
00087 const string PACKAGE_DATA_DIRECTORY = PKGDATADIR "/";
00088 #endif // ifndef PKGDATADIR
00089 
00090 #ifndef VERSION
00091 #define VERSION "1.0.*"
00092 #endif // ifndef VERSION
 All Classes Functions