#include <bt_rlp.h>
Public Member Functions | |
virtual void | DestroyResultIterator (BT_RLP_ResultIterator *iter) const =0 |
Destroy a result iterator created by GetResultIterator. | |
virtual void | DestroyResultStorage ()=0 |
Frees results storage in a context. | |
virtual BT_UInt32 | GetIntegerResult (BT_RLP_ResultType type) const THROWS_INVALID_REQUEST=0 |
Gets a result stored as a 32-bit integer for a particular result type. | |
virtual void const * | GetLNI () const =0 |
INTERNAL interface. | |
virtual void | GetProcessorReport (char *buffer, BT_UInt32 buffer_size) const =0 |
Gets a report on the processors defined in an environment. | |
virtual bool | GetPropertyValue (char const *property_name, char *output, unsigned max_output) const =0 |
Gets string property for communication with processors. | |
virtual BT_RLP_ResultIterator * | GetResultIterator (BT_RLP_ResultType type) const =0 |
Gets a result iterator for a particular result type. | |
virtual BT_Char8 const * | GetStringResult (BT_RLP_ResultType type) const THROWS_INVALID_REQUEST=0 |
Gets a result stored as an 8-bit character string. | |
virtual BT_UInt32 const * | GetUnsignedIntegerArrayResults (BT_RLP_ResultType type, BT_UInt32 &count) const THROWS_INVALID_REQUEST=0 |
Gets a pointer to the data for a particular result type as a vector of unsigned integers. | |
virtual BT_Char16 const * | GetUTF16StringResult (BT_RLP_ResultType type, BT_UInt32 &resultLength) const THROWS_INVALID_REQUEST=0 |
Gets a result stored as a UTF-16 string. | |
virtual BT_Result | ProcessBuffer (const unsigned char *inbuf, BT_UInt32 inlen, BT_LanguageID lid=BT_LANGUAGE_UNKNOWN, char const *character_encoding=0, char const *mime_type=0)=0 |
Processes a text buffer within the context. | |
virtual BT_Result | ProcessFile (const char *infile, BT_LanguageID lid=BT_LANGUAGE_UNKNOWN, char const *character_encoding=0, char const *mime_type=0)=0 |
Processes a file within the context. | |
virtual BT_Result | ProcessUTF16Buffer (BT_Char16 const *inbuf, BT_UInt32 inlen, BT_LanguageID lid=BT_LANGUAGE_UNKNOWN)=0 |
Processes a buffer of native Unicode text. | |
virtual void | SetPropertyValue (char const *property_name, char const *property_value)=0 |
Sets a string property for communication with processors. | |
virtual | ~BT_RLP_Context () |
Virtual Destructor. |
virtual BT_RLP_Context::~BT_RLP_Context | ( | ) | [virtual] |
This is the virtual destructor for the BT_RLP_Context class hierarchy.
virtual void BT_RLP_Context::DestroyResultIterator | ( | BT_RLP_ResultIterator * | iter | ) | const [pure virtual] |
This member function destroys an iterator created with the GetResultIterator.
iter | The iterator to destroy. |
virtual void BT_RLP_Context::DestroyResultStorage | ( | ) | [pure virtual] |
This member frees any storage allocated for results in the context. This operation is automatic when the context is destroyed or when a new Process call is made, but for some purposes the caller might wish to do this explicitly.
virtual BT_UInt32 BT_RLP_Context::GetIntegerResult | ( | BT_RLP_ResultType | type | ) | const [pure virtual] |
This member function returns a 32-bit integer containing the value of the supplied result type.
type | The type of result to return. |
virtual void BT_RLP_Context::GetProcessorReport | ( | char * | buffer, | |
BT_UInt32 | buffer_size | |||
) | const [pure virtual] |
This member function fills in a string with a report on the processors defined in the environment. The string is delimited with vertical bars:
proc0|desc0|proc1|desc1|...|procN|descN||
The string will be null-terminated on return. If the string was truncated, the trailing | will be missing.
buffer | destination for the report. | |
buffer_size | the maximum length of the report buffer. |
virtual bool BT_RLP_Context::GetPropertyValue | ( | char const * | property_name, | |
char * | output, | |||
unsigned | max_output | |||
) | const [pure virtual] |
This member function retrieves the value of a named property on the context. This API is provided so that your application can see what it has stored for a property value.
property_name | The name of the property to get. | |
output | The buffer to receive the value. | |
max_output | The size of the buffer. |
virtual BT_RLP_ResultIterator* BT_RLP_Context::GetResultIterator | ( | BT_RLP_ResultType | type | ) | const [pure virtual] |
This member function returns a result iterator for the supplied result type.
It is your responsibility to destroy the iterator when you are done with it using the DestroyResultIterator member function.
type | The type of result to return an iterator for. |
virtual BT_Char8 const* BT_RLP_Context::GetStringResult | ( | BT_RLP_ResultType | type | ) | const [pure virtual] |
This member function returns a pointer to a zero-terminated 8-bit character string containing the value of the supplied result type.
type | The type of result to return. |
virtual BT_UInt32 const* BT_RLP_Context::GetUnsignedIntegerArrayResults | ( | BT_RLP_ResultType | type, | |
BT_UInt32 & | count | |||
) | const [pure virtual] |
This member function returns a pointer to result data for the supplied result type in the form of an array of BT_UInt32.
You may only call this member funtion for those result types which are defined to support it. The results that return character data do not support it.
type | The type of result to return an iterator for. | |
count | (output) The number of BT_UInt32 items in the result. |
virtual BT_Char16 const* BT_RLP_Context::GetUTF16StringResult | ( | BT_RLP_ResultType | type, | |
BT_UInt32 & | resultLength | |||
) | const [pure virtual] |
This member function returns a pointer to a UTF-16 string containing the value of the supplied result type. The string may not be zero-terminated.
type | The type of result to return. | |
resultLength | The length of the result. |
virtual BT_Result BT_RLP_Context::ProcessBuffer | ( | const unsigned char * | inbuf, | |
BT_UInt32 | inlen, | |||
BT_LanguageID | lid = BT_LANGUAGE_UNKNOWN , |
|||
char const * | character_encoding = 0 , |
|||
char const * | mime_type = 0 | |||
) | [pure virtual] |
This member function processes the text in a buffer within the context.
This function can be called repeatedly to process multiple buffers with a single context. Existing result iterators are invalid after ProcessFile is called and must not be used.
inbuf | Pointer to the buffer containing the configuration data. The buffer can be discarded after this function is called. | |
inlen | Length (in bytes) of the buffer. | |
lid | Optional language id indicating the name of the language in the input. If it is not supplied, RLI (see RLI in RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations. | |
character_encoding | Optional character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings in RLP Application Developer's Guide and Unicode Converter in RLP Application Developer's Guide. | |
mime_type | Optional MIMETYPE of the data. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide. |
BT_OK | The buffer was processed correctly. |
virtual BT_Result BT_RLP_Context::ProcessFile | ( | const char * | infile, | |
BT_LanguageID | lid = BT_LANGUAGE_UNKNOWN , |
|||
char const * | character_encoding = 0 , |
|||
char const * | mime_type = 0 | |||
) | [pure virtual] |
This member function processes the text in a file within the context. The file is read in its entirety and then passed to the context's processors.
This function can be called repeatedly to process multiple files with a single context. Existing result iterators are invalid after ProcessFile is called and must not be used.
infile | The pathname of the input file. | |
lid | Optional language id indicating the name of the language in the input. If it is not supplied, RLI (see RLI in RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations. | |
character_encoding | Optional character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings in RLP Application Developer's Guide and Unicode Converter in RLP Application Developer's Guide. | |
mime_type | Optional MIMETYPE of the data. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide. |
BT_OK | The file was processed correctly. |
virtual BT_Result BT_RLP_Context::ProcessUTF16Buffer | ( | BT_Char16 const * | inbuf, | |
BT_UInt32 | inlen, | |||
BT_LanguageID | lid = BT_LANGUAGE_UNKNOWN | |||
) | [pure virtual] |
This member function processes a buffer of native-byte-order UTF-16 text within the context.
inbuf | Pointer to the buffer containing the UTF-16 input data. The buffer can be discarded after this function is called. | |
inlen | Number of characters (not bytes) in the buffer. | |
lid | Optional language id indicating the name of the language in the input. If it is not supplied, RLI (see RLI in RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations. |
virtual void BT_RLP_Context::SetPropertyValue | ( | char const * | property_name, | |
char const * | property_value | |||
) | [pure virtual] |
This member function sets a named property on the context to the specified value. Specific processors document properties that they read to control their operations. In some cases, you may have to construct a string representation of a numeric value to set a property.
property_name | The name of the property to set (e.g. "com.basistech.rexml.output_pathname"). | |
property_value | The value to set for the property. |
Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.