LibreOffice Module oox (master) 1
recordparser.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_OOX_CORE_RECORDPARSER_HXX
21#define INCLUDED_OOX_CORE_RECORDPARSER_HXX
22
23#include <map>
24#include <memory>
25
28#include <rtl/ref.hxx>
29#include <rtl/ustring.hxx>
30#include <sal/types.h>
31
32namespace oox {
33namespace core {
34
35namespace prv {
36 class ContextStack;
37 class Locator;
38}
39
40
42{
44 OUString maSystemId;
45};
46
47
48class RecordParser final
49{
50public:
53
54 void setFragmentHandler( const ::rtl::Reference< FragmentHandler >& rxHandler );
55
59 void parseStream( const RecordInputSource& rInputSource );
60
61 const RecordInputSource& getInputSource() const { return maSource; }
62
63private:
66 const RecordInfo* getStartRecordInfo( sal_Int32 nRecId ) const;
69 const RecordInfo* getEndRecordInfo( sal_Int32 nRecId ) const;
70
71private:
72 typedef ::std::map< sal_Int32, RecordInfo > RecordInfoMap;
73
77 ::std::unique_ptr< prv::ContextStack > mxStack;
80};
81
82
83} // namespace core
84} // namespace oox
85
86#endif
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::map< sal_Int32, RecordInfo > RecordInfoMap
::rtl::Reference< FragmentHandler > mxHandler
void setFragmentHandler(const ::rtl::Reference< FragmentHandler > &rxHandler)
const RecordInfo * getEndRecordInfo(sal_Int32 nRecId) const
Returns a RecordInfo struct that contains the passed record identifier as context end identifier.
const RecordInfo * getStartRecordInfo(sal_Int32 nRecId) const
Returns a RecordInfo struct that contains the passed record identifier as context start identifier.
::std::unique_ptr< prv::ContextStack > mxStack
RecordInfoMap maStartMap
RecordInputSource maSource
::rtl::Reference< prv::Locator > mxLocator
const RecordInputSource & getInputSource() const
void parseStream(const RecordInputSource &rInputSource)
std::shared_ptr< BinaryInputStream > BinaryInputStreamRef
Describes record identifiers used to create contexts in a binary stream.
BinaryInputStreamRef mxInStream