Theolizer  Version.1.2.0
serializer for C++ / Do you want to update your classes easily ?
unordered_map.h
[詳解]
1 //############################################################################
2 /*!
3  @brief std::unordered_map<>のシリアライズ
4  @ingroup SerializationStl
5  @file unordered_map.h
6  @author Yoshinori Tahara(Theoride Technology)
7  @date 2017/02/07 Created
8 */
9 /*
10  © 2016 Theoride Technology (http://theolizer.com/) All Rights Reserved.
11  "Theolizer" is a registered trademark of Theoride Technology.
12 
13  "Theolizer" License
14  In the case where you are in possession of a valid “Theolizer” License,
15  you may use this file in accordance with the terms and conditions of
16  the use license determined by Theoride Technology.
17 
18  General Public License Version 3 ("GPLv3")
19  You may use this file in accordance with the terms and conditions of
20  GPLv3 published by Free Software Foundation.
21  Please confirm the contents of GPLv3 at https://www.gnu.org/licenses/gpl.txt .
22  A copy of GPLv3 is also saved in a LICENSE.TXT file.
23 
24  商用ライセンス
25  あなたが有効なTheolizer商用ライセンスを保持している場合、
26  セオライド テクノロジーの定める使用許諾書の条件に従って、
27  このファイルを取り扱うことができます。
28 
29  General Public License Version 3(以下GPLv3)
30  Free Software Foundationが公表するGPLv3の使用条件に従って、
31  あなたはこのファイルを取り扱うことができます。
32  GPLv3の内容を https://www.gnu.org/licenses/gpl.txt にて確認して下さい。
33  またGPLv3のコピーをLICENSE.TXTファイルにおいてます。
34 */
35 //############################################################################
36 
37 #if !defined(THEOLIZER_INTERNAL_UNORDERED_MAP_H)
38 #define THEOLIZER_INTERNAL_UNORDERED_MAP_H
39 
40 #ifndef THEOLIZER_INTERNAL_DOXYGEN
41 
42 //############################################################################
43 // Begin
44 //############################################################################
45 
46 #include <unordered_map>
47 #include "serializer.h"
48 #include "internal/containers.h"
49 
50 THEOLIZER_PROVIDED_BY("Theoride Technology");
51 
52 //############################################################################
53 // std::unordered_map<>対応
54 //############################################################################
55 
56 // ***************************************************************************
57 // 手動コード展開
58 // ***************************************************************************
59 
60 #define THEOLZIER_INTERNAL_CONTAINER_PARAMETER \
61  template<class Key, class T, class Hash, class Pred, class Alloc>
62 #define THEOLZIER_INTERNAL_CONTAINER_NAME std::unordered_map
63 #define THEOLZIER_INTERNAL_CONTAINER_ARGUMENT Key, T, Hash, Pred, Alloc
64 #define THEOLZIER_INTERNAL_CONTAINER_UNIQUE unordered_mapTheolizer
65 #define THEOLIZER_INTERNAL_IS_UNORDERED
66 #include "internal/container_map.inc"
67 #undef THEOLIZER_INTERNAL_IS_UNORDERED
68 
69 // ***************************************************************************
70 // 自動生成コード
71 // ***************************************************************************
72 
73 #ifdef THEOLIZER_WRITE_CODE
74 
75 #define THEOLIZER_GENERATED_LAST_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kLastVersionNo,1)
76 #define THEOLIZER_GENERATED_CLASS_TYPE THEOLIZER_INTERNAL_UNPAREN(std::unordered_map<Key, T, Hash, Pred, Alloc>)
77 #define THEOLIZER_GENERATED_PARAMETER_LIST template<class Key, class T, class Hash, class Pred, class Alloc>
78 #define THEOLIZER_GENERATED_UNIQUE_NAME unordered_mapTheolizer
79 
80 // ---<<< Version.1 >>>---
81 
82 #define THEOLIZER_GENERATED_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kVersionNo,1)
83 #define THEOLIZER_GENERATED_CLASS_NAME()\
84  THEOLIZER_INTERNAL_TEMPLATE_NAME((u8"std::unordered_map",Key,T,Hash,Pred,Alloc))
85 #include <theolizer/internal/version_manual.inc>
86 #undef THEOLIZER_GENERATED_VERSION_NO
87 
88 #endif//THEOLIZER_WRITE_CODE
89 
90 // ***************************************************************************
91 // 定義したマクロの解放
92 // ***************************************************************************
93 
94 #undef THEOLZIER_INTERNAL_CONTAINER_PARAMETER
95 #undef THEOLZIER_INTERNAL_CONTAINER_NAME
96 #undef THEOLZIER_INTERNAL_CONTAINER_ARGUMENT
97 #undef THEOLZIER_INTERNAL_CONTAINER_UNIQUE
98 
99 #undef THEOLIZER_INTERNAL_FULL_NAME
100 
101 //############################################################################
102 // 被ポインタ用(theolizer::MapPointee<>)
103 //############################################################################
104 
105 // ***************************************************************************
106 // theolizer::UnorderedMapPointee<>
107 // std::unordered_map<>の単純な派生クラス
108 // 要素をPointeeとして処理する
109 // ***************************************************************************
110 
111 namespace theolizer
112 {
113 
114 template
115 <
116  class Key,
117  class T,
118  class Hash=std::hash<Key>,
119  class Pred=std::equal_to<Key>,
120  class Alloc=std::allocator<std::pair<const Key,T> >
121 >
122 class THEOLIZER_ANNOTATE(CS) UnorderedMapPointee :
123  public std::unordered_map<Key, T, Hash, Pred, Alloc>
124 {
125 public:
126  using std::unordered_map<Key, T, Hash, Pred, Alloc>::unordered_map;
127 };
128 
129 } // namespace theolizer
130 
131 // ***************************************************************************
132 // 手動コード展開
133 // ***************************************************************************
134 
135 #define THEOLZIER_INTERNAL_CONTAINER_PARAMETER \
136  template<class Key, class T, class Hash, class Pred, class Alloc>
137 #define THEOLZIER_INTERNAL_CONTAINER_NAME theolizer::UnorderedMapPointee
138 #define THEOLZIER_INTERNAL_CONTAINER_ARGUMENT Key, T, Hash, Pred, Alloc
139 #define THEOLZIER_INTERNAL_CONTAINER_UNIQUE UnorderedMapPointeeTheolizer
140 #define THEOLIZER_INTERNAL_IS_UNORDERED
141 #define THEOLIZER_INTERNAL_POINTEE
142 #include "internal/container_map.inc"
143 #undef THEOLIZER_INTERNAL_POINTEE
144 #undef THEOLIZER_INTERNAL_IS_UNORDERED
145 
146 // ***************************************************************************
147 // 自動生成コード
148 // ***************************************************************************
149 
150 #ifdef THEOLIZER_WRITE_CODE
151 
152 #define THEOLIZER_GENERATED_LAST_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kLastVersionNo,1)
153 #define THEOLIZER_GENERATED_CLASS_TYPE THEOLIZER_INTERNAL_UNPAREN(theolizer::UnorderedMapPointee<Key, T, Hash, Pred, Alloc>)
154 #define THEOLIZER_GENERATED_PARAMETER_LIST template<class Key, class T, class Hash, class Pred, class Alloc>
155 #define THEOLIZER_GENERATED_UNIQUE_NAME UnorderedMapPointeeTheolizer
156 
157 // ---<<< Version.1 >>>---
158 
159 #define THEOLIZER_GENERATED_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kVersionNo,1)
160 #define THEOLIZER_GENERATED_CLASS_NAME()\
161  THEOLIZER_INTERNAL_TEMPLATE_NAME((u8"theolizer::UnorderedMapPointee",Key,T,Hash,Pred,Alloc))
162 #include <theolizer/internal/version_manual.inc>
163 #undef THEOLIZER_GENERATED_VERSION_NO
164 
165 #endif//THEOLIZER_WRITE_CODE
166 
167 // ***************************************************************************
168 // 定義したマクロの解放
169 // ***************************************************************************
170 
171 #undef THEOLZIER_INTERNAL_CONTAINER_PARAMETER
172 #undef THEOLZIER_INTERNAL_CONTAINER_NAME
173 #undef THEOLZIER_INTERNAL_CONTAINER_ARGUMENT
174 #undef THEOLZIER_INTERNAL_CONTAINER_UNIQUE
175 
176 #undef THEOLIZER_INTERNAL_FULL_NAME
177 
178 //############################################################################
179 // std::unordered_multimap<>対応
180 //############################################################################
181 
182 // ***************************************************************************
183 // 手動コード展開
184 // ***************************************************************************
185 
186 #define THEOLZIER_INTERNAL_CONTAINER_PARAMETER \
187  template<class Key, class T, class Hash, class Pred, class Alloc>
188 #define THEOLZIER_INTERNAL_CONTAINER_NAME std::unordered_multimap
189 #define THEOLZIER_INTERNAL_CONTAINER_ARGUMENT Key, T, Hash, Pred, Alloc
190 #define THEOLZIER_INTERNAL_CONTAINER_UNIQUE unordered_multimapTheolizer
191 #define THEOLIZER_INTERNAL_IS_UNORDERED
192 #define THEOLIZER_INTERNAL_IS_MULTI
193 #include "internal/container_map.inc"
194 #undef THEOLIZER_INTERNAL_IS_MULTI
195 #undef THEOLIZER_INTERNAL_IS_UNORDERED
196 
197 // ***************************************************************************
198 // 自動生成コード
199 // ***************************************************************************
200 
201 #ifdef THEOLIZER_WRITE_CODE
202 
203 #define THEOLIZER_GENERATED_LAST_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kLastVersionNo,1)
204 #define THEOLIZER_GENERATED_CLASS_TYPE THEOLIZER_INTERNAL_UNPAREN(std::unordered_multimap<Key, T, Hash, Pred, Alloc>)
205 #define THEOLIZER_GENERATED_PARAMETER_LIST template<class Key, class T, class Hash, class Pred, class Alloc>
206 #define THEOLIZER_GENERATED_UNIQUE_NAME unordered_multimapTheolizer
207 
208 // ---<<< Version.1 >>>---
209 
210 #define THEOLIZER_GENERATED_VERSION_NO THEOLIZER_INTERNAL_DEFINE(kVersionNo,1)
211 #define THEOLIZER_GENERATED_CLASS_NAME()\
212  THEOLIZER_INTERNAL_TEMPLATE_NAME((u8"std::unordered_multimap",Key,T,Hash,Pred,Alloc))
213 #include <theolizer/internal/version_manual.inc>
214 #undef THEOLIZER_GENERATED_VERSION_NO
215 
216 #endif//THEOLIZER_WRITE_CODE
217 
218 // ***************************************************************************
219 // 定義したマクロの解放
220 // ***************************************************************************
221 
222 #undef THEOLZIER_INTERNAL_CONTAINER_PARAMETER
223 #undef THEOLZIER_INTERNAL_CONTAINER_NAME
224 #undef THEOLZIER_INTERNAL_CONTAINER_ARGUMENT
225 #undef THEOLZIER_INTERNAL_CONTAINER_UNIQUE
226 
227 #undef THEOLIZER_INTERNAL_FULL_NAME
228 
229 //############################################################################
230 // End
231 //############################################################################
232 
233 #endif // THEOLIZER_INTERNAL_DOXYGEN
234 
235 #endif // THEOLIZER_INTERNAL_UNORDERED_MAP_H
Theolizerライブラリの標準コンテナ・サポート
theolizer名前空間
Definition: base.h:53
#define THEOLIZER_PROVIDED_BY(dVendor)
ソース自動生成制御
TheolizerライブラリのAPI部