RetsXmlStartElementEvent Class Reference

(Internal) RetsXmlStartElementEvent is a class that handles the Expat "start" element XML event. More...

#include <librets/RetsXmlStartElementEvent.h>

Inheritance diagram for RetsXmlStartElementEvent:

RetsXmlEvent RetsObject

List of all members.

Public Types

enum  Type { START_ELEMENT, END_ELEMENT, TEXT, END_DOCUMENT }
 Clasify the type of the Xml event. More...

Public Member Functions

 RetsXmlStartElementEvent (int lineNumber=-1, int columnNumber=-1)
 Contstruct the object with a default line and column number.
virtual ~RetsXmlStartElementEvent ()
virtual Type GetType () const
 Always returns START_ELEMENT.
void SetName (std::string name)
 Sets the name of this event.
std::string GetName () const
 Returns the name of the attribute.
void AddAttribute (RetsXmlAttributePtr attribute)
 Add the given RetsXmlAttribute object to the vector of attribute values.
void AddAttribute (std::string name, std::string value)
 Add the attribute and value to the vector of attribute values.
RetsXmlAttributeListPtr GetAttributes ()
 Get a pointer to the list of attributes.
std::string GetAttributeValue (std::string name)
 For the named attribute, return the value.
virtual std::ostream & Print (std::ostream &outputStream) const
 Prints the object in a standard form for debugging and error reporting.
virtual bool Equals (const RetsObject *rhs) const
 Checks to see if the element name and the vector of attributes are identical between two RetsXmlStartElementEvent objects.
int GetLineNumber () const
 Get the line number for this element.
int GetColumnNumber () const
 Get the column number for this element.
std::string ToString () const

Protected Member Functions

std::ostream & PrintLineAndColumn (std::ostream &out) const

Protected Attributes

int mLineNumber
int mColumnNumber


Detailed Description

(Internal) RetsXmlStartElementEvent is a class that handles the Expat "start" element XML event.

Member Enumeration Documentation

enum Type [inherited]

Clasify the type of the Xml event.

Enumerator:
START_ELEMENT  Indicates this is a start element (<RETS>).
END_ELEMENT  Indicates this is an end element (</RETS>).
TEXT  Indicates this is a text element.
END_DOCUMENT  Indicates this is the end of the XML document.


Constructor & Destructor Documentation

RetsXmlStartElementEvent ( int  lineNumber = -1,
int  columnNumber = -1 
)

Contstruct the object with a default line and column number.

These numbers should reflect the line/column from the XML stream where this element can be found and is used for debugging.

virtual ~RetsXmlStartElementEvent (  )  [virtual]


Member Function Documentation

void AddAttribute ( std::string  name,
std::string  value 
)

Add the attribute and value to the vector of attribute values.

Parameters:
name A string containing the name of the attribute.
value A string containing the value of the attribute.

void AddAttribute ( RetsXmlAttributePtr  attribute  ) 

Add the given RetsXmlAttribute object to the vector of attribute values.

Parameters:
attribute The attribute being pushed to the end of the vector.

virtual bool Equals ( const RetsObject rhs  )  const [virtual]

Checks to see if the element name and the vector of attributes are identical between two RetsXmlStartElementEvent objects.

Returns:
TRUE if the names and attributes match.

Reimplemented from RetsObject.

RetsXmlAttributeListPtr GetAttributes (  ) 

Get a pointer to the list of attributes.

Returns:
A RetsXmlAttributeList pointer for the list of attributes.

std::string GetAttributeValue ( std::string  name  ) 

For the named attribute, return the value.

Parameters:
name A string containing the name of the attribute.
Returns:
A string containing the value for that attribute or an empty string if the attribute does not exist.

int GetColumnNumber (  )  const [inherited]

Get the column number for this element.

Returns:
An integer containing the column number.

int GetLineNumber (  )  const [inherited]

Get the line number for this element.

Returns:
An integer containing the line number.

std::string GetName (  )  const

Returns the name of the attribute.

Returns:
string containing the name of the attribute.

virtual Type GetType (  )  const [virtual]

Always returns START_ELEMENT.

Returns:
START_ELEMENT

Implements RetsXmlEvent.

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

Prints the object in a standard form for debugging and error reporting.

Reimplemented from RetsObject.

std::ostream& PrintLineAndColumn ( std::ostream &  out  )  const [protected, inherited]

void SetName ( std::string  name  ) 

Sets the name of this event.

Parameters:
name A string containing the name of the XML element being parsed.

std::string ToString (  )  const [inherited]


Member Data Documentation

int mColumnNumber [protected, inherited]

int mLineNumber [protected, inherited]


Generated by  doxygen