15 #ifndef OHMMS_XMLDATA_H 16 #define OHMMS_XMLDATA_H 67 virtual bool get(std::ostream&)
const = 0;
70 virtual bool put(std::istream&) = 0;
73 virtual bool put(xmlNodePtr cur) = 0;
76 virtual void reset() = 0;
79 virtual bool add(xmlNodePtr parent) {
return true; }
82 void put(
const std::string&
s)
84 std::istringstream stream(
s);
92 virtual void end_node(std::ostream& os)
const {}
const std::string & getName() const
return the name
std::string myName
the name of the node, corresponds to the xml tag
void setName(const std::string &aname)
set name
A collection of put/get functions to read from or write to a xmlNode defined in libxml2.
void put(const std::string &s)
read from string
Abstract class to provide xml-compatible I/O interfaces for the derived classes.
virtual ~OhmmsElementBase()
destructor
int myIOMode
the type of IO mode: default is useLIBXML
virtual void begin_node(std::ostream &os) const
write the start of a node
virtual void reset()=0
reset member data
OhmmsElementBase(const char *aname="none")
constructor with a name
void setIOMode(int imode)
set iomode
virtual bool add(xmlNodePtr parent)
add a xmlNode to the children list of parent
virtual void end_node(std::ostream &os) const
write the end of a node
virtual bool put(std::istream &)=0
read from std::istream