root/win32/xsd-3.1.0-i686/libxsd/xsd/cxx/tree/error-handler.txx @ 111

Revision 111, 0.9 kB (checked in by mido, 16 years ago)

pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx

RevLine 
[111]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
8namespace 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}
Note: See TracBrowser for help on using the browser.