Public Member Functions | Protected Attributes | Private Member Functions

XMLStorage::XMLNumberRef Class Reference

XMLNumberRef is a type converter for numeric data with write access. More...

Collaboration diagram for XMLStorage::XMLNumberRef:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLNumberRef (XMLNode node, string attrName)
 XMLNumberRef (XMLNode node, string attrName, decimal def)
decimal decimalValue ()
void assign (decimal value)

Protected Attributes

XMLNode _node
string _attrName

Private Member Functions

void init (XMLNode node, string attrName, decimal def)

Detailed Description

XMLNumberRef is a type converter for numeric data with write access.

Definition at line 126 of file XMLDecimal.cs.


Constructor & Destructor Documentation

XMLStorage::XMLNumberRef::XMLNumberRef ( XMLNode  node,
string  attrName 
) [inline]

Definition at line 128 of file XMLDecimal.cs.

References init().

    {
        init(node, attrName, (decimal)0);
    }

Here is the call graph for this function:

XMLStorage::XMLNumberRef::XMLNumberRef ( XMLNode  node,
string  attrName,
decimal  def 
) [inline]

Definition at line 133 of file XMLDecimal.cs.

References init().

    {
        init(node, attrName, def);
    }

Here is the call graph for this function:


Member Function Documentation

void XMLStorage::XMLNumberRef::assign ( decimal  value ) [inline]

Definition at line 158 of file XMLDecimal.cs.

References _attrName, _node, and XMLStorage::XMLNode::put().

Referenced by init().

    {
        if (_node != null)
            _node.put(_attrName, value.ToString());
    }

Here is the call graph for this function:

decimal XMLStorage::XMLNumberRef::decimalValue (  ) [inline]

Definition at line 148 of file XMLDecimal.cs.

References _attrName, _node, and XMLStorage::XMLNode::get().

    {
        decimal value;

        if (_node!=null && decimal.TryParse(_node.get(_attrName), out value))
            return value;
        else
            return (decimal)0;
    }

Here is the call graph for this function:

void XMLStorage::XMLNumberRef::init ( XMLNode  node,
string  attrName,
decimal  def 
) [inline, private]

Definition at line 138 of file XMLDecimal.cs.

References _attrName, _node, assign(), and XMLStorage::XMLNode::get().

Referenced by XMLNumberRef().

    {
        _node = node;
        _attrName = attrName;

        if (node != null)
            if (node.get(attrName).Length == 0)
                assign(def);
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 165 of file XMLDecimal.cs.

Referenced by assign(), decimalValue(), and init().

Definition at line 164 of file XMLDecimal.cs.

Referenced by assign(), decimalValue(), and init().


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