#include <librets/SearchResultSet.h>
Public Member Functions | |
SearchResultSet () | |
Default constructor. | |
virtual | ~SearchResultSet () |
void | Parse (istreamPtr inputStream) |
Parse the result sent back from the client. | |
bool | HasNext () |
Returns true if there are more results. | |
int | GetCount () |
Returns the number of rows in the result set, or -1 if not known. | |
const StringVector | GetColumns () |
Returns the column names. | |
std::string | GetString (int columnIndex) |
Returns the value of a column as a string. | |
std::string | GetString (std::string columnName) |
Returns the value of a column as a string. | |
void | SetEncoding (EncodingType encoding) |
Set the data encoding flag to allow for parsing of extended characters by Expat. | |
void | SetCaching (bool enable) |
Enable or disable caching. | |
EncodingType | GetEncoding () |
Get the current value for the data encoding flag. | |
bool | HasMaxRows () |
Indicate whether the MAXROWS tag has been seen. | |
int | GetReplyCode () |
Returns the RETS-STATUS ReplyCode. | |
std::string | GetReplyText () |
Returns the RETS-STATUS ReplyText. | |
void | SetInputStream (istreamPtr inputStream) |
Set the input stream for Parse. | |
void | SetInputData (BinaryData binaryData) |
Sets the raw RETS data contained in the BinaryData object as the input to be parsed for the search. | |
virtual std::ostream & | Print (std::ostream &outputStream) const |
std::string | ToString () const |
virtual bool | Equals (const RetsObject *object) const |
SearchResultSet | ( | ) |
Default constructor.
virtual ~SearchResultSet | ( | ) | [virtual] |
virtual bool Equals | ( | const RetsObject * | object | ) | const [virtual, inherited] |
const StringVector GetColumns | ( | ) |
Returns the column names.
int GetCount | ( | ) |
Returns the number of rows in the result set, or -1 if not known.
The number of rows is only available if it was specified in the SearchRequest.
EncodingType GetEncoding | ( | ) |
Get the current value for the data encoding flag.
int GetReplyCode | ( | ) |
Returns the RETS-STATUS ReplyCode.
std::string GetReplyText | ( | ) |
Returns the RETS-STATUS ReplyText.
std::string GetString | ( | std::string | columnName | ) |
Returns the value of a column as a string.
columnName | column name |
std::string GetString | ( | int | columnIndex | ) |
Returns the value of a column as a string.
columnIndex | column index |
bool HasMaxRows | ( | ) |
Indicate whether the MAXROWS tag has been seen.
bool HasNext | ( | ) |
Returns true if there are more results.
This may block waiting for data from the RETS server.
HasNext() has the side effect of incrementing the result set to the next result. After a query, this must be called before you can access the first result row.
void Parse | ( | istreamPtr | inputStream | ) |
Parse the result sent back from the client.
inputStream | The input stream containing the data to be parsed. |
RetsReplyException |
virtual std::ostream& Print | ( | std::ostream & | outputStream | ) | const [virtual, inherited] |
Reimplemented in CapabilityUrls, DefaultMetadataCollector, DmqlQuery, FieldCriterion, GetObjectQuery, JunctionCriterion, LiteralCriterion, LookupCriterion, MetadataElement, NotCriterion, RetsXmlAttribute, RetsXmlEndDocumentEvent, RetsXmlEndElementEvent, RetsXmlStartElementEvent, RetsXmlTextEvent, and Uri.
void SetCaching | ( | bool | enable | ) |
Enable or disable caching.
Disabling caching only works in streaming mode. It is up to the caller to verify that the operational mode is proper.
enable | A boolean that if TRUE enables caching. |
void SetEncoding | ( | EncodingType | encoding | ) |
Set the data encoding flag to allow for parsing of extended characters by Expat.
RETS is officially US-ASCII, but this will allow a work around for servers that haven't properly sanitized their data.
encoding | Either RETS_XML_DEFAULT_ENCODING, RETS_XML_ISO_ENCODING or RETS_XML_UTF8_ENCODING. |
void SetInputData | ( | BinaryData | binaryData | ) |
Sets the raw RETS data contained in the BinaryData object as the input to be parsed for the search.
binaryData | A BinaryData object containing the raw RETS data. |
void SetInputStream | ( | istreamPtr | inputStream | ) |
Set the input stream for Parse.
inputStream | Input Stream |
std::string ToString | ( | ) | const [inherited] |