Open Chinese Convert  1.0.3
A project for conversion between Traditional and Simplified Chinese
Common.hpp
1 /*
2  * Open Chinese Convert
3  *
4  * Copyright 2010-2014 BYVoid <byvoid@byvoid.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #pragma once
20 
21 // Microsoft Visual C++ specific
22 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
23 #pragma warning(disable : 4251 4266 4350 4503 4512 4514 4710 4820)
24 #endif
25 
26 #include <algorithm>
27 #include <fstream>
28 #include <functional>
29 #include <iostream>
30 #include <list>
31 #include <map>
32 #include <memory>
33 #include <sstream>
34 #include <string>
35 #include <vector>
36 
37 #include <cassert>
38 #include <cstddef>
39 #include <cstdio>
40 #include <cstring>
41 #include <ctime>
42 
43 #include "Exception.hpp"
44 #include "Export.hpp"
45 #include "Optional.hpp"
46 
47 using std::list;
48 using std::string;
49 using std::vector;
50 
51 // Forward decalarations and alias
52 namespace opencc {
53 class BinaryDict;
54 class Config;
55 class Conversion;
56 class ConversionChain;
57 class Converter;
58 class DartsDict;
59 class Dict;
60 class DictEntry;
61 class DictGroup;
62 class Lexicon;
63 class MultiValueDictEntry;
64 class NoValueDictEntry;
65 class Segmentation;
66 class Segments;
67 class SerializableDict;
68 class SingleValueDictEntry;
69 class TextDict;
70 typedef std::shared_ptr<BinaryDict> BinaryDictPtr;
71 typedef std::shared_ptr<Conversion> ConversionPtr;
72 typedef std::shared_ptr<ConversionChain> ConversionChainPtr;
73 typedef std::shared_ptr<Converter> ConverterPtr;
74 typedef std::shared_ptr<DartsDict> DartsDictPtr;
75 typedef std::shared_ptr<Dict> DictPtr;
76 typedef std::shared_ptr<DictGroup> DictGroupPtr;
77 typedef std::shared_ptr<Lexicon> LexiconPtr;
78 typedef std::shared_ptr<Segmentation> SegmentationPtr;
79 typedef std::shared_ptr<Segments> SegmentsPtr;
80 typedef std::shared_ptr<SerializableDict> SerializableDictPtr;
81 typedef std::shared_ptr<TextDict> TextDictPtr;
82 }
83 
84 #ifndef PKGDATADIR
85 const string PACKAGE_DATA_DIRECTORY = "";
86 #else // ifndef PKGDATADIR
87 const string PACKAGE_DATA_DIRECTORY = PKGDATADIR "/";
88 #endif // ifndef PKGDATADIR
89 
90 #ifndef VERSION
91 #define VERSION "1.0.*"
92 #endif // ifndef VERSION
Definition: BinaryDict.hpp:24