Permalink
Browse files

Clean more include files and include statements

The changes are based on an analysis done with include-what-you-use.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information...
stweil committed Jun 24, 2018
1 parent a32d24f commit 7768f9b33682d01b741cc6ac5237f2930d185f86
@@ -1,8 +1,8 @@
/**********************************************************************
* File: control.h (Formerly control.h)
* Description: Module-independent matcher controller.
* Author: Ray Smith
* Created: Thu Apr 23 11:09:58 BST 1992
* Author: Ray Smith
* Created: Thu Apr 23 11:09:58 BST 1992
*
* (C) Copyright 1992, Hewlett-Packard Ltd.
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,14 +22,8 @@
* Module-independent matcher controller.
*/
#ifndef CONTROL_H
#define CONTROL_H
#include "params.h"
#include "ocrblock.h"
#include "ratngs.h"
#include "statistc.h"
#include "pageres.h"
#ifndef CONTROL_H
#define CONTROL_H
enum ACCEPTABLE_WERD_TYPE
{
@@ -1,8 +1,8 @@
/******************************************************************
* File: docqual.h (Formerly docqual.h)
* Description: Document Quality Metrics
* Author: Phil Cheatle
* Created: Mon May 9 11:27:28 BST 1994
* Author: Phil Cheatle
* Created: Mon May 9 11:27:28 BST 1994
*
* (C) Copyright 1994, Hewlett-Packard Ltd.
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,10 +17,14 @@
*
**********************************************************************/
#ifndef DOCQUAL_H
#define DOCQUAL_H
#ifndef DOCQUAL_H
#define DOCQUAL_H
#include "control.h"
#include <cstdint> // for int16_t
class PAGE_RES_IT;
class ROW;
class WERD_RES;
enum GARBAGE_LEVEL
{
@@ -32,4 +36,5 @@ enum GARBAGE_LEVEL
int16_t word_blob_quality(WERD_RES *word, ROW *row);
void reject_whole_page(PAGE_RES_IT &page_res_it);
#endif
@@ -20,16 +20,12 @@
#ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H_
#define TESSERACT_CCMAIN_EQUATIONDETECT_H_
#include "blobbox.h"
#include "equationdetectbase.h"
#include "genericvector.h"
#include "tesseractclass.h"
#include "unichar.h"
class BLOBNBOX;
class BLOB_CHOICE;
class BLOB_CHOICE_LIST;
class TO_BLOCK_LIST;
#include "blobbox.h" // for BLOBNBOX (ptr only), BlobSpecialText...
#include "equationdetectbase.h" // for EquationDetectBase
#include "genericvector.h" // for GenericVector
#include "tesseractclass.h" // for Tesseract
#include "unichar.h" // for UNICHAR_ID
class TBOX;
class UNICHARSET;
@@ -1,31 +1,32 @@
/******************************************************************
* File: fixspace.h (Formerly fixspace.h)
* Description: Implements a pass over the page res, exploring the alternative
* spacing possibilities, trying to use context to improve the
word spacing
* Author: Phil Cheatle
* Created: Thu Oct 21 11:38:43 BST 1993
*
* (C) Copyright 1993, Hewlett-Packard Ltd.
** 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.
*
**********************************************************************/
* spacing possibilities, trying to use context to improve the
* word spacing
* Author: Phil Cheatle
* Created: Thu Oct 21 11:38:43 BST 1993
*
* (C) Copyright 1993, Hewlett-Packard Ltd.
** 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.
*
**********************************************************************/
#ifndef FIXSPACE_H
#define FIXSPACE_H
#ifndef FIXSPACE_H
#define FIXSPACE_H
#include "pageres.h"
#include "params.h"
class WERD_RES;
class WERD_RES_LIST;
void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list);
void transform_to_next_perm(WERD_RES_LIST &words);
void fixspace_dbg(WERD_RES *word);
#endif
@@ -20,13 +20,15 @@
#ifndef TESSERACT_CCMAIN_OSDETECT_H_
#define TESSERACT_CCMAIN_OSDETECT_H_
#include "strngs.h"
#include "unicharset.h"
#include "platform.h" // for TESS_API
class TO_BLOCK_LIST;
class BLOBNBOX;
class BLOB_CHOICE_LIST;
class BLOBNBOX_CLIST;
class BLOB_CHOICE_LIST;
class STRING;
class TO_BLOCK_LIST;
class UNICHARSET;
template <typename T> class GenericVector;
namespace tesseract {
class Tesseract;
@@ -1,8 +1,8 @@
/******************************************************************
* File: output.h (Formerly output.h)
* Description: Output pass
* Author: Phil Cheatle
* Created: Thu Aug 4 10:56:08 BST 1994
* Author: Phil Cheatle
* Created: Thu Aug 4 10:56:08 BST 1994
*
* (C) Copyright 1994, Hewlett-Packard Ltd.
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,17 +17,17 @@
*
**********************************************************************/
#ifndef OUTPUT_H
#define OUTPUT_H
#ifndef OUTPUT_H
#define OUTPUT_H
#include "params.h"
//#include "epapconv.h"
#include "pageres.h"
class BLOCK;
class WERD;
/** test line ends */
char determine_newline_type(WERD *word, ///< word to do
BLOCK *block, ///< current block
WERD *next_word, ///< next word
BLOCK *next_block ///< block of next word
);
#endif
@@ -17,25 +17,36 @@
*
**********************************************************************/
#include <algorithm>
#include <ctype.h>
#include <memory> // std::unique_ptr
#include "genericvector.h"
#include "helpers.h"
#include "mutableiterator.h"
#include "ocrpara.h"
#include "pageres.h"
#include "paragraphs.h"
#include "paragraphs_internal.h"
#include "publictypes.h"
#include "ratngs.h"
#include "rect.h"
#include "statistc.h"
#include "strngs.h"
#include "tprintf.h"
#include "unicharset.h"
#include "unicodes.h"
#include <ctype.h> // for isspace
#include <math.h> // for abs
#include <stdio.h> // for snprintf
#include <stdlib.h> // for abs
#include <string.h> // for strchr, strlen
#include <algorithm> // for max
#include <memory> // for unique_ptr
#include "genericvector.h" // for GenericVector, GenericVectorEqEq
#include "helpers.h" // for UpdateRange, ClipToRange
#include "host.h" // for NearlyEqual
#include "mutableiterator.h" // for MutableIterator
#include "ocrblock.h" // for BLOCK
#include "ocrpara.h" // for ParagraphModel, PARA, PARA_IT, PARA...
#include "ocrrow.h" // for ROW
#include "pageiterator.h" // for PageIterator
#include "pageres.h" // for PAGE_RES_IT, WERD_RES, ROW_RES, BLO...
#include "paragraphs_internal.h" // for RowScratchRegisters, SetOfModels
#include "pdblock.h" // for PDBLK
#include "polyblk.h" // for POLY_BLOCK
#include "publictypes.h" // for JUSTIFICATION_LEFT, JUSTIFICATION_R...
#include "ratngs.h" // for WERD_CHOICE
#include "rect.h" // for TBOX
#include "statistc.h" // for STATS
#include "strngs.h" // for STRING
#include "tprintf.h" // for tprintf
#include "unichar.h" // for UNICHAR, UNICHAR_ID
#include "unicharset.h" // for UNICHARSET
#include "unicodes.h" // for kPDF, kRLE
#include "werd.h" // for WERD, W_REP_CHAR
namespace tesseract {
@@ -20,14 +20,15 @@
#ifndef TESSERACT_CCMAIN_PARAGRAPHS_H_
#define TESSERACT_CCMAIN_PARAGRAPHS_H_
#include "rect.h"
#include "ocrpara.h"
#include "genericvector.h"
#include "strngs.h"
#include "rect.h" // for TBOX
#include "strngs.h" // for STRING
class PARA_LIST;
class ParagraphModel;
class WERD;
class UNICHARSET;
struct PARA;
template <typename T> class GenericVector;
namespace tesseract {
@@ -19,28 +19,26 @@
//
// The parameters editor is used to edit all the parameters used within
// tesseract from the ui.
#ifdef _WIN32
#else
#include <cstdlib>
#include <cstdio>
#endif
#include <map>
#include <memory>
// Include automatically generated configuration file if running autoconf.
#ifdef HAVE_CONFIG_H
#include "config_auto.h"
#endif
#ifndef GRAPHICS_DISABLED
#include "paramsd.h"
#include "params.h"
#include "scrollview.h"
#include "svmnode.h"
#include "paramsd.h"
#include <cstdio> // for fclose, fopen, fprintf, sprintf, FILE
#include <cstdlib> // for atoi, strtod
#include <cstring> // for strcmp, strcspn, strlen, strncpy
#include <map> // for map, _Rb_tree_iterator, map<>::iterator
#include <memory> // for unique_ptr
#include <utility> // for pair
#include "genericvector.h" // for GenericVector
#include "params.h" // for ParamsVectors, StringParam, BoolParam
#include "scrollview.h" // for SVEvent, ScrollView, SVET_POPUP
#include "svmnode.h" // for SVMenuNode
#include "tesseractclass.h" // for Tesseract
#define VARDIR "configs/" /*parameters files */
#define MAX_ITEMS_IN_SUBMENU 30
@@ -354,4 +352,4 @@ void ParamsEditor::WriteParams(char *filename,
}
fclose(fp);
}
#endif
#endif // GRAPHICS_DISABLED
@@ -24,12 +24,20 @@
#ifndef GRAPHICS_DISABLED
#include "elst.h"
#include "params.h"
#include "tesseractclass.h"
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
#include "scrollview.h" // for ScrollView (ptr only), SVEvent (ptr only)
#include "strngs.h" // for STRING
class SVMenuNode;
namespace tesseract {
class BoolParam;
class DoubleParam;
class IntParam;
class StringParam;
class Tesseract;
}
// A list of all possible parameter types used.
enum ParamType {
VT_INTEGER,
@@ -17,19 +17,18 @@
//
///////////////////////////////////////////////////////////////////////
#ifndef PGEDIT_H
#define PGEDIT_H
#ifndef PGEDIT_H
#define PGEDIT_H
#include "ocrblock.h"
#include "ocrrow.h"
#include "werd.h"
#include "rect.h"
#include "params.h"
#include "tesseractclass.h"
#include "params.h" // for INT_VAR_H, IntParam, STRING_VAR_H, StringParam
#include "scrollview.h" // for SVEvent (ptr only), SVEventHandler, ScrollView
class ScrollView;
class SVMenuNode;
struct SVEvent;
class BLOCK_LIST;
class PAGE_RES;
namespace tesseract {
class Tesseract;
}
// A small event handler class to process incoming events to
// this window.
Oops, something went wrong.

0 comments on commit 7768f9b

Please sign in to comment.