![]()  | 
  
    Doxygen_Assn5
    1
    
   91.204 Assignment No. 5 
   | 
 
#include <Element.h>
Public Member Functions | |
| Element () | |
| Element (string strElementName, int nLineNo) | |
| Element (string strElementName, int nLineNo, string strContent) | |
| Element (const Element &orig) | |
| virtual | ~Element () | 
| int | getNLineNo () const | 
| void | setNLineNo (int nLineNo) | 
| string | getStrTagName () const | 
| void | setStrTagName (string strTagName) | 
| string | getStrContent () const | 
| void | setStrContent (string strContent) | 
| vector< Element * > | getVecChildren () const | 
| void | addChild (Element *elemChild) | 
| string | toString () | 
| void | addAttribute (string key, string value) | 
| map< string, string > | getMapAttributes () | 
| void | setElemParent (Element *elemParent) | 
| Element * | getElemParent () const | 
This class represents an element in the XML file. It has been expanded from the version used in Assignment No. 1 to include elements need for Assignment No. 2.
| Element::Element | ( | ) | 
Default constructor, which initializes data members to placeholder values.
Definition at line 32 of file Element.cpp.
| Element::Element | ( | string | strElementName, | 
| int | nLineNo | ||
| ) | 
Two-parameter constructor.
| strElementName | name of element extracted from an element opening tag | 
| nLineNo | line number at which the element opening tag was found | 
Definition at line 46 of file Element.cpp.
| Element::Element | ( | string | strElementName, | 
| int | nLineNo, | ||
| string | strContent | ||
| ) | 
Three-parameter constructor.
| strElementName | name of element extracted from an element opening tag | 
| nLineNo | line number at which the element opening tag was found | 
| strContent | textual content contained in the element | 
Definition at line 60 of file Element.cpp.
| Element::Element | ( | const Element & | orig | ) | 
NetBeans-supplied copy constructor.
NetBeans-supplied copy constructor.
| orig | the original object to copy. | 
Definition at line 20 of file Element.cpp.
      
  | 
  virtual | 
NetBeans-supplied destructor.
Definition at line 26 of file Element.cpp.
| void Element::addAttribute | ( | string | key, | 
| string | value | ||
| ) | 
Add an attribute to the element.
| key | the attribute's key string (to the left of the = sign) | 
| value | the attribute's value string (to the right of the = sign) | 
Definition at line 160 of file Element.cpp.
| void Element::addChild | ( | Element * | elemChild | ) | 
Add a child to the vector of children.
| elemChild | the child to add | 
Definition at line 151 of file Element.cpp.
| Element * Element::getElemParent | ( | ) | const | 
Get Element Parent.
Definition at line 176 of file Element.cpp.
| map< string, string > Element::getMapAttributes | ( | ) | 
Get the map containing the attributes for this element.
Definition at line 168 of file Element.cpp.
| int Element::getNLineNo | ( | ) | const | 
Get the line number at which the current element was found.
Definition at line 97 of file Element.cpp.
| string Element::getStrContent | ( | ) | const | 
Get the textual content contained in the element.
Definition at line 127 of file Element.cpp.
| string Element::getStrTagName | ( | ) | const | 
Get the tag name of the element found.
Definition at line 112 of file Element.cpp.
| vector< Element * > Element::getVecChildren | ( | ) | const | 
Get the vector of children of the current element.
Definition at line 143 of file Element.cpp.
| void Element::setElemParent | ( | Element * | elemParent | ) | 
Set Element Parent.
Definition at line 172 of file Element.cpp.
| void Element::setNLineNo | ( | int | nLineNo | ) | 
Set the line number at which the current element was found.
Definition at line 104 of file Element.cpp.
| void Element::setStrContent | ( | string | strContent | ) | 
Set the textual content contained in the element.
| strContent | the content to set, read from the XML file | 
Definition at line 135 of file Element.cpp.
| void Element::setStrTagName | ( | string | strTagName | ) | 
Set the tag name of the element found.
Definition at line 119 of file Element.cpp.
| string Element::toString | ( | ) | 
Represent the object's information as a string in a reasonable format.
Definition at line 72 of file Element.cpp.
 1.8.10