Public Member Functions | Protected Attributes | Private Member Functions

XMLStorage::XMLIntRef Class Reference

XMLIntRef is a type converter for integer data with write access. More...

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

List of all members.

Public Member Functions

 XMLIntRef (XMLNode node, string attrName)
 XMLIntRef (XMLPos pos, string attrName)
 XMLIntRef (XMLNode node, string attrName, int def)
 XMLIntRef (XMLPos pos, string attrName, int def)
int intValue ()
void assign (int value)

Protected Attributes

XMLNode _node
string _attrName

Private Member Functions

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

Detailed Description

XMLIntRef is a type converter for integer data with write access.

Definition at line 122 of file XMLInt.cs.


Constructor & Destructor Documentation

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

Definition at line 124 of file XMLInt.cs.

References init().

    {
        init(node, attrName, 0);
    }

Here is the call graph for this function:

XMLStorage::XMLIntRef::XMLIntRef ( XMLPos  pos,
string  attrName 
) [inline]

Definition at line 129 of file XMLInt.cs.

References XMLStorage::XMLPos::cur(), and init().

    {
        init(pos.cur(), attrName, 0);
    }

Here is the call graph for this function:

XMLStorage::XMLIntRef::XMLIntRef ( XMLNode  node,
string  attrName,
int  def 
) [inline]

Definition at line 134 of file XMLInt.cs.

References init().

    {
        init(node, attrName, def);
    }

Here is the call graph for this function:

XMLStorage::XMLIntRef::XMLIntRef ( XMLPos  pos,
string  attrName,
int  def 
) [inline]

Definition at line 139 of file XMLInt.cs.

References XMLStorage::XMLPos::cur(), and init().

    {
        init(pos.cur(), attrName, def);
    }

Here is the call graph for this function:


Member Function Documentation

void XMLStorage::XMLIntRef::assign ( int  value ) [inline]

Definition at line 164 of file XMLInt.cs.

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

Referenced by init(), Example3::testWrite(), and Example2::testWrite().

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

Here is the call graph for this function:

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

Definition at line 144 of file XMLInt.cs.

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

Referenced by XMLIntRef().

    {
        _node = node;
        _attrName = attrName;

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

Here is the call graph for this function:

int XMLStorage::XMLIntRef::intValue (  ) [inline]

Definition at line 154 of file XMLInt.cs.

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

    {
        int value;

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 171 of file XMLInt.cs.

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

Definition at line 170 of file XMLInt.cs.

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


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