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 typedef std::vector
<std::wstring
> StringList_t
;
30 //+-------------------------------------------------------------------------
31 // Declare: XmlTagAttributes_t, xml tag attribute struct
32 // XmlTag_t, xml tag including content and attributes.
33 // XmlTags_t, tags defined with tag name and xml tag.
34 // Contents: Definitions of xml tag used in parser.
36 typedef std::wstring Name_t
;
37 typedef std::wstring Value_t
;
38 typedef std::wstring Characters_t
;
40 typedef std::map
<Name_t
, Value_t
> XmlTagAttributes_t
;
41 typedef std::pair
<Characters_t
, XmlTagAttributes_t
> XmlTag_t
;
42 typedef std::map
<Name_t
, XmlTag_t
> XmlTags_t
;
44 const XmlTag_t EMPTY_XML_TAG
= std::make_pair(std::wstring(), XmlTagAttributes_t());
46 //+-------------------------------------------------------------------------
47 // Declare: Language_t, language of the Locale pair
48 // Country_t, country of the Local pair
49 // LocaleSet_t, Local pair
50 // Contents: Definitions of Chunk properties.
52 typedef ::std::wstring Language_t
;
53 typedef ::std::wstring Country_t
;
54 typedef ::std::pair
<Language_t
, Country_t
> LocaleSet_t
;
56 typedef ::std::wstring Content_t
;
57 typedef ::std::pair
<LocaleSet_t
, Content_t
> Chunk_t
;
58 typedef ::std::vector
< Chunk_t
> ChunkBuffer_t
;
60 const LocaleSet_t EMPTY_LOCALE
= ::std::make_pair(::std::wstring(), ::std::wstring());
61 const Chunk_t EMPTY_CHUNK
= ::std::make_pair( EMPTY_LOCALE
, ::std::wstring());
63 //+-------------------------------------------------------------------------
64 // Declare: StyleName_t, style name of a style-locale pair.
65 // StyleLocaleMap, the map of Styple-Locale pair.
66 // Contents: Definitions of Style Names.
68 typedef ::std::wstring StyleName_t
;
69 typedef ::std::pair
<StyleName_t
, LocaleSet_t
> StyleLocalePair_t
;
70 typedef ::std::map
<StyleName_t
, LocaleSet_t
> StyleLocaleMap_t
;
72 const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR
= ::std::make_pair(::std::wstring(), EMPTY_LOCALE
);
77 virtual ~StreamInterface() {}
78 virtual unsigned long sread (unsigned char* vuf
, unsigned long size
) = 0;
79 virtual long stell () = 0;
80 virtual long sseek (long offset
, int origin
) = 0;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */