A struct containing the offset to the start of a sentence in your buffer or file that you passed to Brevity. You pass a pointer to this type to brGetOffset to get a list of significant sentences. Generally you will allocate an array of SentenceListT to hold the sentences that brGetOffset returns. See the sample code in that function for more information. typedef struct {
size_t start;
size_t length;
}
|
|
Brevity uses a variable of type StatusCodeT to hold an error state. After any function call you should check the value of this variable. If it is non-zero then something is wrong. The following constants define some of the possible types of error that Brevity can return.
Full = 4; // Whatever you have been working with is full. EndOfHitList = 1; // We are at the end of a list eNoError = 0; // NoError; eNoMemory = -1; // Not enough memory eReadOnly = -2; // File is read only eReading = -3; // Error reading from file eWriting = -4; // Error writing to file eSeeking = -5; // We were not able to seek where we wanted eFileNotFound = -6; // Not able to find the file eAcces = -8; // File is locked by another process eFileExists = -9; // File already exists eCantDeleteFile = -10; // For some reason the file can't be deleted eOpeningFile = -11; // Can't open the file specified eClosingFile = -12; // Can't close the file specified eMagicNumberMismatch = -13; // File is not index file or is corrupt eIndexLocked = -14; // Index is locked by another process eNoCurrentKey = -15; // No current key eEndOfWordList = -16; // End of the wordlist eIndexNotLoaded = -17; // The index isn't loaded eGeneralError = -37; // Unlisted error eInvalidPasscode = -42; // An invalid license passcode was entered. eDeletingFile = -44; // Sorry, can't delete the file.
Example
rxQueryData aQuery;
char document[255];
rxGetFirstHit( Router, document, &aQuery, Status );
if( ( *Status < 0 ) || ( *Status == EndOFHitList ) )
return;
// iterate through all the other routing
while( *Status == 0 ) {
// a function you'd write to act on the routing information
TakeAction( document, aQuery.Action );
rxGetNextHit( Router, document, &aQuery, Status );
}