classify: Fix warnings from Doxygen (#1439)

* classify/adaptive: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/clusttool: Fix warnings from Doxygen and remove wrong API function

Remove the function ReadProtoStyle because it did not match
the documentation. It was only used locally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/cutoffs: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/intproto: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/normmatch: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-03-29 11:58:23 +02:00 committed by zdenop
parent 2cc46fa6d4
commit f29c12a087
6 changed files with 31 additions and 47 deletions

View File

@ -293,10 +293,10 @@ void Classify::PrintAdaptedTemplates(FILE *File, ADAPT_TEMPLATES Templates) {
/*---------------------------------------------------------------------------*/
/**
* Read an adapted class description from File and return
* Read an adapted class description from file and return
* a ptr to the adapted class.
*
* @param File open file to read adapted class from
* @param fp open file to read adapted class from
* @return Ptr to new adapted class.
*
* @note Globals: none
@ -346,11 +346,11 @@ ADAPT_CLASS ReadAdaptedClass(TFile *fp) {
/*---------------------------------------------------------------------------*/
namespace tesseract {
/**
* Read a set of adapted templates from File and return
* Read a set of adapted templates from file and return
* a ptr to the templates.
*
* @param File open text file to read adapted templates from
* @return Ptr to adapted templates read from File.
* @param fp open text file to read adapted templates from
* @return Ptr to adapted templates read from file.
*
* @note Globals: none
* @note Exceptions: none
@ -379,10 +379,10 @@ ADAPT_TEMPLATES Classify::ReadAdaptedTemplates(TFile *fp) {
/*---------------------------------------------------------------------------*/
/**
* Read a permanent configuration description from File
* Read a permanent configuration description from file
* and return a ptr to it.
*
* @param File open file to read permanent config from
* @param fp open file to read permanent config from
* @return Ptr to new permanent configuration description.
*
* @note Globals: none
@ -405,10 +405,10 @@ PERM_CONFIG ReadPermConfig(TFile *fp) {
/*---------------------------------------------------------------------------*/
/**
* Read a temporary configuration description from File
* Read a temporary configuration description from file
* and return a ptr to it.
*
* @param File open file to read temporary config from
* @param fp open file to read temporary config from
* @return Ptr to new temporary configuration description.
*
* @note Globals: none

View File

@ -38,7 +38,7 @@ using tesseract::TFile;
* This routine reads a single integer from the specified
* file and checks to ensure that it is between 0 and
* MAXSAMPLESIZE.
* @param File open text file to read sample size from
* @param fp open text file to read sample size from
* @return Sample size
* @note Globals: None
* @note Exceptions: ILLEGALSAMPLESIZE illegal format or range
@ -64,7 +64,7 @@ uint16_t ReadSampleSize(TFile *fp) {
* - ILLEGALCIRCULARSPEC
* - ILLEGALESSENTIALSPEC
* - ILLEGALMINMAXSPEC
* @param File open text file to read N parameter descriptions from
* @param fp open text file to read N parameter descriptions from
* @param N number of parameter descriptions to read
* @return Pointer to an array of parameter descriptors.
* @note Globals: None
@ -109,7 +109,7 @@ PARAM_DESC *ReadParamDesc(TFile *fp, uint16_t N) {
* - ILLEGALMEANSPEC
* - ILLEGALVARIANCESPEC
* - ILLEGALDISTRIBUTION
* @param File open text file to read prototype from
* @param fp open text file to read prototype from
* @param N number of dimensions used in prototype
* @return List of prototypes
* @note Globals: None
@ -136,7 +136,20 @@ PROTOTYPE *ReadPrototype(TFile *fp, uint16_t N) {
else
Proto->Significant = FALSE;
Proto->Style = ReadProtoStyle(shape_token);
switch (shape_token[0]) {
case 's':
Proto->Style = spherical;
break;
case 'e':
Proto->Style = elliptical;
break;
case 'a':
Proto->Style = automatic;
break;
default:
tprintf("Invalid prototype style specification:%s\n", shape_token);
Proto->Style = elliptical;
}
if (SampleCount < 0) DoError(ILLEGALSAMPLECOUNT, "Illegal sample count");
Proto->NumSamples = SampleCount;
@ -179,37 +192,13 @@ PROTOTYPE *ReadPrototype(TFile *fp, uint16_t N) {
return Proto;
}
/**
* This routine reads an single token from the specified
* text file and interprets it as a prototype specification.
* @param File open text file to read prototype style from
* @return Prototype style read from text file
* @note Globals: None
* @note Exceptions: ILLEGALSTYLESPEC illegal prototype style specification
* @note History: 6/8/89, DSJ, Created.
*/
PROTOSTYLE ReadProtoStyle(const char *shape) {
switch (shape[0]) {
case 's':
return spherical;
case 'e':
return elliptical;
case 'a':
return automatic;
default:
break;
}
tprintf("Invalid prototype style specification:%s\n", shape);
return elliptical;
}
/**
* This routine reads N floats from the specified text file
* and places them into Buffer. If Buffer is NULL, a buffer
* is created and passed back to the caller. If EOF is
* encountered before any floats can be read, NULL is
* returned.
* @param File open text file to read floats from
* @param fp open text file to read floats from
* @param N number of floats to read
* @param Buffer pointer to buffer to place floats into
* @return Pointer to buffer holding floats or NULL if EOF

View File

@ -34,8 +34,6 @@ PARAM_DESC *ReadParamDesc(tesseract::TFile *fp, uint16_t N);
PROTOTYPE *ReadPrototype(tesseract::TFile *fp, uint16_t N);
PROTOSTYLE ReadProtoStyle(const char *style);
FLOAT32 *ReadNFloats(tesseract::TFile *fp, uint16_t N, FLOAT32 Buffer[]);
void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc[]);

View File

@ -36,14 +36,12 @@
namespace tesseract {
/**
* Open Filename, read in all of the class-id/cutoff pairs
* Open file, read in all of the class-id/cutoff pairs
* and insert them into the Cutoffs array. Cutoffs are
* indexed in the array by class id. Unused entries in the
* array are set to an arbitrarily high cutoff value.
* @param CutoffFile name of file containing cutoff definitions
* @param fp file containing cutoff definitions
* @param Cutoffs array to put cutoffs into
* @param swap
* @param end_offset
* @return none
* @note Globals: none
* @note Exceptions: none

View File

@ -752,7 +752,7 @@ namespace tesseract {
* This routine reads a set of integer templates from
* File. File must already be open and must be in the
* correct binary format.
* @param File open file to read templates from
* @param fp open file to read templates from
* @return Pointer to integer templates read from File.
* @note Globals: none
* @note Exceptions: none

View File

@ -235,8 +235,7 @@ namespace tesseract {
* This routine allocates a new data structure to hold
* a set of character normalization protos. It then fills in
* the data structure by reading from the specified File.
* @param File open text file to read normalization protos from
* @param end_offset
* @param fp open text file to read normalization protos from
* Globals: none
* @return Character normalization protos.
* @note Exceptions: none