tesseract v5.3.3.20231005
protos.h File Reference
#include "bitvec.h"
#include "params.h"
#include "unicity_table.h"
#include <tesseract/unichar.h>

Go to the source code of this file.

Classes

struct  tesseract::PROTO_STRUCT
 
struct  tesseract::CLASS_STRUCT
 

Namespaces

namespace  tesseract
 

Macros

#define AddProtoToConfig(Pid, Config)   (SET_BIT(Config, Pid))
 
#define ProtoIn(Class, Pid)   (&(Class)->Prototypes[Pid])
 

Typedefs

using tesseract::CLASS_TYPE = CLASS_STRUCT *
 
using tesseract::CLASSES = CLASS_STRUCT *
 

Functions

void tesseract::InitPrototypes ()
 
AddConfigToClass

Add a new config to this class. Malloc new space and copy the old configs if necessary. Return the config id for the new config.

Parameters
ClassThe class to add to
int tesseract::AddConfigToClass (CLASS_TYPE Class)
 
AddProtoToClass

Add a new proto to this class. Malloc new space and copy the old protos if necessary. Return the proto id for the new proto.

Parameters
ClassThe class to add to
int tesseract::AddProtoToClass (CLASS_TYPE Class)
 
void tesseract::FillABC (PROTO_STRUCT *Proto)
 
void tesseract::FreeClass (CLASS_TYPE Class)
 
void tesseract::FreeClassFields (CLASS_TYPE Class)
 
CLASS_TYPE tesseract::NewClass (int NumProtos, int NumConfigs)
 

Macro Definition Documentation

◆ AddProtoToConfig

#define AddProtoToConfig (   Pid,
  Config 
)    (SET_BIT(Config, Pid))

AddProtoToConfig

Set a single proto bit in the specified configuration.

Definition at line 61 of file protos.h.

◆ ProtoIn

#define ProtoIn (   Class,
  Pid 
)    (&(Class)->Prototypes[Pid])

ProtoIn

Choose the selected prototype in this class record. Return the pointer to it (PROTO_STRUCT *).

Definition at line 70 of file protos.h.