Loading...
Searching...
No Matches
Common.hpp
/*
* Open Chinese Convert
*
* Copyright 2010-2014 Carbo Kuo <byvoid@byvoid.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
// Microsoft Visual C++ specific
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma warning(disable : 4251 4266 4350 4503 4512 4514 4710 4820)
#endif
#include <cstddef>
#include <memory>
#include <string>
#include <vector>
#include "Export.hpp"
#include "Optional.hpp"
// Forward decalarations and alias
namespace opencc {
class Config;
class Conversion;
class ConversionChain;
class Converter;
class Dict;
class DictEntry;
class DictGroup;
class Lexicon;
class MarisaDict;
class MultiValueDictEntry;
class NoValueDictEntry;
class Segmentation;
class Segments;
class SerializableDict;
class SingleValueDictEntry;
class TextDict;
typedef std::shared_ptr<Conversion> ConversionPtr;
typedef std::shared_ptr<ConversionChain> ConversionChainPtr;
typedef std::shared_ptr<Converter> ConverterPtr;
typedef std::shared_ptr<Dict> DictPtr;
typedef std::shared_ptr<DictGroup> DictGroupPtr;
typedef std::shared_ptr<Lexicon> LexiconPtr;
typedef std::shared_ptr<MarisaDict> MarisaDictPtr;
typedef std::shared_ptr<Segmentation> SegmentationPtr;
typedef std::shared_ptr<Segments> SegmentsPtr;
typedef std::shared_ptr<SerializableDict> SerializableDictPtr;
typedef std::shared_ptr<TextDict> TextDictPtr;
class BinaryDict;
class DartsDict;
typedef std::shared_ptr<BinaryDict> BinaryDictPtr;
typedef std::shared_ptr<DartsDict> DartsDictPtr;
} // namespace opencc
#ifndef PKGDATADIR
const std::string PACKAGE_DATA_DIRECTORY = "";
#else // ifndef PKGDATADIR
const std::string PACKAGE_DATA_DIRECTORY = PKGDATADIR "/";
#endif // ifndef PKGDATADIR
#ifndef OPENCC_SEGMENTATION_PLUGIN_DIR
const std::string PACKAGE_SEGMENTATION_PLUGIN_DIRECTORY = "";
#else
const std::string PACKAGE_SEGMENTATION_PLUGIN_DIRECTORY =
OPENCC_SEGMENTATION_PLUGIN_DIR "/";
#endif
#ifndef OPENCC_VERSION
#define OPENCC_VERSION "1.3.*"
#endif // ifndef OPENCC_VERSION
opencc::BinaryDict
Binary dictionary for faster deserialization.
Definition BinaryDict.hpp:47
opencc::Config
Configuration loader.
Definition Config.hpp:36
opencc::ConversionChain
An ordered sequence of Conversion objects applied to pre-segmented text.
Definition ConversionChain.hpp:41
opencc::Conversion
Single-dictionary phrase conversion.
Definition Conversion.hpp:43
opencc::Converter
Abstract base for full-text converters.
Definition Converter.hpp:48
opencc::DartsDict
Darts dictionary.
Definition DartsDict.hpp:29
opencc::DictEntry
Key-values pair entry.
Definition DictEntry.hpp:32
opencc::DictGroup
Group of dictionaries.
Definition DictGroup.hpp:44
opencc::Dict
Abstract class of dictionary.
Definition Dict.hpp:63
opencc::Lexicon
Storage of all entries.
Definition Lexicon.hpp:29
opencc::MarisaDict
Darts dictionary.
Definition MarisaDict.hpp:36
opencc::MultiValueDictEntry
Definition DictEntry.hpp:123
opencc::NoValueDictEntry
Definition DictEntry.hpp:62
opencc::Segmentation
Abstract base for text segmentation.
Definition Segmentation.hpp:38
opencc::Segments
Segmented text.
Definition Segments.hpp:32
opencc::SerializableDict
Serializable dictionary interface.
Definition SerializableDict.hpp:32
opencc::SingleValueDictEntry
Definition DictEntry.hpp:85
opencc::TextDict
Text dictionary.
Definition TextDict.hpp:29