LibreOffice Module shell (master) 1
types.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_TYPES_HXX
21#define INCLUDED_SHELL_INC_INTERNAL_TYPES_HXX
22
23#include <string>
24#include <map>
25#include <utility>
26#include <vector>
27
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.
33
34typedef std::map<std::wstring, std::wstring> XmlTagAttributes_t;
35typedef std::pair<std::wstring, XmlTagAttributes_t> XmlTag_t;
36typedef std::map<std::wstring, XmlTag_t> XmlTags_t;
37
38const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t());
39
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.
45
46typedef ::std::wstring Language_t;
47typedef ::std::wstring Country_t;
48typedef ::std::pair<Language_t, Country_t> LocaleSet_t;
49
50typedef ::std::wstring Content_t;
51typedef ::std::pair<LocaleSet_t, Content_t> Chunk_t;
52typedef ::std::vector<Chunk_t> ChunkBuffer_t;
53
54const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstring());
55const Chunk_t EMPTY_CHUNK = ::std::make_pair(EMPTY_LOCALE, ::std::wstring());
56
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.
61
62typedef ::std::wstring StyleName_t;
63typedef ::std::pair<StyleName_t, LocaleSet_t> StyleLocalePair_t;
64typedef ::std::map<StyleName_t, LocaleSet_t> StyleLocaleMap_t;
65
66const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE);
67
69{
70public:
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;
75};
76
77#endif
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual unsigned long sread(unsigned char *vuf, unsigned long size)=0
virtual long stell()=0
virtual ~StreamInterface()
Definition: types.hxx:71
virtual long sseek(long offset, int origin)=0
std::map< std::wstring, XmlTag_t > XmlTags_t
Definition: types.hxx:36
::std::vector< Chunk_t > ChunkBuffer_t
Definition: types.hxx:52
const LocaleSet_t EMPTY_LOCALE
Definition: types.hxx:54
::std::map< StyleName_t, LocaleSet_t > StyleLocaleMap_t
Definition: types.hxx:64
const XmlTag_t EMPTY_XML_TAG
Definition: types.hxx:38
::std::pair< StyleName_t, LocaleSet_t > StyleLocalePair_t
Definition: types.hxx:63
::std::wstring Country_t
Definition: types.hxx:47
::std::wstring StyleName_t
Definition: types.hxx:62
std::pair< std::wstring, XmlTagAttributes_t > XmlTag_t
Definition: types.hxx:35
::std::pair< Language_t, Country_t > LocaleSet_t
Definition: types.hxx:48
::std::wstring Content_t
Definition: types.hxx:50
std::map< std::wstring, std::wstring > XmlTagAttributes_t
Definition: types.hxx:34
::std::wstring Language_t
Definition: types.hxx:46
::std::pair< LocaleSet_t, Content_t > Chunk_t
Definition: types.hxx:51
const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR
Definition: types.hxx:66
const Chunk_t EMPTY_CHUNK
Definition: types.hxx:55