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 #ifdef OS2 33 #include <zlib.h> 34 #include <minizip/ioapi.h> 35 #else 36 #include <external/zlib/zlib.h> 37 #include <external/zlib/ioapi.h> 38 #endif 39 40 41 typedef std::vector<std::wstring> StringList_t; 42 43 //+------------------------------------------------------------------------- 44 // 45 // Declare: XmlTagAttributes_t, xml tag attribute struct 46 // XmlTag_t, xml tag including content and attributes. 47 // XmlTags_t, tags defined with tag name and xml tag. 48 // 49 // Contents: Definitions of xml tag used in parser. 50 // 51 //-------------------------------------------------------------------------- 52 typedef std::wstring Name_t; 53 typedef std::wstring Value_t; 54 typedef std::wstring Characters_t; 55 56 typedef std::map<Name_t, Value_t> XmlTagAttributes_t; 57 typedef std::pair<Characters_t, XmlTagAttributes_t> XmlTag_t; 58 typedef std::map<Name_t, XmlTag_t> XmlTags_t; 59 60 const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t()); 61 62 //+------------------------------------------------------------------------- 63 // 64 // Declare: Language_t, language of the Locale pair 65 // Country_t, country of the Local pair 66 // LocaleSet_t, Local pair 67 // 68 // Contents: Definitions of Chunk properties. 69 // 70 //-------------------------------------------------------------------------- 71 typedef ::std::wstring Language_t; 72 typedef ::std::wstring Country_t; 73 typedef ::std::pair<Language_t, Country_t > LocaleSet_t; 74 75 typedef ::std::wstring Content_t; 76 typedef ::std::pair<LocaleSet_t, Content_t > Chunk_t; 77 typedef ::std::vector< Chunk_t > ChunkBuffer_t; 78 79 const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstring()); 80 const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring()); 81 82 //+------------------------------------------------------------------------- 83 // 84 // Declare: StyleName_t, style name of a style-locale pair. 85 // StyleLocaleMap, the map of Styple-Locale pair. 86 // 87 // Contents: Definitions of Style Names. 88 // 89 //-------------------------------------------------------------------------- 90 typedef ::std::wstring StyleName_t; 91 typedef ::std::pair <StyleName_t, LocaleSet_t> StyleLocalePair_t; 92 typedef ::std::map<StyleName_t, LocaleSet_t> StyleLocaleMap_t; 93 94 const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE ); 95 96 #endif 97