xref: /aoo41x/main/shell/inc/internal/types.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef TYPES_HXX_INCLUDED
29 #define TYPES_HXX_INCLUDED
30 
31 #include <string>
32 #include <map>
33 #include <utility>
34 #include <vector>
35 #include <stack>
36 #include <external/zlib/zlib.h>
37 #include <external/zlib/ioapi.h>
38 
39 
40 typedef std::vector<std::wstring> StringList_t;
41 
42 //+-------------------------------------------------------------------------
43 //
44 //  Declare:    XmlTagAttributes_t, xml tag attribute struct
45 //              XmlTag_t, xml tag including content and attributes.
46 //              XmlTags_t, tags defined with tag name and xml tag.
47 //
48 //  Contents:   Definitions of xml tag used in parser.
49 //
50 //--------------------------------------------------------------------------
51 typedef std::wstring Name_t;
52 typedef std::wstring Value_t;
53 typedef std::wstring Characters_t;
54 
55 typedef std::map<Name_t, Value_t>                   XmlTagAttributes_t;
56 typedef std::pair<Characters_t, XmlTagAttributes_t> XmlTag_t;
57 typedef std::map<Name_t, XmlTag_t>                  XmlTags_t;
58 
59 const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t());
60 
61 //+-------------------------------------------------------------------------
62 //
63 //  Declare:    Language_t, language of the Locale pair
64 //              Country_t, country of the Local pair
65 //              LocaleSet_t, Local pair
66 //
67 //  Contents:   Definitions of Chunk properties.
68 //
69 //--------------------------------------------------------------------------
70 typedef ::std::wstring Language_t;
71 typedef ::std::wstring Country_t;
72 typedef ::std::pair<Language_t, Country_t >   LocaleSet_t;
73 
74 typedef ::std::wstring Content_t;
75 typedef ::std::pair<LocaleSet_t, Content_t > Chunk_t;
76 typedef ::std::vector< Chunk_t > ChunkBuffer_t;
77 
78 const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstring());
79 const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring());
80 
81 //+-------------------------------------------------------------------------
82 //
83 //  Declare:    StyleName_t, style name of a style-locale pair.
84 //              StyleLocaleMap, the map of Styple-Locale pair.
85 //
86 //  Contents:   Definitions of Style Names.
87 //
88 //--------------------------------------------------------------------------
89 typedef ::std::wstring StyleName_t;
90 typedef ::std::pair <StyleName_t, LocaleSet_t> StyleLocalePair_t;
91 typedef ::std::map<StyleName_t, LocaleSet_t>  StyleLocaleMap_t;
92 
93 const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE );
94 
95 #endif
96