Branch libreoffice-5-0-4
[LibreOffice.git] / include / sax / fastparser.hxx
blob29f0ad61596ea4ce08fd057ef89dfd61d21b5538
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SAX_FASTPARSER_HXX
21 #define INCLUDED_SAX_FASTPARSER_HXX
23 #include <com/sun/star/xml/sax/XFastParser.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <cppuhelper/implbase2.hxx>
27 #include <sax/fastsaxdllapi.h>
29 namespace com { namespace sun { namespace star { namespace xml { namespace sax {
31 class XFastContextHandler;
32 class XFastDocumentHandler;
33 class XFastTokenHandler;
35 }}}}}
37 namespace sax_fastparser {
41 class FastSaxParserImpl;
43 // This class implements the external Parser interface
44 class FASTSAX_DLLPUBLIC FastSaxParser
45 : public ::cppu::WeakImplHelper2<
46 ::com::sun::star::xml::sax::XFastParser,
47 ::com::sun::star::lang::XServiceInfo >
49 FastSaxParserImpl* mpImpl;
51 public:
52 FastSaxParser();
53 virtual ~FastSaxParser();
55 // XFastParser
56 virtual void SAL_CALL parseStream( const ::com::sun::star::xml::sax::InputSource& aInputSource ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 virtual void SAL_CALL setFastDocumentHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastDocumentHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 virtual void SAL_CALL setTokenHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 virtual void SAL_CALL registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 virtual OUString SAL_CALL getNamespaceURL( const OUString& rPrefix ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 virtual void SAL_CALL setErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XErrorHandler >& Handler ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 virtual void SAL_CALL setEntityResolver( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XEntityResolver >& Resolver ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 virtual void SAL_CALL setLocale( const ::com::sun::star::lang::Locale& rLocale ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 // XServiceInfo
66 virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 bool hasNamespaceURL( const OUString& rPrefix ) const;
75 #endif // _SAX_FASTPARSER_HXX_
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */