mirror of
https://github.com/paboyle/Grid.git
synced 2025-12-17 19:24:41 +00:00
I/O improvements
This commit is contained in:
@@ -44,10 +44,9 @@ namespace Grid
|
||||
{
|
||||
|
||||
class XmlWriter: public Writer<XmlWriter>
|
||||
{
|
||||
|
||||
{
|
||||
public:
|
||||
XmlWriter(const std::string &fileName);
|
||||
XmlWriter(const std::string &fileName,std::string toplev = std::string("grid") );
|
||||
virtual ~XmlWriter(void);
|
||||
void push(const std::string &s);
|
||||
void pop(void);
|
||||
@@ -55,6 +54,7 @@ namespace Grid
|
||||
void writeDefault(const std::string &s, const U &x);
|
||||
template <typename U>
|
||||
void writeDefault(const std::string &s, const std::vector<U> &x);
|
||||
std::string XmlString(void);
|
||||
private:
|
||||
pugi::xml_document doc_;
|
||||
pugi::xml_node node_;
|
||||
@@ -64,7 +64,8 @@ namespace Grid
|
||||
class XmlReader: public Reader<XmlReader>
|
||||
{
|
||||
public:
|
||||
XmlReader(const std::string &fileName);
|
||||
XmlReader(const char *xmlstring,std::string toplev = std::string("grid") );
|
||||
XmlReader(const std::string &fileName,std::string toplev = std::string("grid") );
|
||||
virtual ~XmlReader(void) = default;
|
||||
bool push(const std::string &s);
|
||||
void pop(void);
|
||||
@@ -118,7 +119,7 @@ namespace Grid
|
||||
std::string buf;
|
||||
|
||||
readDefault(s, buf);
|
||||
std::cout << s << " " << buf << std::endl;
|
||||
// std::cout << s << " " << buf << std::endl;
|
||||
fromString(output, buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user