Open Chinese Convert: Common.hpp Source File

Open Chinese Convert 1.0.2 A project for conversion between Traditional and Simplified Chinese

- Main Page
- Modules
- Classes
- Examples

All Classes Functions Typedefs Modules
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 <iostream>
29 #include <list>
30 #include <map>
31 #include <memory>
32 #include <sstream>
33 #include <string>
34 #include <vector>
35
36 #include <cassert>
37 #include <cstddef>
38 #include <cstdio>
39 #include <cstring>
40 #include <ctime>
41
42 #include "Exception.hpp"
43 #include "Export.hpp"
44 #include "Optional.hpp"
45
46 using std::list;
47 using std::string;
48 using std::vector;
49
50 // Forward decalarations and alias
51 namespace opencc {
52 class BinaryDict;
53 class Config;
54 class Conversion;
55 class ConversionChain;
56 class Converter;
57 class DartsDict;
58 class Dict;
59 class DictEntry;
60 class DictGroup;
61 class Lexicon;
62 class MultiValueDictEntry;
63 class NoValueDictEntry;
64 class Segmentation;
65 class Segments;
66 class SerializableDict;
67 class SingleValueDictEntry;
68 class TextDict;
69 typedef std::shared_ptr<BinaryDict> BinaryDictPtr;
70 typedef std::shared_ptr<Conversion> ConversionPtr;
71 typedef std::shared_ptr<ConversionChain> ConversionChainPtr;
72 typedef std::shared_ptr<Converter> ConverterPtr;
73 typedef std::shared_ptr<DartsDict> DartsDictPtr;
74 typedef std::shared_ptr<Dict> DictPtr;
75 typedef std::shared_ptr<DictGroup> DictGroupPtr;
76 typedef std::shared_ptr<Lexicon> LexiconPtr;
77 typedef std::shared_ptr<Segmentation> SegmentationPtr;
78 typedef std::shared_ptr<Segments> SegmentsPtr;
79 typedef std::shared_ptr<SerializableDict> SerializableDictPtr;
80 typedef std::shared_ptr<TextDict> TextDictPtr;
81 }
82
83 #ifndef PKGDATADIR
84 const string PACKAGE_DATA_DIRECTORY = "";
85 #else // ifndef PKGDATADIR
86 const string PACKAGE_DATA_DIRECTORY = PKGDATADIR "/";
87 #endif // ifndef PKGDATADIR
88
89 #ifndef VERSION
90 # define VERSION "1.0.*"
91 #endif // ifndef VERSION
opencc
Definition: BinaryDict.hpp:24