Inheritance diagram for OhmmsElementBase:


Public Types | |
| enum | { useLIBXML = 0, useLIBXMLPP, usePLAIN } |
| enumeration to choose the xml parser More... | |
Public Member Functions | |
| OhmmsElementBase (const char *aname="none") | |
| constructor with a name | |
| virtual | ~OhmmsElementBase () |
| destructor | |
| const std::string & | getName () const |
| return the name | |
| void | setName (const std::string &aname) |
| set name | |
| void | setIOMode (int imode) |
| set iomode | |
| virtual bool | get (std::ostream &) const =0 |
| write to a ostream | |
| virtual bool | put (std::istream &)=0 |
| read from istream | |
| virtual bool | put (xmlNodePtr cur)=0 |
| read from an xmlNode | |
| virtual void | reset ()=0 |
| reset member data | |
| virtual bool | add (xmlNodePtr parent) |
| add a xmlNode to the children list of parent | |
| void | put (const std::string &s) |
| read from string | |
| virtual void | begin_node (std::ostream &os) const |
| write the start of a node | |
| virtual void | end_node (std::ostream &os) const |
| write the end of a node | |
Protected Attributes | |
| int | myIOMode |
| the type of IO mode: default is useLIBXML | |
| std::string | myName |
| the name of the node, corresponds to the xml tag | |
Generic interfaces using std::iostream are much preferred. However, there isn't any pure c++ xml parser that is based on std::iostream alone. After evaluating several xml parsers, JK chose libxml (The XML C parser and toolkit of gnome, http://www.xmlsoft.org) based on its performance and availability on many platforms.
The base class is written to be able to handle DTD or Schema in future. Current implementation assumes that each OhmmsElementBase object handles a node and its child nodes. However, it does not specify how the derived classes hanlde the child nodes.
Definition at line 56 of file OhmmsElementBase.h.
|
|
enumeration to choose the xml parser
Definition at line 61 of file OhmmsElementBase.h. |
|
|
constructor with a name
Definition at line 67 of file OhmmsElementBase.h. |
|
|
destructor
Definition at line 72 of file OhmmsElementBase.h. |
|
|
add a xmlNode to the children list of parent
Definition at line 96 of file OhmmsElementBase.h. |
|
|
write the start of a node
Reimplemented in OHMMS::ParticleSet. Definition at line 105 of file OhmmsElementBase.h. |
|
|
write the end of a node
Reimplemented in OHMMS::ParticleSet. Definition at line 108 of file OhmmsElementBase.h. |
|
|
write to a ostream
Implemented in OHMMS::ParticleSet, and OHMMS::FreeEnergyMC. |
|
|
return the name
Definition at line 75 of file OhmmsElementBase.h. References myName. |
|
|
read from string
Definition at line 99 of file OhmmsElementBase.h. References put(). |
|
|
read from an xmlNode
Implemented in OHMMS::ParticleSet, and OHMMS::FreeEnergyMC. |
|
|
read from istream
Implemented in OHMMS::ParticleSet, and OHMMS::FreeEnergyMC. Referenced by put(). |
|
|
reset member data
Implemented in OHMMS::ParticleSet, and OHMMS::FreeEnergyMC. |
|
|
set iomode
Definition at line 81 of file OhmmsElementBase.h. References myIOMode. |
|
|
set name
Definition at line 78 of file OhmmsElementBase.h. References myName. |
|
|
the type of IO mode: default is useLIBXML
Definition at line 113 of file OhmmsElementBase.h. Referenced by OhmmsElementBase(), and setIOMode(). |
|
|
the name of the node, corresponds to the xml tag
Definition at line 116 of file OhmmsElementBase.h. Referenced by getName(), OhmmsElementBase(), and setName(). |
1.3.4