Public Member Functions | Protected Attributes | Private Member Functions

XMLStorage::XMLBool Class Reference

XMLBool is a type converter for boolean data. More...

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

List of all members.

Public Member Functions

 XMLBool (bool value)
 XMLBool (string value)
 XMLBool (string value, bool def)
 XMLBool (AbstractXMLNode node, string attrName)
 XMLBool (XMLPos pos, string attrName)
 XMLBool (XMLPos pos, string attrName, bool def)
 XMLBool (XMLStreamReader reader, string attrName)
 XMLBool (XMLStreamReader reader, string attrName, bool def)
 XMLBool (AbstractXMLNode node, string attrName, bool def)
bool boolValue ()
override string ToString ()

Protected Attributes

bool _value

Private Member Functions

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

Detailed Description

XMLBool is a type converter for boolean data.

Definition at line 45 of file XMLBool.cs.


Constructor & Destructor Documentation

XMLStorage::XMLBool::XMLBool ( bool  value ) [inline]

Definition at line 47 of file XMLBool.cs.

References _value.

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

Definition at line 52 of file XMLBool.cs.

References init().

    {
        init(value, false);
    }

Here is the call graph for this function:

XMLStorage::XMLBool::XMLBool ( string  value,
bool  def 
) [inline]

Definition at line 57 of file XMLBool.cs.

References init().

    {
        init(value, def);
    }

Here is the call graph for this function:

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

Definition at line 69 of file XMLBool.cs.

References init().

    {
        init(node, attrName, false);
    }

Here is the call graph for this function:

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

Definition at line 74 of file XMLBool.cs.

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

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

Here is the call graph for this function:

XMLStorage::XMLBool::XMLBool ( XMLPos  pos,
string  attrName,
bool  def 
) [inline]

Definition at line 79 of file XMLBool.cs.

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

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

Here is the call graph for this function:

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

Definition at line 84 of file XMLBool.cs.

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

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

Here is the call graph for this function:

XMLStorage::XMLBool::XMLBool ( XMLStreamReader  reader,
string  attrName,
bool  def 
) [inline]

Definition at line 89 of file XMLBool.cs.

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

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

Here is the call graph for this function:

XMLStorage::XMLBool::XMLBool ( AbstractXMLNode  node,
string  attrName,
bool  def 
) [inline]

Definition at line 94 of file XMLBool.cs.

References init().

    {
        init(node, attrName, def);
    }

Here is the call graph for this function:


Member Function Documentation

bool XMLStorage::XMLBool::boolValue (  ) [inline]

Definition at line 108 of file XMLBool.cs.

References _value.

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

Definition at line 99 of file XMLBool.cs.

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

    {
        string value = node.get(attrName);

        if (value.Length==0 || !bool.TryParse(value, out _value))
            _value = def;
    }

Here is the call graph for this function:

void XMLStorage::XMLBool::init ( string  value,
bool  def 
) [inline, private]

Definition at line 62 of file XMLBool.cs.

References _value.

Referenced by XMLBool().

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

Definition at line 113 of file XMLBool.cs.

References _value.

    {
        return _value.ToString();
    }

Member Data Documentation

bool XMLStorage::XMLBool::_value [protected]

Definition at line 118 of file XMLBool.cs.

Referenced by boolValue(), init(), ToString(), and XMLBool().


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