BT_RLP_Result Class Reference

An individual result returned by a BT_RLP_ResultIterator. More...

#include <bt_rlp.h>

List of all members.

Public Member Functions

virtual const BT_Char16AsCountedUTF16String (BT_UInt32 &length) const THROWS_INVALID_REQUEST=0
 Return a counted UTF-16 string.
virtual void AsIntegerPair (BT_UInt32 &a, BT_UInt32 &b) const THROWS_INVALID_REQUEST=0
 Returns a pair of unsigned 32-bit integers.
virtual void AsIntegerStringVectorPair (BT_UInt32 &index, BT_RLP_Result_StringVector const *&strings) const THROWS_INVALID_REQUEST=0
 Returns a pair consisting of an integer (token) index and a vector of 8-bit strings.
virtual void AsIntegerTriple (BT_UInt32 &a, BT_UInt32 &b, BT_UInt32 &c) const THROWS_INVALID_REQUEST=0
 Returns a triple of unsigned 32-bit integers.
virtual void AsIntegerUTF16StringVectorPair (BT_UInt32 &index, BT_RLP_Result_UTF16StringVector const *&strings) const THROWS_INVALID_REQUEST=0
 Returns a pair consisting of an integer (token) index and a vector of UTF-16 Strings.
virtual BT_Int32 AsSignedInteger () const THROWS_INVALID_REQUEST=0
 Returns a signed 32-bit integer.
virtual const BT_Char8AsString () const THROWS_INVALID_REQUEST=0
 Returns a null-terminated 8-bit string.
virtual BT_UInt32 AsUnsignedInteger () const THROWS_INVALID_REQUEST=0
 Returns an unsigned 32-bit integer.
virtual void AsUnsignedIntegerVector (BT_UInt32 *vector, BT_UInt32 size) const THROWS_INVALID_REQUEST=0
 Returns a vector of unsigned 32-bit integers.
virtual const BT_Char16AsUTF16String () const THROWS_INVALID_REQUEST=0
 Returns a null-terminated UTF-16 encoded Unicode string.
virtual ~BT_RLP_Result ()
 Virtual Destructor.


Detailed Description

This class encapsulates an individual result returned by a result iterator. Member functions are provided to access the actual data contained in the result.

Because each result can contain different types of data, you must use the appropriate accessor for the result. The result data is described in the language processor's documentation.


Constructor & Destructor Documentation

virtual BT_RLP_Result::~BT_RLP_Result (  )  [virtual]

This is the virtual destructor for the BT_RLP_Result class hierarchy.


Member Function Documentation

virtual const BT_Char16* BT_RLP_Result::AsCountedUTF16String ( BT_UInt32 length  )  const [pure virtual]

This member function returns a pointer to a non-null-terminated UTF-16 encoded Unicode string and the its length. Applies to BT_RLP_RAW_TEXT and BT_RLP_TRANSCRIBED_TEXT.

You should not modify the contents of the returned string.

Parameters:
length Reference to the variable that will receive the length of the returned string.
Returns:
Constant pointer to the string.

virtual void BT_RLP_Result::AsIntegerPair ( BT_UInt32 a,
BT_UInt32 b 
) const [pure virtual]

This member function returns a pair of 32-bit unsigned integer values. It is used for results that are returned as integral 2-tuples. Applies to BT_RLP_TOKEN_OFFSET and BT_RLP_BASE_NOUN_PHRASE.

Parameters:
a Reference to the variable to hold the first value.
b Reference to the variable to hold the second value.

virtual void BT_RLP_Result::AsIntegerStringVectorPair ( BT_UInt32 index,
BT_RLP_Result_StringVector const *&  strings 
) const [pure virtual]

This member function returns a pair consisting of an index and a vector of UTF-16 encoded Unicode strings. Applies to BT_RLP_ALTERNATIVE_PARTS_OF_SPEECH.

You should not modify the contents of the returned strings.

Parameters:
index Reference to the variable to hold the returned index value.
strings Reference to the variable to hold the returned string vector.

virtual void BT_RLP_Result::AsIntegerTriple ( BT_UInt32 a,
BT_UInt32 b,
BT_UInt32 c 
) const [pure virtual]

This member function returns a triple of 32-bit unsigned integer value It is used for results that are returned as integral 3-tuples. Applies to BT_RLP_NAMED_ENTITY and BT_RLP_SCRIPT_REGION.

Parameters:
a Reference to the variable to hold the first value.
b Reference to the variable to hold the second value.
c Reference to the variable to hold the third value.

virtual void BT_RLP_Result::AsIntegerUTF16StringVectorPair ( BT_UInt32 index,
BT_RLP_Result_UTF16StringVector const *&  strings 
) const [pure virtual]

This member function returns a pair consisting of an index and a vector of UTF-16 encoded Unicode strings. Applies to BT_RLP_COMPOUND, BT_RLP_READING, BT_RLP_TOKEN_VARIATIONS,BT_RLP_ALTERNATIVE_LEMMAS, BT_RLP_ALTERNATIVE_NORM, BT_RLP_ALTERNATIVE_ROOTS, BT_RLP_ALTERNATIVE_STEMS.

You should not modify the contents of the returned strings.

Parameters:
index Reference to the variable to hold the returned index value.
strings Reference to the variable to hold the returned string vector.

virtual BT_Int32 BT_RLP_Result::AsSignedInteger (  )  const [pure virtual]

This member function returns a signed 32-bit integer value. Reserved for future use.

Returns:
The integer value.

virtual const BT_Char8* BT_RLP_Result::AsString (  )  const [pure virtual]

This member function returns a pointer to a null-terminated 8-bit character string. No particular encoding is specified and is defined by the processor generating the result. Applies to BT_RLP_PART_OF_SPEECH, BT_RLP_DETECTED_ENCODING, and BT_RLP_MIME_TYPE.

You should not modify the contents of the returned string.

Returns:
Constant pointer to the string.

virtual BT_UInt32 BT_RLP_Result::AsUnsignedInteger (  )  const [pure virtual]

This member function returns an unsigned 32-bit integer value. Applies to BT_RLP_DETECTED_LANGUAGE, BT_RLP_DETECTED_SCRIPT, BT_RLP_STOPWORD, BT_RLP_SENTENCE_BOUNDARY, BT_RLP_TEXT_BOUNDARIES, BT_RLP_MAP_OFFSETS and BT_RLP_TOKEN_SOURCE_ID.

Returns:
The integer value.

virtual void BT_RLP_Result::AsUnsignedIntegerVector ( BT_UInt32 vector,
BT_UInt32  size 
) const [pure virtual]

This member function returns a vector of 32-bit unsigned integer values. It generalized AsIntegerPair and AsIntegerTriple, and supports processors that create data values organized as larger vectors of integers. Applies to BT_RLP_LANGUAGE_REGION (6 integers).

Parameters:
vector A pointer to a vector of integers to hold the values.
size The number of slots in 'vector'. If this is smaller than the natural number of items for an interation, the code fills the available slots and returns no indication of truncation.

virtual const BT_Char16* BT_RLP_Result::AsUTF16String (  )  const [pure virtual]

This member function returns a pointer to a null-terminated UTF-16 encoded Unicode string. Applies to BT_RLP_TOKEN, BT_RLP_TOKEN_SOURCE_NAME, BT_RLP_STEM, BT_RLP_LEMMA, BT_RLP_MANY_TO_ONE_NORMALIZED_TOKEN, BT_RLP_NORMALIZED_TOKEN, BT_RLP_ROOTS, BT_RLP_GAZETTEER_NAMES.

You should not modify the contents of the returned string.

Returns:
Constant pointer to the string.


The documentation for this class was generated from the following file:

Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.