1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

No compile fixes on gcc/Cray

This commit is contained in:
paboyle
2015-11-29 03:14:44 -08:00
parent f35fc4b76c
commit 93356fd246
6 changed files with 40 additions and 36 deletions

View File

@ -1,10 +1,8 @@
#include <Grid.h>
using namespace Grid;
using namespace std;
namespace Grid {
// Writer implementation ///////////////////////////////////////////////////////
XmlWriter::XmlWriter(const string &fileName)
XmlWriter::XmlWriter(const std::string &fileName)
: fileName_(fileName)
{
node_ = doc_.append_child();
@ -16,7 +14,7 @@ XmlWriter::~XmlWriter(void)
doc_.save_file(fileName_.c_str(), " ");
}
void XmlWriter::push(const string &s)
void XmlWriter::push(const std::string &s)
{
node_ = node_.append_child(s.c_str());
}
@ -27,22 +25,22 @@ void XmlWriter::pop(void)
}
// Reader implementation ///////////////////////////////////////////////////////
XmlReader::XmlReader(const string &fileName)
XmlReader::XmlReader(const std::string &fileName)
: fileName_(fileName)
{
pugi::xml_parse_result result = doc_.load_file(fileName_.c_str());
if ( !result )
{
cerr << "XML error description: " << result.description() << "\n";
cerr << "XML error offset : " << result.offset << "\n";
abort();
std::cerr << "XML error description: " << result.description() << "\n";
std::cerr << "XML error offset : " << result.offset << "\n";
std::abort();
}
node_ = doc_.child("grid");
}
void XmlReader::push(const string &s)
void XmlReader::push(const std::string &s)
{
node_ = node_.child(s.c_str());
}
@ -53,7 +51,8 @@ void XmlReader::pop(void)
}
template <>
void XmlReader::readDefault(const string &s, string &output)
void XmlReader::readDefault(const std::string &s, std::string &output)
{
output = node_.child(s.c_str()).first_child().value();
}
}