comparison mupdf-source/thirdparty/tesseract/src/ccutil/ccutil.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 ///////////////////////////////////////////////////////////////////////
2 // File: ccutil.h
3 // Description: ccutil class.
4 // Author: Samuel Charron
5 //
6 // (C) Copyright 2006, Google Inc.
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 ///////////////////////////////////////////////////////////////////////
18
19 #ifndef TESSERACT_CCUTIL_CCUTIL_H_
20 #define TESSERACT_CCUTIL_CCUTIL_H_
21
22 #ifndef _WIN32
23 # include <pthread.h>
24 # include <semaphore.h>
25 #endif
26
27 #ifdef HAVE_CONFIG_H
28 # include "config_auto.h" // DISABLED_LEGACY_ENGINE
29 #endif
30
31 #ifndef DISABLED_LEGACY_ENGINE
32 # include "ambigs.h"
33 #endif
34 #include "errcode.h"
35 #ifdef _WIN32
36 # include "host.h" // windows.h for HANDLE, ...
37 #endif
38 #include "params.h"
39 #include "unicharset.h"
40
41 namespace tesseract {
42
43 class TESS_API CCUtil {
44 public:
45 CCUtil();
46 virtual ~CCUtil();
47
48 public:
49 // Read the arguments and set up the data path.
50 void main_setup(const std::string &argv0, // program name
51 const std::string &basename // name of image
52 );
53 ParamsVectors *params() {
54 return &params_;
55 }
56
57 std::string datadir; // dir for data files
58 std::string imagebasename; // name of image
59 std::string lang;
60 std::string language_data_path_prefix;
61 UNICHARSET unicharset;
62 #ifndef DISABLED_LEGACY_ENGINE
63 UnicharAmbigs unichar_ambigs;
64 #endif
65 std::string imagefile; // image file name
66 std::string directory; // main directory
67
68 private:
69 ParamsVectors params_;
70
71 public:
72 // Member parameters.
73 // These have to be declared and initialized after params_ member, since
74 // params_ should be initialized before parameters are added to it.
75 INT_VAR_H(ambigs_debug_level);
76 BOOL_VAR_H(use_ambigs_for_adaption);
77 };
78
79 } // namespace tesseract
80
81 #endif // TESSERACT_CCUTIL_CCUTIL_H_