]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/test_z.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / serialization / test / test_z.cpp
1 #if 0
2 #include <stdexcept>
3 #include <iostream>
4 #include <sstream>
5
6 #include <boost/optional.hpp>
7 #include <boost/archive/text_oarchive.hpp>
8 #include <boost/archive/text_iarchive.hpp>
9 #include <boost/serialization/optional.hpp>
10
11 struct Foo
12 {
13 Foo(int aBar) :
14 mBar(aBar)
15 {
16 if (mBar > 10)
17 {
18 throw std::logic_error("too big bar");
19 }
20 }
21 int bar() const
22 {
23 return mBar;
24 }
25 bool operator==(const Foo & rhs) const {
26 return mBar == rhs.mBar;
27 }
28 private:
29 int mBar;
30 };
31
32 namespace boost {
33 namespace serialization {
34
35 template<class Archive>
36 inline void serialize(Archive & ar, Foo& foo, const unsigned int /*version*/)
37 {
38 std::cout << __FUNCTION__ << " called" << std::endl;
39 }
40
41 template<class Archive>
42 inline void save_construct_data(Archive & ar, const Foo* foo, const unsigned int /*version*/)
43 {
44 std::cout << __FUNCTION__ << " called" << std::endl;
45 ar & foo->bar();
46 }
47
48 template<class Archive>
49 inline void load_construct_data(Archive & ar, Foo* foo, const unsigned int /*version*/)
50 {
51 std::cout << __FUNCTION__ << " called" << std::endl;
52 int bar;
53 ar & bar;
54 ::new(foo) Foo(bar);
55 }
56
57 } // serialization
58 } // boost
59
60
61 int main()
62 {
63 boost::optional<Foo> oldFoo = Foo(10);
64 std::ostringstream outStream;
65 boost::archive::text_oarchive outArchive(outStream);
66 outArchive & oldFoo;
67
68 boost::optional<Foo> newFoo;
69 std::istringstream inStream(outStream.str());
70 boost::archive::text_iarchive inArchive(inStream);
71 inArchive & newFoo;
72
73 return !(newFoo == oldFoo);
74 }
75
76 #elif 0
77 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
78 // test_optional.cpp
79
80 // (C) Copyright 2004 Pavel Vozenilek
81 // Use, modification and distribution is subject to the Boost Software
82 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
83 // http://www.boost.org/LICENSE_1_0.txt)
84
85 // should pass compilation and execution
86
87 #include <cstddef> // NULL
88 #include <cstdio> // remove
89 #include <fstream>
90
91 #include <boost/config.hpp>
92
93 #if defined(BOOST_NO_STDC_NAMESPACE)
94 namespace std{
95 using ::remove;
96 }
97 #endif
98
99 #include <boost/archive/archive_exception.hpp>
100
101 #define BOOST_ARCHIVE_TEST xml_archive.hpp
102
103 #include "test_tools.hpp"
104
105 #include <boost/serialization/optional.hpp>
106
107 #include "A.hpp"
108 #include "A.ipp"
109
110 int test_main( int /* argc */, char* /* argv */[] )
111 {
112 const char * testfile = boost::archive::tmpnam(NULL);
113 BOOST_REQUIRE(NULL != testfile);
114
115 const boost::optional<int> aoptional1;
116 const boost::optional<int> aoptional2(123);
117 {
118 test_ostream os(testfile, TEST_STREAM_FLAGS);
119 test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
120 //oa << boost::serialization::make_nvp("aoptional1",aoptional1);
121 //oa << boost::serialization::make_nvp("aoptional2",aoptional2);
122 }
123 /*
124 boost::optional<int> aoptional1a(999);
125 boost::optional<int> aoptional2a;
126 {
127 test_istream is(testfile, TEST_STREAM_FLAGS);
128 test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
129 ia >> boost::serialization::make_nvp("aoptional1",aoptional1a);
130 ia >> boost::serialization::make_nvp("aoptional2",aoptional2a);
131 }
132 BOOST_CHECK(aoptional1 == aoptional1a);
133 BOOST_CHECK(aoptional2 == aoptional2a);
134 */
135 std::remove(testfile);
136 return EXIT_SUCCESS;
137 }
138
139 // EOF
140
141 #elif 0
142
143 #include <fstream>
144
145 #include <boost/archive/xml_woarchive.hpp>
146 #include <boost/archive/xml_wiarchive.hpp>
147 #include <boost/serialization/string.hpp>
148
149 #include "test_tools.hpp"
150
151 int test_main(int, char *argv[])
152 {
153 const char * testfile = boost::archive::tmpnam(NULL);
154 std::string s1 = "kkkabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
155 std::wstring w1 = L"kkk";
156 std::wstring w2 = L"апр"; // some non-latin (for example russians) letters
157 {
158 std::wofstream ofs(testfile);
159 {
160 boost::archive::xml_woarchive oa(ofs);
161 oa << boost::serialization::make_nvp("key1", s1);
162 //oa << boost::serialization::make_nvp("key2", w1);
163 //oa << boost::serialization::make_nvp("key3", w2); // here exception is thrown
164 }
165 }
166 std::string new_s1;
167 //std::wstring new_w1;
168 //std::wstring new_w2;
169 {
170 std::wifstream ifs(testfile);
171 {
172 boost::archive::xml_wiarchive ia(ifs);
173 ia >> boost::serialization::make_nvp("key1", new_s1);
174 //ia >> boost::serialization::make_nvp("key2", new_w1);
175 //ia >> boost::serialization::make_nvp("key3", new_w2); // here exception is thrown
176 }
177 }
178 BOOST_CHECK(s1 == new_s1);
179 //BOOST_CHECK(w1 == new_w1);
180 //BOOST_CHECK(w2 == new_w2);
181 return 0;
182 }
183
184 #elif 0
185
186 #include <boost/archive/xml_oarchive.hpp>
187 #include <boost/serialization/nvp.hpp>
188
189 #include <iostream>
190
191 int main() {
192 boost::archive::xml_oarchive oa( std::cerr );
193 int bob = 3;
194 oa << boost::serialization::make_nvp( "bob", bob );
195 }
196
197 #elif 0
198
199 #include <fstream>
200 #include <vector>
201 #include <iostream>
202
203 //#include <boost/shared_ptr.hpp>
204 #include <boost/archive/binary_iarchive.hpp>
205 #include <boost/serialization/nvp.hpp>
206 #include <boost/serialization/shared_ptr.hpp>
207 #include <boost/serialization/vector.hpp>
208
209 struct boxed_int
210 {
211 boxed_int() : i(0) {}
212 boxed_int(int i) : i(i) {}
213 int i;
214 template<class Archive>
215 void serialize(Archive &ar, unsigned version)
216 {
217 ar & BOOST_SERIALIZATION_NVP(i);
218 }
219 };
220 typedef boost::shared_ptr<boxed_int> pi;
221
222 void go(std::istream &is) {
223 std::vector<pi> vv;
224 try
225 {
226 boost::archive::binary_iarchive ia(is);
227 ia & vv;
228 }
229 catch(std::exception &e) {}
230 }
231
232 int main(int argc, char **argv) {
233 if(argc > 1) {
234 std::ifstream is(argv[1]);
235 go(is);
236 } else {
237 go(std::cin);
238 }
239
240 return 0;
241 }
242
243 #elif 0
244
245 #include <cassert>
246 #include <string>
247
248 #include <boost/archive/iterators/base64_from_binary.hpp>
249 #include <boost/archive/iterators/transform_width.hpp>
250
251 namespace bai = boost::archive::iterators;
252 int main()
253 {
254 std::string input =
255 "A large rose-tree stood near the entrance of the garden: the roses growing on it were white, but there were "
256 "three gardeners at it, busily painting them red. Alice thought this a very curious thing, and she went nearer "
257 "to watch them, and just as she came up to them she heard one of them say, 'Look out now, Five! Don't go "
258 "splashing paint over me like that!''I couldn't help it,' said Five, in a sulky tone; 'Seven jogged my "
259 "elbow.'On which Seven looked up and said, 'That's right, Five! Always lay the blame on others!''You'd better "
260 "not talk!' said Five. 'I heard the Queen say only yesterday you deserved to be beheaded!''What for?' said the "
261 "one who had spoken first.'That's none of your business, Two!' said Seven.'Yes, it is his business!' said "
262 "Five, 'and I'll tell him—it was for bringing the cook tulip-roots instead of onions.'Seven flung down his "
263 "brush, and had just begun 'Well, of all the unjust things—' when his eye chanced to fall upon Alice, as she "
264 "stood watching them, and he checked himself suddenly: the others looked round also, and all of them bowed "
265 "low.'Would you tell me,' said Alice, a little timidly, 'why you are painting those roses?'Five and Seven said "
266 "nothing, but looked at Two. Two began in a low voice, 'Why the fact is, you see, Miss, this here ought to "
267 "have been a red rose-tree, and we put a white one in by mistake; and if the Queen was to find it out, we "
268 "should all have our heads cut off, you know. So you see, Miss, we're doing our best, afore she comes, to—' At "
269 "this moment Five, who had been anxiously looking across the garden, called out 'The Queen! The Queen!' and "
270 "the three gardeners instantly threw themselves flat upon their faces. There was a sound of many footsteps, "
271 "and Alice looked round, eager to see the Queen.First came ten soldiers carrying clubs; these were all shaped "
272 "like the three gardeners, oblong and flat, with their hands and feet at the corners: next the ten courtiers; "
273 "these were ornamented all over with diamonds, and walked two and two, as the soldiers did. After these came "
274 "the royal children; there were ten of them, and the little dears came jumping merrily along hand in hand, in "
275 "couples: they were all ornamented with hearts. Next came the guests, mostly Kings and Queens, and among them "
276 "Alice recognised the White Rabbit: it was talking in a hurried nervous manner, smiling at everything that was "
277 "said, and went by without noticing her. Then followed the Knave of Hearts, carrying the King's crown on a "
278 "crimson velvet cushion; and, last of all this grand procession, came THE KING AND QUEEN OF HEARTS.Alice was "
279 "rather doubtful whether she ought not to lie down on her face like the three gardeners, but she could not "
280 "remember ever having heard of such a rule at processions; 'and besides, what would be the use of a "
281 "procession,' thought she, 'if people had all to lie down upon their faces, so that they couldn't see it?' So "
282 "she stood still where she was, and waited.When the procession came opposite to Alice, they all stopped and "
283 "looked at her, and the Queen said severely 'Who is this?' She said it to the Knave of Hearts, who only bowed "
284 "and smiled in reply.'Idiot!' said the Queen, tossing her head impatiently; and, turning to Alice, she went "
285 "on, 'What's your name, child?''My name is Alice, so please your Majesty,' said Alice very politely; but she "
286 "added, to herself, 'Why, they're only a pack of cards, after all. I needn't be afraid of them!''And who are "
287 "these?' said the Queen, pointing to the three gardeners who were lying round the rosetree; for, you see, as "
288 "they were lying on their faces, and the pattern on their backs was the same as the rest of the pack, she "
289 "could not tell whether they were gardeners, or soldiers, or courtiers, or three of her own children.'How "
290 "should I know?' said Alice, surprised at her own courage. 'It's no business of mine.'The Queen turned crimson "
291 "with fury, and, after glaring at her for a moment like a wild beast, screamed 'Off with her head! "
292 "Off—''Nonsense!' said Alice, very loudly and decidedly, and the Queen was silent.The King laid his hand upon "
293 "her arm, and timidly said 'Consider, my dear: she is only a child!'The Queen turned angrily away from him, "
294 "and said to the Knave 'Turn them over!'The Knave did so, very carefully, with one foot.'Get up!' said the "
295 "Queen, in a shrill, loud voice, and the three gardeners instantly jumped up, and began bowing to the King, "
296 "the Queen, the royal children, and everybody else.'Leave off that!' screamed the Queen. 'You make me giddy.' "
297 "And then, turning to the rose-tree, she went on, 'What have you been doing here?''May it please your "
298 "Majesty,' said Two, in a very humble tone, going down on one knee as he spoke, 'we were trying—''I see!' said "
299 "the Queen, who had meanwhile been examining the roses. 'Off with their heads!' and the procession moved on, "
300 "three of the soldiers remaining behind to execute the unfortunate gardeners, who ran to Alice for "
301 "protection.'You shan't be beheaded!' said Alice, and she put them into a large flower-pot that stood near. "
302 "The three soldiers wandered about for a minute or two, looking for them, and then quietly marched off after "
303 "the others.'Are their heads off?' shouted the Queen.'Their heads are gone, if it please your Majesty!' the "
304 "soldiers shouted in reply.'That's right!' shouted the Queen. 'Can you play croquet?'The soldiers were silent, "
305 "and looked at Alice, as the question was evidently meant for her.'Yes!' shouted Alice.'Come on, then!' roared "
306 "the Queen, and Alice joined the procession, wondering very much what would happen next.'It's—it's a very fine "
307 "day!' said a timid voice at her side. She was walking by the White Rabbit, who was peeping anxiously into her "
308 "face.'Very,' said Alice: '—where's the Duchess?''Hush! Hush!' said the Rabbit in a low, hurried tone. He "
309 "looked anxiously over his shoulder as he spoke, and then raised himself upon tiptoe, put his mouth close to "
310 "her ear, and whispered 'She's under sentence of execution.''What for?' said Alice.'Did you say \"What a "
311 "pity!\"?' the Rabbit asked.'No, I didn't,' said Alice: 'I don't think it's at all a pity. I said \"What "
312 "for?\"''She boxed the Queen's ears—' the Rabbit began. Alice gave a little scream of laughter. 'Oh, hush!' "
313 "the Rabbit whispered in a frightened tone. 'The Queen will hear you! You see, she came rather late, and the "
314 "Queen said—''Get to your places!' shouted the Queen in a voice of thunder, and people began running about in "
315 "all directions, tumbling up against each other; however, they got settled down in a minute or two, and the "
316 "game began. Alice thought she had never seen such a curious croquet-ground in her life; it was all ridges and "
317 "furrows; the balls were live hedgehogs, the mallets live flamingoes, and the soldiers had to double "
318 "themselves up and to stand on their hands and feet, to make the arches.The chief difficulty Alice found at "
319 "first was in managing her flamingo: she succeeded in getting its body tucked away, comfortably enough, under "
320 "her arm, with its legs hanging down, but generally, just as she had got its neck nicely straightened out, and "
321 "was going to give the hedgehog a blow with its head, it would twist itself round and look up in her face, "
322 "with such a puzzled expression that she could not help bursting out laughing: and when she had got its head "
323 "down, and was going to begin again, it was very provoking to find that the hedgehog had unrolled itself, and "
324 "was in the act of crawling away: besides all this, there was generally a ridge or furrow in the way wherever "
325 "she wanted to send the hedgehog to, and, as the doubled-up soldiers were always getting up and walking off to "
326 "other parts of the ground, Alice soon came to the conclusion that it was a very difficult game indeed.The "
327 "players all played at once without waiting for turns, quarrelling all the while, and fighting for the "
328 "hedgehogs; and in a very short time the Queen was in a furious passion, and went stamping about, and shouting "
329 "'Off with his head!' or 'Off with her head!' about once in a minute.Alice began to feel very uneasy: to be "
330 "sure, she had not as yet had any dispute with the Queen, but she knew that it might happen any minute, 'and "
331 "then,' thought she, 'what would become of me? They're dreadfully fond of beheading people here; the great "
332 "wonder is, that there's any one left alive!'She was looking about for some way of escape, and wondering "
333 "whether she could get away without being seen, when she noticed a curious appearance in the air: it puzzled "
334 "her very much at first, but, after watching it a minute or two, she made it out to be a grin, and she said to "
335 "herself 'It's the Cheshire Cat: now I shall have somebody to talk to.''How are you getting on?' said the Cat, "
336 "as soon as there was mouth enough for it to speak with.Alice waited till the eyes appeared, and then nodded. "
337 "'It's no use speaking to it,' she thought, 'till its ears have come, or at least one of them.' In another "
338 "minute the whole head appeared, and then Alice put down her flamingo, and began an account of the game, "
339 "feeling very glad she had someone to listen to her. The Cat seemed to think that there was enough of it now "
340 "in sight, and no more of it appeared.'I don't think they play at all fairly,' Alice began, in rather a "
341 "complaining tone, 'and they all quarrel so dreadfully one can't hear oneself speak—and they don't seem to "
342 "have any rules in particular; at least, if there are, nobody attends to them—and you've no idea how confusing "
343 "it is all the things being alive; for instance, there's the arch I've got to go through next walking about at "
344 "the other end of the ground—and I should have croqueted the Queen's hedgehog just now, only it ran away when "
345 "it saw mine coming!''How do you like the Queen?' said the Cat in a low voice.'Not at all,' said Alice: 'she's "
346 "so extremely—' Just then she noticed that the Queen was close behind her, listening: so she went on, '—likely "
347 "to win, that it's hardly worth while finishing the game.'The Queen smiled and passed on.'Who are you talking "
348 "to?' said the King, going up to Alice, and looking at the Cat's head with great curiosity.'It's a friend of "
349 "mine—a Cheshire Cat,' said Alice: 'allow me to introduce it.''I don't like the look of it at all,' said the "
350 "King: 'however, it may kiss my hand if it likes.''I'd rather not,' the Cat remarked.'Don't be impertinent,' "
351 "said the King, 'and don't look at me like that!' He got behind Alice as he spoke.'A cat may look at a king,' "
352 "said Alice. 'I've read that in some book, but I don't remember where.''Well, it must be removed,' said the "
353 "King very decidedly, and he called the Queen, who was passing at the moment, 'My dear! I wish you would have "
354 "this cat removed!'The Queen had only one way of settling all difficulties, great or small. 'Off with his "
355 "head!' she said, without even looking round.'I'll fetch the executioner myself,' said the King eagerly, and "
356 "he hurried off.Alice thought she might as well go back, and see how the game was going on, as she heard the "
357 "Queen's voice in the distance, screaming with passion. She had already heard her sentence three of the "
358 "players to be executed for having missed their turns, and she did not like the look of things at all, as the "
359 "game was in such confusion that she never knew whether it was her turn or not. So she went in search of her "
360 "hedgehog.The hedgehog was engaged in a fight with another hedgehog, which seemed to Alice an excellent "
361 "opportunity for croqueting one of them with the other: the only difficulty was, that her flamingo was gone "
362 "across to the other side of the garden, where Alice could see it trying in a helpless sort of way to fly up "
363 "into a tree.By the time she had caught the flamingo and brought it back, the fight was over, and both the "
364 "hedgehogs were out of sight: 'but it doesn't matter much,' thought Alice, 'as all the arches are gone from "
365 "this side of the ground.' So she tucked it away under her arm, that it might not escape again, and went back "
366 "for a little more conversation with her friend.When she got back to the Cheshire Cat, she was surprised to "
367 "find quite a large crowd collected round it: there was a dispute going on between the executioner, the King, "
368 "and the Queen, who were all talking at once, while all the rest were quite silent, and looked very "
369 "uncomfortable.The moment Alice appeared, she was appealed to by all three to settle the question, and they "
370 "repeated their arguments to her, though, as they all spoke at once, she found it very hard indeed to make out "
371 "exactly what they said.The executioner's argument was, that you couldn't cut off a head unless there was a "
372 "body to cut it off from: that he had never had to do such a thing before, and he wasn't going to begin at his "
373 "time of life.The King's argument was, that anything that had a head could be beheaded, and that you weren't "
374 "to talk nonsense.The Queen's argument was, that if something wasn't done about it in less than no time she'd "
375 "have everybody executed, all round. (It was this last remark that had made the whole party look so grave and "
376 "anxious.)Alice could think of nothing else to say but 'It belongs to the Duchess: you'd better ask her about "
377 "it.''She's in prison,' the Queen said to the executioner: 'fetch her here.' And the executioner went off like "
378 "an arrow.The Cat's head began fading away the moment he was gone, and, by the time he had come back with the "
379 "Duchess, it had entirely disappeared; so the King and the executioner ran wildly up and down looking for it, "
380 "while the rest of the party went back to the game.";
381 std::string output =
382 "QSBsYXJnZSByb3NlLXRyZWUgc3Rvb2QgbmVhciB0aGUgZW50cmFuY2Ugb2YgdGhlIGdhcmRlbjogdGhlIHJvc2VzIGdyb3dpbmcgb24gaXQgd2"
383 "VyZSB3aGl0ZSwgYnV0IHRoZXJlIHdlcmUgdGhyZWUgZ2FyZGVuZXJzIGF0IGl0LCBidXNpbHkgcGFpbnRpbmcgdGhlbSByZWQuIEFsaWNlIHRo"
384 "b3VnaHQgdGhpcyBhIHZlcnkgY3VyaW91cyB0aGluZywgYW5kIHNoZSB3ZW50IG5lYXJlciB0byB3YXRjaCB0aGVtLCBhbmQganVzdCBhcyBzaG"
385 "UgY2FtZSB1cCB0byB0aGVtIHNoZSBoZWFyZCBvbmUgb2YgdGhlbSBzYXksICdMb29rIG91dCBub3csIEZpdmUhIERvbid0IGdvIHNwbGFzaGlu"
386 "ZyBwYWludCBvdmVyIG1lIGxpa2UgdGhhdCEnJ0kgY291bGRuJ3QgaGVscCBpdCwnIHNhaWQgRml2ZSwgaW4gYSBzdWxreSB0b25lOyAnU2V2ZW"
387 "4gam9nZ2VkIG15IGVsYm93LidPbiB3aGljaCBTZXZlbiBsb29rZWQgdXAgYW5kIHNhaWQsICdUaGF0J3MgcmlnaHQsIEZpdmUhIEFsd2F5cyBs"
388 "YXkgdGhlIGJsYW1lIG9uIG90aGVycyEnJ1lvdSdkIGJldHRlciBub3QgdGFsayEnIHNhaWQgRml2ZS4gJ0kgaGVhcmQgdGhlIFF1ZW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B3aXRoIHRoZSBEdWNoZXNzLCBpdCBoYWQgZW50aXJlbHkgZGlzYXBwZWFyZWQ7IHNvIHRoZSBLaW5nIG"
548 "FuZCB0aGUgZXhlY3V0aW9uZXIgcmFuIHdpbGRseSB1cCBhbmQgZG93biBsb29raW5nIGZvciBpdCwgd2hpbGUgdGhlIHJlc3Qgb2YgdGhlIHBh"
549 "cnR5IHdlbnQgYmFjayB0byB0aGUgZ2FtZS4=";
550 using it_base64_t = bai::base64_from_binary<bai::transform_width<std::string::const_iterator, 6, 8>>;
551
552 auto writePaddChars = (3 - input.length() % 3) % 3;
553 std::string base64(it_base64_t(input.begin()), it_base64_t(input.end()));
554 base64.append(writePaddChars, '=');
555 assert(base64 == output);
556 return 0;
557 }
558 #elif 0
559
560 #include <memory>
561 #include <sstream>
562
563 #include <boost/archive/text_iarchive.hpp>
564 #include <boost/archive/text_oarchive.hpp>
565 #include <boost/serialization/shared_ptr.hpp>
566
567 struct S
568 {
569 int i;
570 char c;
571
572 template <class Archive>
573 void serialize(Archive & ar, const unsigned int version)
574 {
575 ar & i;
576 ar & c;
577 }
578 };
579
580 int main()
581 {
582 const auto s0 = std::make_shared<S>();
583 s0->i = 42;
584 s0->c = 'c';
585
586 std::stringstream ss;
587
588 {
589 boost::archive::text_oarchive oa(ss);
590 oa << s0;
591 }
592
593 std::shared_ptr<S> s1;
594 {
595 boost::archive::text_iarchive ia(ss);
596 ia >> s1;
597 }
598
599 return 0;
600 }
601
602 #elif 0
603 #include <boost/archive/binary_iarchive.hpp>
604 #include <boost/serialization/vector.hpp>
605 #include <sstream>
606 #include <vector>
607
608 void f()
609 {
610 std::stringstream iss;
611 boost::archive::binary_iarchive ar(iss);
612 std::vector<int> out;
613 ar >> out;
614 }
615
616 int main(int argc, char* argv[])
617 {
618 return 0;
619 }
620
621 #include <boost/archive/xml_oarchive.hpp>
622 #include <boost/archive/xml_iarchive.hpp>
623 #include <boost/archive/detail/archive_serializer_map.hpp>
624 #include <boost/archive/impl/archive_serializer_map.ipp>
625 #include <boost/archive/impl/basic_xml_iarchive.ipp>
626 #include <boost/archive/impl/xml_iarchive_impl.ipp>
627 #include <boost/serialization/nvp.hpp>
628 #include <limits>
629 #include <fstream>
630
631 class xml_iarchive_nan :
632 public boost::archive::xml_iarchive_impl<xml_iarchive_nan>
633 {
634 protected:
635 friend class boost::archive::detail::interface_iarchive<xml_iarchive_nan>;
636 friend class boost::archive::detail::common_iarchive<xml_iarchive_nan>;
637 friend class boost::archive::basic_xml_iarchive<xml_iarchive_nan>;
638 friend class boost::archive::load_access;
639
640 using boost::archive::xml_iarchive_impl<xml_iarchive_nan>::load;
641 void load(double & t)
642 {
643 char c='0';
644 if(!is.fail())
645 {
646 c=is.peek();
647 if(c!='n')
648 {
649 boost::archive::xml_iarchive_impl<xml_iarchive_nan>::load(t);
650 }
651 else
652 {
653 char c1='0',c2='0';
654 is.get(c).get(c1).get(c2);
655 if(is.fail()||(!((c=='n')&&(c1=='a')&&(c2=='n'))))
656 boost::serialization::throw_exception(
657 boost::archive::archive_exception(
658 boost::archive::archive_exception::input_stream_error));
659 else
660 t=std::numeric_limits<double>::quiet_NaN();
661 }
662 }
663 else
664 boost::serialization::throw_exception(
665 boost::archive::archive_exception(boost::archive::archive_exception::input_stream_error));
666 }
667
668 public:
669 xml_iarchive_nan(std::istream & is, unsigned int flags = 0) :
670 boost::archive::xml_iarchive_impl<xml_iarchive_nan>(is, flags)
671 {}
672 ~xml_iarchive_nan(){};
673 };
674
675 BOOST_SERIALIZATION_REGISTER_ARCHIVE(xml_iarchive_nan)
676
677 namespace boost
678 {
679 namespace archive
680 {
681 template class detail::archive_serializer_map<xml_iarchive_nan>;
682 template class detail::interface_iarchive<xml_iarchive_nan>;
683 template class detail::common_iarchive<xml_iarchive_nan>;
684 template class basic_xml_iarchive<xml_iarchive_nan>;
685 template class xml_iarchive_impl<xml_iarchive_nan>;
686
687 }
688 }
689
690 int main(int argc, char** argv)
691 {
692 double value=0.0;
693 std::ifstream ifile("./somefile.xml");
694 xml_iarchive_nan ia(ifile);
695 ia>>BOOST_SERIALIZATION_NVP(value);
696 }
697
698 #endif
699
700 int main(int argc, char* argv[])
701 {
702 return 0;
703 }
704