LibreOffice Module sax (master) 1
fastparser.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SAX_FASTPARSER_HXX
21#define INCLUDED_SAX_FASTPARSER_HXX
22
23#include <com/sun/star/xml/sax/XFastParser.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/lang/XInitialization.hpp>
27
28#include <sax/saxdllapi.h>
29#include <memory>
30
32 class XFastDocumentHandler;
33 class XFastTokenHandler;
34}
35
36namespace sax_fastparser {
37
38
39class FastSaxParserImpl;
40
41// This class implements the external Parser interface
43 : public ::cppu::WeakImplHelper<
44 css::lang::XInitialization,
45 css::xml::sax::XFastParser,
46 css::lang::XServiceInfo >
47{
48 std::unique_ptr<FastSaxParserImpl> mpImpl;
49
50public:
52 virtual ~FastSaxParser() override;
53
54 // css::lang::XInitialization:
55 virtual void SAL_CALL initialize(css::uno::Sequence<css::uno::Any> const& rArguments) override;
56
57 // XFastParser
58 virtual void SAL_CALL parseStream( const css::xml::sax::InputSource& aInputSource ) override;
59 virtual void SAL_CALL setFastDocumentHandler( const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& Handler ) override;
60 virtual void SAL_CALL setTokenHandler( const css::uno::Reference< css::xml::sax::XFastTokenHandler >& Handler ) override;
61 virtual void SAL_CALL registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ) override;
62 virtual OUString SAL_CALL getNamespaceURL( const OUString& rPrefix ) override;
63 virtual void SAL_CALL setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler ) override;
64 virtual void SAL_CALL setEntityResolver( const css::uno::Reference< css::xml::sax::XEntityResolver >& Resolver ) override;
65 virtual void SAL_CALL setLocale( const css::lang::Locale& rLocale ) override;
66 virtual void SAL_CALL setNamespaceHandler( const css::uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler) override;
67 virtual void SAL_CALL setCustomEntityNames( const ::css::uno::Sequence< ::css::beans::Pair<::rtl::OUString, ::rtl::OUString> >& replacements ) override;
68
69 // XServiceInfo
70 virtual OUString SAL_CALL getImplementationName( ) override;
71 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
72 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
73};
74
75}
76
77#endif // _SAX_FASTPARSER_HXX_
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< FastSaxParserImpl > mpImpl
Definition: fastparser.hxx:48
void setLocale(const LanguageTag &languageTag)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define SAX_DLLPUBLIC
Definition: saxdllapi.h:28
unsigned char sal_Bool