Public Member Functions | Protected Attributes | Private Attributes

XMLStorage::AbstractXMLNode Class Reference

AbstractXMLNode is the base class of XMLNode and XMLStreamNode. More...

Inheritance diagram for XMLStorage::AbstractXMLNode:
Inheritance graph
[legend]
Collaboration diagram for XMLStorage::AbstractXMLNode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

abstract string getName ()
abstract string get (string attrName)
 read only access to an attribute
abstract string get (string attrName, string def)
 read only access to an attribute with default value
abstract string getContent ()
abstract override string ToString ()
XMLInt getInt (string attrName)
XMLInt getInt (string attrName, int def)
XMLDecimal getNumber (string attrName)
XMLDecimal getNumber (string attrName, decimal def)
XMLBool getBool (string attrName)
XMLBool getBool (string attrName, bool def)
XMLString getString (string attrName)
XMLString getString (string attrName, string def)
void setAttributes (XmlReader reader)
bool hasAttributes ()

Protected Attributes

Dictionary< string, string > _attributes = new Dictionary<string, string>()

Private Attributes

internal string _content = ""

Detailed Description

AbstractXMLNode is the base class of XMLNode and XMLStreamNode.

Author:
martin

Definition at line 50 of file AbstractXMLNode.cs.


Member Function Documentation

abstract string XMLStorage::AbstractXMLNode::get ( string  attrName ) [pure virtual]
abstract string XMLStorage::AbstractXMLNode::get ( string  attrName,
string  def 
) [pure virtual]

read only access to an attribute with default value

Implemented in XMLStorage::XMLStreamNode, and XMLStorage::XMLNode.

XMLBool XMLStorage::AbstractXMLNode::getBool ( string  attrName ) [inline]

Definition at line 85 of file AbstractXMLNode.cs.

    {
        return new XMLBool(this, attrName);
    }
XMLBool XMLStorage::AbstractXMLNode::getBool ( string  attrName,
bool  def 
) [inline]

Definition at line 89 of file AbstractXMLNode.cs.

    {
        return new XMLBool(this, attrName, def);
    }
abstract string XMLStorage::AbstractXMLNode::getContent (  ) [pure virtual]
XMLInt XMLStorage::AbstractXMLNode::getInt ( string  attrName ) [inline]

Definition at line 67 of file AbstractXMLNode.cs.

    {
        return new XMLInt(this, attrName);
    }
XMLInt XMLStorage::AbstractXMLNode::getInt ( string  attrName,
int  def 
) [inline]

Definition at line 71 of file AbstractXMLNode.cs.

    {
        return new XMLInt(this, attrName, def);
    }
abstract string XMLStorage::AbstractXMLNode::getName (  ) [pure virtual]
XMLDecimal XMLStorage::AbstractXMLNode::getNumber ( string  attrName,
decimal  def 
) [inline]

Definition at line 80 of file AbstractXMLNode.cs.

    {
        return new XMLDecimal(this, attrName, def);
    }
XMLDecimal XMLStorage::AbstractXMLNode::getNumber ( string  attrName ) [inline]

Definition at line 76 of file AbstractXMLNode.cs.

    {
        return new XMLDecimal(this, attrName);
    }
XMLString XMLStorage::AbstractXMLNode::getString ( string  attrName,
string  def 
) [inline]

Definition at line 98 of file AbstractXMLNode.cs.

    {
        return new XMLString(this, attrName, def);
    }
XMLString XMLStorage::AbstractXMLNode::getString ( string  attrName ) [inline]

Definition at line 94 of file AbstractXMLNode.cs.

    {
        return new XMLString(this, attrName);
    }
bool XMLStorage::AbstractXMLNode::hasAttributes (  ) [inline]

Definition at line 117 of file AbstractXMLNode.cs.

References _attributes.

Referenced by XMLStorage::XMLStreamReader::handlePendingEndElement().

    {
        return _attributes.Count > 0;
    }
void XMLStorage::AbstractXMLNode::setAttributes ( XmlReader  reader ) [inline]

Definition at line 103 of file AbstractXMLNode.cs.

References _attributes.

Referenced by XMLStorage::XMLStreamReader::startElement(), and XMLStorage::XMLDocReader::startElement().

    {
        while(reader.MoveToNextAttribute()) {
            string attrNS = reader.NamespaceURI;
            string attrName = reader.Name;
            string attrValue = reader.Value;

            if (attrNS.Length > 0)
                attrName = attrNS + ":" + attrName;

            _attributes.Add(attrName, attrValue);
        }
    }
abstract override string XMLStorage::AbstractXMLNode::ToString (  ) [pure virtual]

Member Data Documentation

Dictionary<string, string> XMLStorage::AbstractXMLNode::_attributes = new Dictionary<string, string>() [protected]
internal string XMLStorage::AbstractXMLNode::_content = "" [private]

The documentation for this class was generated from the following file: