XMLDoubleRef is a type converter for numeric data with write access. More...
Public Member Functions | |
XMLDoubleRef (XMLNode node, string attrName) | |
XMLDoubleRef (XMLPos pos, string attrName) | |
XMLDoubleRef (XMLNode node, string attrName, double def) | |
XMLDoubleRef (XMLPos pos, string attrName, double def) | |
double | doubleValue () |
void | assign (double value) |
Protected Attributes | |
XMLNode | _node |
string | _attrName |
Private Member Functions | |
void | init (XMLNode node, string attrName, double def) |
XMLDoubleRef is a type converter for numeric data with write access.
Definition at line 122 of file XMLDouble.cs.
XMLStorage::XMLDoubleRef::XMLDoubleRef | ( | XMLNode | node, |
string | attrName | ||
) | [inline] |
Definition at line 124 of file XMLDouble.cs.
References init().
{ init(node, attrName, 0); }
XMLStorage::XMLDoubleRef::XMLDoubleRef | ( | XMLPos | pos, |
string | attrName | ||
) | [inline] |
Definition at line 129 of file XMLDouble.cs.
References XMLStorage::XMLPos::cur(), and init().
{ init(pos.cur(), attrName, 0); }
XMLStorage::XMLDoubleRef::XMLDoubleRef | ( | XMLNode | node, |
string | attrName, | ||
double | def | ||
) | [inline] |
Definition at line 134 of file XMLDouble.cs.
References init().
{ init(node, attrName, def); }
XMLStorage::XMLDoubleRef::XMLDoubleRef | ( | XMLPos | pos, |
string | attrName, | ||
double | def | ||
) | [inline] |
Definition at line 139 of file XMLDouble.cs.
References XMLStorage::XMLPos::cur(), and init().
{ init(pos.cur(), attrName, def); }
void XMLStorage::XMLDoubleRef::assign | ( | double | value ) | [inline] |
Definition at line 164 of file XMLDouble.cs.
References _attrName, _node, and XMLStorage::XMLNode::put().
Referenced by init().
double XMLStorage::XMLDoubleRef::doubleValue | ( | ) | [inline] |
Definition at line 154 of file XMLDouble.cs.
References _attrName, _node, and XMLStorage::XMLNode::get().
{ double value; if (_node!=null && Double.TryParse(_node.get(_attrName), out value)) return value; else return 0; }
void XMLStorage::XMLDoubleRef::init | ( | XMLNode | node, |
string | attrName, | ||
double | def | ||
) | [inline, private] |
Definition at line 144 of file XMLDouble.cs.
References _attrName, _node, assign(), and XMLStorage::XMLNode::get().
Referenced by XMLDoubleRef().
{ _node = node; _attrName = attrName; if (node != null) if (node.get(attrName).Length == 0) assign(def); }
string XMLStorage::XMLDoubleRef::_attrName [protected] |
Definition at line 171 of file XMLDouble.cs.
Referenced by assign(), doubleValue(), and init().
XMLNode XMLStorage::XMLDoubleRef::_node [protected] |
Definition at line 170 of file XMLDouble.cs.
Referenced by assign(), doubleValue(), and init().