Go to the source code of this file.
#define ILLEGAL_SHORT_NAME 2000 |
#define NUM_FEATURE_TYPES 4 |
Include Files and Type Defines
Definition at line 27 of file featdefs.h.
void FreeCharDescription |
( |
CHAR_DESC |
CharDesc | ) |
|
Release the memory consumed by the specified character description and all of the features in that description.
- Parameters
-
CharDesc | character description to be deallocated |
Globals:
- Note
- Exceptions: none
-
History: Wed May 23 13:52:19 1990, DSJ, Created.
Definition at line 141 of file featdefs.cpp.
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
void FreeFeatureSet(FEATURE_SET FeatureSet)
Definition at line 121 of file featdefs.cpp.
const FEATURE_DESC_STRUCT * FeatureDesc[NUM_FEATURE_TYPES]
#define NUM_FEATURE_TYPES
Allocate a new character description, initialize its feature sets to be empty, and return it.
Globals:
- Returns
- New character description structure.
- Note
- Exceptions: none
-
History: Wed May 23 15:27:10 1990, DSJ, Created.
Definition at line 164 of file featdefs.cpp.
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
CHAR_DESC_STRUCT * CHAR_DESC
Read a character description from File, and return a data structure containing this information. The data is formatted as follows:
NumberOfSets
ShortNameForSet1 Set1
ShortNameForSet2 Set2
...
Globals:
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
File | open text file to read character description from |
- Returns
- Character description read from File.
- Note
- Exceptions:
-
History: Wed May 23 17:32:48 1990, DSJ, Created.
Definition at line 263 of file featdefs.cpp.
270 if (
tfscanf(File,
"%d", &NumSetsToRead) != 1 ||
275 for (; NumSetsToRead > 0; NumSetsToRead--) {
276 tfscanf(File,
"%s", ShortName);
int tfscanf(FILE *stream, const char *format,...)
const FEATURE_DESC_STRUCT * FeatureDesc[NUM_FEATURE_TYPES]
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
int ShortNameToFeatureType(const FEATURE_DEFS_STRUCT &FeatureDefs, const char *ShortName)
void DoError(int Error, const char *Message)
CHAR_DESC NewCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs)
FEATURE_SET ReadFeatureSet(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc)
Search thru all features currently defined and return the feature type for the feature with the specified short name. Trap an error if the specified name is not found.
Globals:
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
ShortName | short name of a feature type |
- Returns
- Feature type which corresponds to ShortName.
- Note
- Exceptions:
-
History: Wed May 23 15:36:05 1990, DSJ, Created.
Definition at line 302 of file featdefs.cpp.
const FEATURE_DESC_STRUCT * FeatureDesc[NUM_FEATURE_TYPES]
#define ILLEGAL_SHORT_NAME
void DoError(int Error, const char *Message)
Definition at line 219 of file featdefs.cpp.
221 bool anything_written =
false;
222 bool well_formed =
true;
231 anything_written =
true;
238 return anything_written && well_formed;
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
const FEATURE_DESC_STRUCT * Type
Appends a textual representation of CharDesc to str. The format used is to write out the number of feature sets which will be written followed by a representation of each feature set.
Each set starts with the short name for that feature followed by a description of the feature set. Feature sets which are not present are not written.
- Parameters
-
FeatureDefs | definitions of feature types/extractors |
str | string to append CharDesc to |
CharDesc | character description to write to File |
- Note
- Exceptions: none
-
History: Wed May 23 17:21:18 1990, DSJ, Created.
Definition at line 197 of file featdefs.cpp.
200 int NumSetsToWrite = 0;
const FEATURE_DESC_STRUCT * FeatureDesc[NUM_FEATURE_TYPES]
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
void WriteFeatureSet(FEATURE_SET FeatureSet, STRING *str)
void add_str_int(const char *str, int number)
const char* kCNFeatureType |
const char* kGeoFeatureType |
const char* kIntFeatureType |
const char* kMicroFeatureType |
Global Data Definitions and Declarations