Public Member Functions | Protected Attributes | Private Member Functions

XMLStorage::XMLDecimal Class Reference

XMLNumber is the type converter for numeric data in XMLStorage. More...

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

List of all members.

Public Member Functions

 XMLDecimal (decimal value)
 XMLDecimal (string value)
 XMLDecimal (string value, decimal def)
 XMLDecimal (AbstractXMLNode node, string attrName)
 XMLDecimal (XMLPos pos, string attrName)
 XMLDecimal (XMLPos pos, string attrName, decimal def)
 XMLDecimal (XMLStreamReader reader, string attrName)
 XMLDecimal (XMLStreamReader reader, string attrName, decimal def)
 XMLDecimal (AbstractXMLNode node, string attrName, decimal def)
decimal bigDecimalValue ()
override string ToString ()

Protected Attributes

decimal _value

Private Member Functions

void init (string value, decimal def)
void init (AbstractXMLNode node, string attrName, decimal def)

Detailed Description

XMLNumber is the type converter for numeric data in XMLStorage.

Definition at line 46 of file XMLDecimal.cs.


Constructor & Destructor Documentation

XMLStorage::XMLDecimal::XMLDecimal ( decimal  value ) [inline]

Definition at line 48 of file XMLDecimal.cs.

References _value.

    {
        _value = value;
    }
XMLStorage::XMLDecimal::XMLDecimal ( string  value ) [inline]

Definition at line 53 of file XMLDecimal.cs.

References init().

    {
        init(value, (decimal)0);
    }

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( string  value,
decimal  def 
) [inline]

Definition at line 58 of file XMLDecimal.cs.

References init().

    {
        init(value, def);
    }

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( AbstractXMLNode  node,
string  attrName 
) [inline]

Definition at line 70 of file XMLDecimal.cs.

References init().

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

Here is the call graph for this function:

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

Definition at line 75 of file XMLDecimal.cs.

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

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

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( XMLPos  pos,
string  attrName,
decimal  def 
) [inline]

Definition at line 80 of file XMLDecimal.cs.

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

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

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( XMLStreamReader  reader,
string  attrName 
) [inline]

Definition at line 85 of file XMLDecimal.cs.

References XMLStorage::XMLStreamReader::getNode(), and init().

    {
        init(reader.getNode(), attrName, (decimal)0);
    }

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( XMLStreamReader  reader,
string  attrName,
decimal  def 
) [inline]

Definition at line 90 of file XMLDecimal.cs.

References XMLStorage::XMLStreamReader::getNode(), and init().

    {
        init(reader.getNode(), attrName, def);
    }

Here is the call graph for this function:

XMLStorage::XMLDecimal::XMLDecimal ( AbstractXMLNode  node,
string  attrName,
decimal  def 
) [inline]

Definition at line 96 of file XMLDecimal.cs.

References init().

    {
        init(node, attrName, def);
    }

Here is the call graph for this function:


Member Function Documentation

decimal XMLStorage::XMLDecimal::bigDecimalValue (  ) [inline]

Definition at line 109 of file XMLDecimal.cs.

References _value.

    {
        return _value;
    }
void XMLStorage::XMLDecimal::init ( AbstractXMLNode  node,
string  attrName,
decimal  def 
) [inline, private]

Definition at line 101 of file XMLDecimal.cs.

References _value, and XMLStorage::AbstractXMLNode::get().

    {
        string value = node.get(attrName);

        if (string.IsNullOrEmpty(value) || !decimal.TryParse(value, out _value))
            _value = def;
    }

Here is the call graph for this function:

void XMLStorage::XMLDecimal::init ( string  value,
decimal  def 
) [inline, private]

Definition at line 63 of file XMLDecimal.cs.

References _value.

Referenced by XMLDecimal().

    {
        if (string.IsNullOrEmpty(value) || !decimal.TryParse(value, out _value))
            _value = def;
    }
override string XMLStorage::XMLDecimal::ToString (  ) [inline]

Definition at line 114 of file XMLDecimal.cs.

References _value.

    {
        return _value.ToString();
    }

Member Data Documentation

decimal XMLStorage::XMLDecimal::_value [protected]

Definition at line 119 of file XMLDecimal.cs.

Referenced by bigDecimalValue(), init(), ToString(), and XMLDecimal().


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