Initial adding of XMLStream API based on libstudxml library

This commit is contained in:
Marian Krivos
2015-08-22 16:32:51 +02:00
parent 5e3258f92e
commit 11211d345d
17 changed files with 5531 additions and 4 deletions

View File

@@ -0,0 +1,54 @@
///
/// \package metamodel
/// \file XMLStreamException.cpp
///
/// \author Marian Krivos <marian.krivos@rsys.sk>
/// \date Aug 21, 2015 - 6:52:24 PM
/// \brief definicia typu
///
/// (C) Copyright 2015 R-SYS,s.r.o
/// All rights reserved.
///
#include "XMLStreamParserException.h"
#include "XMLStreamParser.h"
using namespace std;
namespace Poco
{
namespace XML
{
XMLStreamParserException::~XMLStreamParserException() throw ()
{
}
XMLStreamParserException::XMLStreamParserException(const string& n, Poco::UInt64 l, Poco::UInt64 c, const string& d)
: name_(n), line_(l), column_(c), description_(d)
{
init();
}
XMLStreamParserException::XMLStreamParserException(const XMLStreamParser& p, const std::string& d)
: name_(p.input_name()), line_(p.line()), column_(p.column()), description_(d)
{
init();
}
void XMLStreamParserException::init()
{
std::ostringstream os;
if (!name_.empty())
os << name_ << ':';
os << line_ << ':' << column_ << ": error: " << description_;
what_ = os.str();
}
char const* XMLStreamParserException::what() const throw ()
{
return what_.c_str();
}
} /* namespace XML */
} /* namespace Poco */