LibreOffice Module shell (master) 1
basereader.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_SHELL_INC_INTERNAL_BASEREADER_HXX
21#define INCLUDED_SHELL_INC_INTERNAL_BASEREADER_HXX
22
23#include "global.hxx"
24#include "types.hxx"
25#include "config.hxx"
26#include "utilities.hxx"
28
29#include "xml_parser.hxx"
30#include "zipfile.hxx"
31#include "filepath.hxx"
32
34{
35public:
36 virtual ~CBaseReader() override;
37
38protected: // protected because its only an implementation relevant class
39 CBaseReader( const Filepath_t& DocumentName );
40
42
43 virtual void start_document();
44
45 virtual void end_document();
46
47 virtual void start_element(
48 const string_t& raw_name,
49 const string_t& local_name,
50 const xml_tag_attribute_container_t& attributes) override = 0;
51
52 virtual void end_element(
53 const string_t& raw_name, const string_t& local_name) override = 0;
54
55 virtual void characters(const string_t& character) override = 0;
56
57 virtual void ignore_whitespace(const string_t& /*whitespaces*/) override {};
58
60 const std::wstring& /*target*/, const std::wstring& /*data*/){};
61
62 virtual void comment(const string_t& /*comment*/) override {};
63
64 void Initialize( const std::string& /*ContentName*/);
65
66private:
68 ZipFile::ZipContentBuffer_t m_ZipContent;
69};
70
71#endif
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void end_element(const string_t &raw_name, const string_t &local_name) override=0
virtual void start_element(const string_t &raw_name, const string_t &local_name, const xml_tag_attribute_container_t &attributes) override=0
virtual void comment(const string_t &) override
Definition: basereader.hxx:62
virtual void characters(const string_t &character) override=0
ZipFile m_ZipFile
Definition: basereader.hxx:67
virtual void processing_instruction(const std::wstring &, const std::wstring &)
Definition: basereader.hxx:59
virtual ~CBaseReader() override
Definition: basereader.cxx:41
void Initialize(const std::string &)
Read interested tag content into respective structure then start parsing process.
Definition: basereader.cxx:59
virtual void ignore_whitespace(const string_t &) override
Definition: basereader.hxx:57
virtual void end_document()
Definition: basereader.cxx:51
CBaseReader(const Filepath_t &DocumentName)
constructor of CBaseReader.
Definition: basereader.cxx:29
virtual void start_document()
Definition: basereader.cxx:46
ZipFile::ZipContentBuffer_t m_ZipContent
Definition: basereader.hxx:68
Reference< XOutputStream > stream
std::string Filepath_t
Definition: filepath.hxx:22
std::string string_t
std::map< string_t, string_t > xml_tag_attribute_container_t