Public Member Functions | Protected Attributes

de.mfuchs.xmlstorage.XMLIntRef Class Reference

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

Collaboration diagram for de.mfuchs.xmlstorage.XMLIntRef:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

final XMLNode _node
final String _attrName

Detailed Description

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

Definition at line 45 of file XMLIntRef.java.


Constructor & Destructor Documentation

de.mfuchs.xmlstorage.XMLIntRef.XMLIntRef ( final XMLNode  node,
final String  attrName 
)

Definition at line 47 of file XMLIntRef.java.

    {
        this(node, attrName, 0);
    }
de.mfuchs.xmlstorage.XMLIntRef.XMLIntRef ( final XMLPos  pos,
final String  attrName 
)

Definition at line 52 of file XMLIntRef.java.

References de.mfuchs.xmlstorage.XMLPos.cur().

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

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLIntRef.XMLIntRef ( final XMLNode  node,
final String  attrName,
int  def 
)

Definition at line 57 of file XMLIntRef.java.

References de.mfuchs.xmlstorage.XMLIntRef._attrName, de.mfuchs.xmlstorage.XMLIntRef._node, de.mfuchs.xmlstorage.XMLIntRef.assign(), and de.mfuchs.xmlstorage.XMLNode.get().

    {
        _node = node;
        _attrName = attrName;

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

Here is the call graph for this function:

de.mfuchs.xmlstorage.XMLIntRef.XMLIntRef ( final XMLPos  pos,
final String  attrName,
int  def 
)

Definition at line 67 of file XMLIntRef.java.

References de.mfuchs.xmlstorage.XMLPos.cur().

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

Here is the call graph for this function:


Member Function Documentation

void de.mfuchs.xmlstorage.XMLIntRef.assign ( int  value )

Definition at line 80 of file XMLIntRef.java.

References de.mfuchs.xmlstorage.XMLIntRef._attrName, de.mfuchs.xmlstorage.XMLIntRef._node, and de.mfuchs.xmlstorage.XMLNode.put().

Referenced by de.mfuchs.Example3.testWrite(), de.mfuchs.Example2.testWrite(), and de.mfuchs.xmlstorage.XMLIntRef.XMLIntRef().

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

Here is the call graph for this function:

int de.mfuchs.xmlstorage.XMLIntRef.intValue (  )

Definition at line 72 of file XMLIntRef.java.

References de.mfuchs.xmlstorage.XMLIntRef._attrName, de.mfuchs.xmlstorage.XMLIntRef._node, and de.mfuchs.xmlstorage.XMLNode.get().

Referenced by de.mfuchs.XMLTest.test1().

    {
        if (_node != null)
            return Integer.parseInt(_node.get(_attrName));
        else
            return 0;
    }

Here is the call graph for this function:


Member Data Documentation

final String de.mfuchs.xmlstorage.XMLIntRef._attrName [protected]

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