Revision 111, 0.9 kB
(checked in by mido, 17 years ago)
|
pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx
|
Line | |
---|
1 | // file : xsd/cxx/tree/error-handler.txx |
---|
2 | // author : Boris Kolpackov <boris@codesynthesis.com> |
---|
3 | // copyright : Copyright (c) 2005-2008 Code Synthesis Tools CC |
---|
4 | // license : GNU GPL v2 + exceptions; see accompanying LICENSE file |
---|
5 | |
---|
6 | #include <iostream> |
---|
7 | |
---|
8 | namespace xsd |
---|
9 | { |
---|
10 | namespace cxx |
---|
11 | { |
---|
12 | namespace tree |
---|
13 | { |
---|
14 | template <typename C> |
---|
15 | bool error_handler<C>:: |
---|
16 | handle (const std::basic_string<C>& id, |
---|
17 | unsigned long line, |
---|
18 | unsigned long column, |
---|
19 | severity s, |
---|
20 | const std::basic_string<C>& message) |
---|
21 | { |
---|
22 | diagnostics_.push_back ( |
---|
23 | error<C> (s == severity::warning |
---|
24 | ? tree::severity::warning |
---|
25 | : tree::severity::error, id, line, column, message)); |
---|
26 | |
---|
27 | if (!failed_ && s != severity::warning) |
---|
28 | failed_ = true; |
---|
29 | |
---|
30 | return true; |
---|
31 | } |
---|
32 | } |
---|
33 | } |
---|
34 | } |
---|