SearchResultSet Class Reference

SearchResultSet contains the API that is used to handle the response to the RETS SEARCH transaciton. More...

#include <librets/SearchResultSet.h>

Inheritance diagram for SearchResultSet:

RetsObject

List of all members.

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


Detailed Description

SearchResultSet contains the API that is used to handle the response to the RETS SEARCH transaciton.

Constructor & Destructor Documentation

SearchResultSet (  ) 

Default constructor.

virtual ~SearchResultSet (  )  [virtual]


Member Function Documentation

virtual bool Equals ( const RetsObject object  )  const [virtual, inherited]

const StringVector GetColumns (  ) 

Returns the column names.

Returns:
A string vector containing 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.

Returns:
An integer representing the number of rows, or -1

EncodingType GetEncoding (  ) 

Get the current value for the data encoding flag.

Returns:
string value of encoding flag.

int GetReplyCode (  ) 

Returns the RETS-STATUS ReplyCode.

Returns:
int value of ReplyCode

std::string GetReplyText (  ) 

Returns the RETS-STATUS ReplyText.

Returns:
string value of ReplyText.

std::string GetString ( std::string  columnName  ) 

Returns the value of a column as a string.

Parameters:
columnName column name
Returns:
string value of column

std::string GetString ( int  columnIndex  ) 

Returns the value of a column as a string.

Parameters:
columnIndex column index
Returns:
string value of column

bool HasMaxRows (  ) 

Indicate whether the MAXROWS tag has been seen.

Returns:
Boolean value

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.

Returns:
If there is a next item or not.

void Parse ( istreamPtr  inputStream  ) 

Parse the result sent back from the client.

Parameters:
inputStream The input stream containing the data to be parsed.
Exceptions:
RetsReplyException 

virtual std::ostream& Print ( std::ostream &  outputStream  )  const [virtual, inherited]

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.

Parameters:
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.

Parameters:
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.

Parameters:
binaryData A BinaryData object containing the raw RETS data.

void SetInputStream ( istreamPtr  inputStream  ) 

Set the input stream for Parse.

Parameters:
inputStream Input Stream

std::string ToString (  )  const [inherited]


Generated by  doxygen