KeyValueResponse Class Reference

KeyValueResponse is a class that parses a stream in the form of key=value, saves and enables access to the results. More...

#include <librets/KeyValueResponse.h>

Inheritance diagram for KeyValueResponse:

RetsObject LoginResponse LogoutResponse

List of all members.

Public Member Functions

virtual ~KeyValueResponse ()
void Parse (istreamPtr inputStream, RetsVersion retsVersion)
 Parse the input stream, converting the data into keys and values.
void Parse (istreamPtr inputStream, RetsVersion retsVersion, EncodingType encoding)
 Parse the input stream, converting the data into keys and values.
std::string GetValue (std::string key) const
 For a given key, return the associated value.
virtual std::ostream & Print (std::ostream &outputStream) const
std::string ToString () const
virtual bool Equals (const RetsObject *object) const

Protected Member Functions

virtual RetsXmlTextEventPtr GetBodyEvent (RetsXmlEventListPtr eventList, RetsVersion retsVersion)=0
RetsXmlTextEventPtr GetBodyEventFromStandardResponse (RetsXmlEventListPtr eventList)
RetsXmlTextEventPtr GetBodyEventFromResponseWithNoRetsResponse (RetsXmlEventListPtr eventList)
RetsXmlTextEventPtr GetBodyEventFromShortResponse (RetsXmlEventListPtr eventList)
virtual void ParsingFinished ()

Static Protected Member Functions

static void AssertEquals (const std::string &expected, const std::string &actual)
static void AssertEquals (int expected, int actual)
static void AssertEventListSize (int expected, RetsXmlEventListPtr eventList)


Detailed Description

KeyValueResponse is a class that parses a stream in the form of key=value, saves and enables access to the results.

Constructor & Destructor Documentation

virtual ~KeyValueResponse (  )  [virtual]


Member Function Documentation

static void AssertEquals ( int  expected,
int  actual 
) [static, protected]

static void AssertEquals ( const std::string &  expected,
const std::string &  actual 
) [static, protected]

static void AssertEventListSize ( int  expected,
RetsXmlEventListPtr  eventList 
) [static, protected]

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

virtual RetsXmlTextEventPtr GetBodyEvent ( RetsXmlEventListPtr  eventList,
RetsVersion  retsVersion 
) [protected, pure virtual]

RetsXmlTextEventPtr GetBodyEventFromResponseWithNoRetsResponse ( RetsXmlEventListPtr  eventList  )  [protected]

RetsXmlTextEventPtr GetBodyEventFromShortResponse ( RetsXmlEventListPtr  eventList  )  [protected]

RetsXmlTextEventPtr GetBodyEventFromStandardResponse ( RetsXmlEventListPtr  eventList  )  [protected]

std::string GetValue ( std::string  key  )  const

For a given key, return the associated value.

If the key is not found and empty string is returned.

Parameters:
key A string representing the key whose value is to be returned.
Returns:
A string containing the value.

void Parse ( istreamPtr  inputStream,
RetsVersion  retsVersion,
EncodingType  encoding 
)

Parse the input stream, converting the data into keys and values.

Parameters:
inputStream A pointer to the input stream.
retsVersion The RETS version.
encoding The character encoding to use when parsing.

void Parse ( istreamPtr  inputStream,
RetsVersion  retsVersion 
)

Parse the input stream, converting the data into keys and values.

Parameters:
inputStream A pointer to the input stream.
retsVersion The RETS version.

virtual void ParsingFinished (  )  [protected, virtual]

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

std::string ToString (  )  const [inherited]


Generated by  doxygen