xref: /aoo4110/main/shell/inc/internal/types.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef TYPES_HXX_INCLUDED
25 #define TYPES_HXX_INCLUDED
26 
27 #include <string>
28 #include <map>
29 #include <utility>
30 #include <vector>
31 #include <stack>
32 #include <external/zlib/zlib.h>
33 #include <external/zlib/ioapi.h>
34 
35 
36 typedef std::vector<std::wstring> StringList_t;
37 
38 //+-------------------------------------------------------------------------
39 //
40 //  Declare:    XmlTagAttributes_t, xml tag attribute struct
41 //              XmlTag_t, xml tag including content and attributes.
42 //              XmlTags_t, tags defined with tag name and xml tag.
43 //
44 //  Contents:   Definitions of xml tag used in parser.
45 //
46 //--------------------------------------------------------------------------
47 typedef std::wstring Name_t;
48 typedef std::wstring Value_t;
49 typedef std::wstring Characters_t;
50 
51 typedef std::map<Name_t, Value_t>                   XmlTagAttributes_t;
52 typedef std::pair<Characters_t, XmlTagAttributes_t> XmlTag_t;
53 typedef std::map<Name_t, XmlTag_t>                  XmlTags_t;
54 
55 const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t());
56 
57 //+-------------------------------------------------------------------------
58 //
59 //  Declare:    Language_t, language of the Locale pair
60 //              Country_t, country of the Local pair
61 //              LocaleSet_t, Local pair
62 //
63 //  Contents:   Definitions of Chunk properties.
64 //
65 //--------------------------------------------------------------------------
66 typedef ::std::wstring Language_t;
67 typedef ::std::wstring Country_t;
68 typedef ::std::pair<Language_t, Country_t >   LocaleSet_t;
69 
70 typedef ::std::wstring Content_t;
71 typedef ::std::pair<LocaleSet_t, Content_t > Chunk_t;
72 typedef ::std::vector< Chunk_t > ChunkBuffer_t;
73 
74 const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstring());
75 const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring());
76 
77 //+-------------------------------------------------------------------------
78 //
79 //  Declare:    StyleName_t, style name of a style-locale pair.
80 //              StyleLocaleMap, the map of Styple-Locale pair.
81 //
82 //  Contents:   Definitions of Style Names.
83 //
84 //--------------------------------------------------------------------------
85 typedef ::std::wstring StyleName_t;
86 typedef ::std::pair <StyleName_t, LocaleSet_t> StyleLocalePair_t;
87 typedef ::std::map<StyleName_t, LocaleSet_t>  StyleLocaleMap_t;
88 
89 const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE );
90 
91 #endif
92