1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SHELL_INC_INTERNAL_TYPES_HXX
21 #define INCLUDED_SHELL_INC_INTERNAL_TYPES_HXX
28 //+-------------------------------------------------------------------------
29 // Declare: XmlTagAttributes_t, xml tag attribute struct
30 // XmlTag_t, xml tag including content and attributes.
31 // XmlTags_t, tags defined with tag name and xml tag.
32 // Contents: Definitions of xml tag used in parser.
34 typedef std::map
<std::wstring
, std::wstring
> XmlTagAttributes_t
;
35 typedef std::pair
<std::wstring
, XmlTagAttributes_t
> XmlTag_t
;
36 typedef std::map
<std::wstring
, XmlTag_t
> XmlTags_t
;
38 const XmlTag_t EMPTY_XML_TAG
= std::make_pair(std::wstring(), XmlTagAttributes_t());
40 //+-------------------------------------------------------------------------
41 // Declare: Language_t, language of the Locale pair
42 // Country_t, country of the Local pair
43 // LocaleSet_t, Local pair
44 // Contents: Definitions of Chunk properties.
46 typedef ::std::wstring Language_t
;
47 typedef ::std::wstring Country_t
;
48 typedef ::std::pair
<Language_t
, Country_t
> LocaleSet_t
;
50 typedef ::std::wstring Content_t
;
51 typedef ::std::pair
<LocaleSet_t
, Content_t
> Chunk_t
;
52 typedef ::std::vector
<Chunk_t
> ChunkBuffer_t
;
54 const LocaleSet_t EMPTY_LOCALE
= ::std::make_pair(::std::wstring(), ::std::wstring());
55 const Chunk_t EMPTY_CHUNK
= ::std::make_pair(EMPTY_LOCALE
, ::std::wstring());
57 //+-------------------------------------------------------------------------
58 // Declare: StyleName_t, style name of a style-locale pair.
59 // StyleLocaleMap, the map of Style-Locale pair.
60 // Contents: Definitions of Style Names.
62 typedef ::std::wstring StyleName_t
;
63 typedef ::std::pair
<StyleName_t
, LocaleSet_t
> StyleLocalePair_t
;
64 typedef ::std::map
<StyleName_t
, LocaleSet_t
> StyleLocaleMap_t
;
66 const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR
= ::std::make_pair(::std::wstring(), EMPTY_LOCALE
);
71 virtual ~StreamInterface() {}
72 virtual unsigned long sread(unsigned char* vuf
, unsigned long size
) = 0;
73 virtual long stell() = 0;
74 virtual long sseek(long offset
, int origin
) = 0;
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */