Browse code

Updating pwiz to 3_0_21263

Steffen Neumann authored on 23/09/2021 12:34:25
Showing1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,268 @@
1
+/*=============================================================================
2
+    Copyright (c) 1999-2003 Jeremiah Willcock
3
+    Copyright (c) 1999-2003 Jaakko Jarvi
4
+    Copyright (c) 2001-2011 Joel de Guzman
5
+
6
+    Distributed under the Boost Software License, Version 1.0. (See accompanying 
7
+    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
+==============================================================================*/
9
+#if !defined(FUSION_MANIP_05052005_1200)
10
+#define FUSION_MANIP_05052005_1200
11
+
12
+#include <boost/fusion/support/config.hpp>
13
+#include <boost/config.hpp>
14
+#include <string>
15
+#include <vector>
16
+#include <cctype>
17
+
18
+// Tuple I/O manipulators
19
+
20
+#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
21
+#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
22
+
23
+#define FUSION_STRING_OF_STREAM(Stream)                                         \
24
+    std::basic_string<                                                          \
25
+        FUSION_GET_CHAR_TYPE(Stream)                                            \
26
+      , FUSION_GET_TRAITS_TYPE(Stream)                                          \
27
+    >
28
+
29
+//$$$ these should be part of the public API$$$
30
+//$$$ rename tuple_open, tuple_close and tuple_delimiter to 
31
+//    open, close and delimeter and add these synonyms to the
32
+//    TR1 tuple module.
33
+
34
+namespace boost { namespace fusion
35
+{
36
+    namespace detail
37
+    {
38
+        template <typename Tag>
39
+        int get_xalloc_index(Tag* = 0)
40
+        {
41
+            // each Tag will have a unique index
42
+            static int index = std::ios::xalloc();
43
+            return index;
44
+        }
45
+
46
+        template <typename Stream, typename Tag, typename T>
47
+        struct stream_data
48
+        {
49
+            struct arena
50
+            {
51
+                ~arena()
52
+                {
53
+                    for (
54
+                        typename std::vector<T*>::iterator i = data.begin()
55
+                      ; i != data.end()
56
+                      ; ++i)
57
+                    {
58
+                        delete *i;
59
+                    }
60
+                }
61
+
62
+                std::vector<T*> data;
63
+            };
64
+
65
+            static void attach(Stream& stream, T const& data)
66
+            {
67
+                static arena ar; // our arena
68
+                ar.data.push_back(new T(data));
69
+                stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
70
+            }
71
+
72
+            static T const* get(Stream& stream)
73
+            {
74
+                return (T const*)stream.pword(get_xalloc_index<Tag>());
75
+            }
76
+        };
77
+
78
+        template <typename Tag, typename Stream>
79
+        class string_ios_manip
80
+        {
81
+        public:
82
+
83
+            typedef FUSION_STRING_OF_STREAM(Stream) string_type;
84
+
85
+            typedef stream_data<Stream, Tag, string_type> stream_data_t;
86
+
87
+            string_ios_manip(Stream& str_)
88
+                : stream(str_)
89
+            {}
90
+
91
+            void
92
+            set(string_type const& s)
93
+            {
94
+                stream_data_t::attach(stream, s);
95
+            }
96
+
97
+            void
98
+            print(char const* default_) const
99
+            {
100
+                // print a delimiter
101
+                string_type const* p = stream_data_t::get(stream);
102
+                if (p)
103
+                    stream << *p;
104
+                else
105
+                    stream << default_;
106
+            }
107
+
108
+            void
109
+            read(char const* default_) const
110
+            {
111
+                // read a delimiter
112
+                string_type const* p = stream_data_t::get(stream);
113
+                std::ws(stream);
114
+
115
+                if (p)
116
+                {
117
+                    typedef typename string_type::const_iterator iterator;
118
+                    for (iterator i = p->begin(); i != p->end(); ++i)
119
+                        check_delim(*i);
120
+                }
121
+                else
122
+                {
123
+                    while (*default_)
124
+                        check_delim(*default_++);
125
+                }
126
+            }
127
+
128
+        private:
129
+
130
+            template <typename Char>
131
+            void
132
+            check_delim(Char c) const
133
+            {
134
+                using namespace std;
135
+                if (!isspace(c))
136
+                {
137
+                    if (stream.get() != c)
138
+                    {
139
+                        stream.unget();
140
+                        stream.setstate(std::ios::failbit);
141
+                    }
142
+                }
143
+            }
144
+
145
+            Stream& stream;
146
+
147
+            // silence MSVC warning C4512: assignment operator could not be generated
148
+            BOOST_DELETED_FUNCTION(string_ios_manip& operator= (string_ios_manip const&))
149
+        };
150
+
151
+    } // detail
152
+
153
+
154
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
155
+
156
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
157
+    template <typename Char, typename Traits>                                   \
158
+    inline detail::name##_type<Char, Traits>                                    \
159
+    name(const std::basic_string<Char, Traits>& s)                              \
160
+    {                                                                           \
161
+        return detail::name##_type<Char, Traits>(s);                            \
162
+    }                                                                           \
163
+                                                                                \
164
+    inline detail::name##_type<char>                                            \
165
+    name(char const* s)                                                         \
166
+    {                                                                           \
167
+        return detail::name##_type<char>(std::basic_string<char>(s));           \
168
+    }                                                                           \
169
+                                                                                \
170
+    inline detail::name##_type<wchar_t>                                         \
171
+    name(wchar_t const* s)                                                      \
172
+    {                                                                           \
173
+        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s));     \
174
+    }                                                                           \
175
+                                                                                \
176
+    inline detail::name##_type<char>                                            \
177
+    name(char c)                                                                \
178
+    {                                                                           \
179
+        return detail::name##_type<char>(std::basic_string<char>(1, c));        \
180
+    }                                                                           \
181
+                                                                                \
182
+    inline detail::name##_type<wchar_t>                                         \
183
+    name(wchar_t c)                                                             \
184
+    {                                                                           \
185
+        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c));  \
186
+    }
187
+
188
+#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
189
+
190
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
191
+    template <typename Char, typename Traits>                                   \
192
+    inline detail::name##_type<Char, Traits>                                    \
193
+    name(const std::basic_string<Char, Traits>& s)                              \
194
+    {                                                                           \
195
+        return detail::name##_type<Char, Traits>(s);                            \
196
+    }                                                                           \
197
+                                                                                \
198
+    template <typename Char>                                                    \
199
+    inline detail::name##_type<Char>                                            \
200
+    name(Char s[])                                                              \
201
+    {                                                                           \
202
+        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
203
+    }                                                                           \
204
+                                                                                \
205
+    template <typename Char>                                                    \
206
+    inline detail::name##_type<Char>                                            \
207
+    name(Char const s[])                                                        \
208
+    {                                                                           \
209
+        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
210
+    }                                                                           \
211
+                                                                                \
212
+    template <typename Char>                                                    \
213
+    inline detail::name##_type<Char>                                            \
214
+    name(Char c)                                                                \
215
+    {                                                                           \
216
+        return detail::name##_type<Char>(std::basic_string<Char>(1, c));        \
217
+    }
218
+
219
+#endif
220
+
221
+#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
222
+    namespace detail                                                            \
223
+    {                                                                           \
224
+        struct name##_tag;                                                      \
225
+                                                                                \
226
+        template <typename Char, typename Traits = std::char_traits<Char> >     \
227
+        struct name##_type                                                      \
228
+        {                                                                       \
229
+            typedef std::basic_string<Char, Traits> string_type;                \
230
+            string_type data;                                                   \
231
+            name##_type(const string_type& d): data(d) {}                       \
232
+        };                                                                      \
233
+                                                                                \
234
+        template <typename Stream, typename Char, typename Traits>              \
235
+        Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m)        \
236
+        {                                                                       \
237
+            string_ios_manip<name##_tag, Stream> manip(s);                      \
238
+            manip.set(m.data);                                                  \
239
+            return s;                                                           \
240
+        }                                                                       \
241
+                                                                                \
242
+        template <typename Stream, typename Char, typename Traits>              \
243
+        Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m)        \
244
+        {                                                                       \
245
+            string_ios_manip<name##_tag, Stream> manip(s);                      \
246
+            manip.set(m.data);                                                  \
247
+            return s;                                                           \
248
+        }                                                                       \
249
+    }                                                                           \
250
+
251
+
252
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
253
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
254
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
255
+
256
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
257
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
258
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
259
+
260
+#undef STD_TUPLE_DEFINE_MANIPULATOR
261
+#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
262
+#undef FUSION_STRING_OF_STREAM
263
+#undef FUSION_GET_CHAR_TYPE
264
+#undef FUSION_GET_TRAITS_TYPE
265
+
266
+}}
267
+
268
+#endif
Browse code

drop old boost

From: Steffen Neumann <sneumann@ipb-halle.de>

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR@125184 bc3139a8-67e5-0310-9ffc-ced21a209358

l.gatto authored on 15/12/2016 10:41:45
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,320 +0,0 @@
1
-/*=============================================================================
2
-    Copyright (c) 1999-2003 Jeremiah Willcock
3
-    Copyright (c) 1999-2003 Jaakko Jarvi
4
-    Copyright (c) 2001-2011 Joel de Guzman
5
-
6
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
7
-    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
-==============================================================================*/
9
-#if !defined(FUSION_MANIP_05052005_1200)
10
-#define FUSION_MANIP_05052005_1200
11
-
12
-#include <boost/config.hpp>
13
-#include <string>
14
-#include <vector>
15
-#include <cctype>
16
-
17
-// Tuple I/O manipulators
18
-
19
-#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
20
-#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
21
-
22
-#if defined (BOOST_NO_TEMPLATED_STREAMS)
23
-#define FUSION_STRING_OF_STREAM(Stream) std::string
24
-#else
25
-#define FUSION_STRING_OF_STREAM(Stream)                                         \
26
-    std::basic_string<                                                          \
27
-        FUSION_GET_CHAR_TYPE(Stream)                                            \
28
-      , FUSION_GET_TRAITS_TYPE(Stream)                                          \
29
-    >
30
-#endif
31
-
32
-//$$$ these should be part of the public API$$$
33
-//$$$ rename tuple_open, tuple_close and tuple_delimiter to 
34
-//    open, close and delimeter and add these synonyms to the
35
-//    TR1 tuple module.
36
-
37
-namespace boost { namespace fusion
38
-{
39
-    namespace detail
40
-    {
41
-        template <typename Tag>
42
-        int get_xalloc_index(Tag* = 0)
43
-        {
44
-            // each Tag will have a unique index
45
-            static int index = std::ios::xalloc();
46
-            return index;
47
-        }
48
-
49
-        template <typename Stream, typename Tag, typename T>
50
-        struct stream_data
51
-        {
52
-            struct arena
53
-            {
54
-                ~arena()
55
-                {
56
-                    for (
57
-                        typename std::vector<T*>::iterator i = data.begin()
58
-                      ; i != data.end()
59
-                      ; ++i)
60
-                    {
61
-                        delete *i;
62
-                    }
63
-                }
64
-
65
-                std::vector<T*> data;
66
-            };
67
-
68
-            static void attach(Stream& stream, T const& data)
69
-            {
70
-                static arena ar; // our arena
71
-                ar.data.push_back(new T(data));
72
-                stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
73
-            }
74
-
75
-            static T const* get(Stream& stream)
76
-            {
77
-                return (T const*)stream.pword(get_xalloc_index<Tag>());
78
-            }
79
-        };
80
-
81
-        template <typename Tag, typename Stream>
82
-        class string_ios_manip
83
-        {
84
-        public:
85
-
86
-            typedef FUSION_STRING_OF_STREAM(Stream) string_type;
87
-
88
-            typedef stream_data<Stream, Tag, string_type> stream_data_t;
89
-
90
-            string_ios_manip(Stream& str_)
91
-                : stream(str_)
92
-            {}
93
-
94
-            void
95
-            set(string_type const& s)
96
-            {
97
-                stream_data_t::attach(stream, s);
98
-            }
99
-
100
-            void
101
-            print(char const* default_) const
102
-            {
103
-                // print a delimiter
104
-                string_type const* p = stream_data_t::get(stream);
105
-                if (p)
106
-                    stream << *p;
107
-                else
108
-                    stream << default_;
109
-            }
110
-
111
-            void
112
-            read(char const* default_) const
113
-            {
114
-                // read a delimiter
115
-                string_type const* p = stream_data_t::get(stream);
116
-                using namespace std;
117
-                ws(stream);
118
-
119
-                if (p)
120
-                {
121
-                    typedef typename string_type::const_iterator iterator;
122
-                    for (iterator i = p->begin(); i != p->end(); ++i)
123
-                        check_delim(*i);
124
-                }
125
-                else
126
-                {
127
-                    while (*default_)
128
-                        check_delim(*default_++);
129
-                }
130
-            }
131
-
132
-        private:
133
-
134
-            template <typename Char>
135
-            void
136
-            check_delim(Char c) const
137
-            {
138
-                if (!isspace(c))
139
-                {
140
-                    if (stream.get() != c)
141
-                    {
142
-                        stream.unget();
143
-                        stream.setstate(std::ios::failbit);
144
-                    }
145
-                }
146
-            }
147
-
148
-            Stream& stream;
149
-
150
-        private:
151
-            // silence MSVC warning C4512: assignment operator could not be generated
152
-            string_ios_manip& operator= (string_ios_manip const&);
153
-        };
154
-
155
-    } // detail
156
-
157
-#if defined (BOOST_NO_TEMPLATED_STREAMS)
158
-
159
-#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
160
-    namespace detail                                                            \
161
-    {                                                                           \
162
-        struct name##_tag;                                                      \
163
-                                                                                \
164
-        struct name##_type                                                      \
165
-        {                                                                       \
166
-            typedef std::string string_type;                                    \
167
-            string_type data;                                                   \
168
-            name##_type(const string_type& d): data(d) {}                       \
169
-        };                                                                      \
170
-                                                                                \
171
-        template <typename Stream>                                              \
172
-        Stream& operator>>(Stream& s, const name##_type& m)                     \
173
-        {                                                                       \
174
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
175
-            return s;                                                           \
176
-        }                                                                       \
177
-                                                                                \
178
-        template <typename Stream>                                              \
179
-        Stream& operator<<(Stream& s, const name##_type& m)                     \
180
-        {                                                                       \
181
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
182
-            return s;                                                           \
183
-        }                                                                       \
184
-    }
185
-
186
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
187
-    inline detail::name##_type                                                  \
188
-    name(const std::string& s)                                                  \
189
-    {                                                                           \
190
-        return detail::name##_type(s);                                          \
191
-    }                                                                           \
192
-                                                                                \
193
-    inline detail::name##_type                                                  \
194
-    name(const char* s)                                                         \
195
-    {                                                                           \
196
-        return detail::name##_type(std::string(s));                             \
197
-    }                                                                           \
198
-                                                                                \
199
-    inline detail::name##_type                                                  \
200
-    name(char c)                                                                \
201
-    {                                                                           \
202
-        return detail::name##_type(std::string(1, c));                          \
203
-    }
204
-
205
-#else // defined(BOOST_NO_TEMPLATED_STREAMS)
206
-
207
-#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
208
-
209
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
210
-    template <typename Char, typename Traits>                                   \
211
-    inline detail::name##_type<Char, Traits>                                    \
212
-    name(const std::basic_string<Char, Traits>& s)                              \
213
-    {                                                                           \
214
-        return detail::name##_type<Char, Traits>(s);                            \
215
-    }                                                                           \
216
-                                                                                \
217
-    inline detail::name##_type<char>                                            \
218
-    name(char const* s)                                                         \
219
-    {                                                                           \
220
-        return detail::name##_type<char>(std::basic_string<char>(s));           \
221
-    }                                                                           \
222
-                                                                                \
223
-    inline detail::name##_type<wchar_t>                                         \
224
-    name(wchar_t const* s)                                                      \
225
-    {                                                                           \
226
-        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s));     \
227
-    }                                                                           \
228
-                                                                                \
229
-    inline detail::name##_type<char>                                            \
230
-    name(char c)                                                                \
231
-    {                                                                           \
232
-        return detail::name##_type<char>(std::basic_string<char>(1, c));        \
233
-    }                                                                           \
234
-                                                                                \
235
-    inline detail::name##_type<wchar_t>                                         \
236
-    name(wchar_t c)                                                             \
237
-    {                                                                           \
238
-        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c));  \
239
-    }
240
-
241
-#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
242
-
243
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
244
-    template <typename Char, typename Traits>                                   \
245
-    inline detail::name##_type<Char, Traits>                                    \
246
-    name(const std::basic_string<Char, Traits>& s)                              \
247
-    {                                                                           \
248
-        return detail::name##_type<Char, Traits>(s);                            \
249
-    }                                                                           \
250
-                                                                                \
251
-    template <typename Char>                                                    \
252
-    inline detail::name##_type<Char>                                            \
253
-    name(Char s[])                                                              \
254
-    {                                                                           \
255
-        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
256
-    }                                                                           \
257
-                                                                                \
258
-    template <typename Char>                                                    \
259
-    inline detail::name##_type<Char>                                            \
260
-    name(Char const s[])                                                        \
261
-    {                                                                           \
262
-        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
263
-    }                                                                           \
264
-                                                                                \
265
-    template <typename Char>                                                    \
266
-    inline detail::name##_type<Char>                                            \
267
-    name(Char c)                                                                \
268
-    {                                                                           \
269
-        return detail::name##_type<Char>(std::basic_string<Char>(1, c));        \
270
-    }
271
-
272
-#endif
273
-
274
-#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
275
-    namespace detail                                                            \
276
-    {                                                                           \
277
-        struct name##_tag;                                                      \
278
-                                                                                \
279
-        template <typename Char, typename Traits = std::char_traits<Char> >     \
280
-        struct name##_type                                                      \
281
-        {                                                                       \
282
-            typedef std::basic_string<Char, Traits> string_type;                \
283
-            string_type data;                                                   \
284
-            name##_type(const string_type& d): data(d) {}                       \
285
-        };                                                                      \
286
-                                                                                \
287
-        template <typename Stream, typename Char, typename Traits>              \
288
-        Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m)        \
289
-        {                                                                       \
290
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
291
-            return s;                                                           \
292
-        }                                                                       \
293
-                                                                                \
294
-        template <typename Stream, typename Char, typename Traits>              \
295
-        Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m)        \
296
-        {                                                                       \
297
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
298
-            return s;                                                           \
299
-        }                                                                       \
300
-    }                                                                           \
301
-
302
-#endif // defined(BOOST_NO_TEMPLATED_STREAMS)
303
-
304
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
305
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
306
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
307
-
308
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
309
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
310
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
311
-
312
-#undef STD_TUPLE_DEFINE_MANIPULATOR
313
-#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
314
-#undef FUSION_STRING_OF_STREAM
315
-#undef FUSION_GET_CHAR_TYPE
316
-#undef FUSION_GET_TRAITS_TYPE
317
-
318
-}}
319
-
320
-#endif
Browse code

checkout latest pwiz, ammend Makevars

From: Laurent <lg390@cam.ac.uk>

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR@125180 bc3139a8-67e5-0310-9ffc-ced21a209358

l.gatto authored on 15/12/2016 10:21:41
Showing1 changed files
... ...
@@ -1,269 +1,320 @@
1
-/*=============================================================================
2
-    Copyright (c) 1999-2003 Jeremiah Willcock
3
-    Copyright (c) 1999-2003 Jaakko Jarvi
4
-    Copyright (c) 2001-2011 Joel de Guzman
5
-
6
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
7
-    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
-==============================================================================*/
9
-#if !defined(FUSION_MANIP_05052005_1200)
10
-#define FUSION_MANIP_05052005_1200
11
-
12
-#include <boost/fusion/support/config.hpp>
13
-#include <boost/config.hpp>
14
-#include <string>
15
-#include <vector>
16
-#include <cctype>
17
-
18
-// Tuple I/O manipulators
19
-
20
-#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
21
-#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
22
-
23
-#define FUSION_STRING_OF_STREAM(Stream)                                         \
24
-    std::basic_string<                                                          \
25
-        FUSION_GET_CHAR_TYPE(Stream)                                            \
26
-      , FUSION_GET_TRAITS_TYPE(Stream)                                          \
27
-    >
28
-
29
-//$$$ these should be part of the public API$$$
30
-//$$$ rename tuple_open, tuple_close and tuple_delimiter to 
31
-//    open, close and delimeter and add these synonyms to the
32
-//    TR1 tuple module.
33
-
34
-namespace boost { namespace fusion
35
-{
36
-    namespace detail
37
-    {
38
-        template <typename Tag>
39
-        int get_xalloc_index(Tag* = 0)
40
-        {
41
-            // each Tag will have a unique index
42
-            static int index = std::ios::xalloc();
43
-            return index;
44
-        }
45
-
46
-        template <typename Stream, typename Tag, typename T>
47
-        struct stream_data
48
-        {
49
-            struct arena
50
-            {
51
-                ~arena()
52
-                {
53
-                    for (
54
-                        typename std::vector<T*>::iterator i = data.begin()
55
-                      ; i != data.end()
56
-                      ; ++i)
57
-                    {
58
-                        delete *i;
59
-                    }
60
-                }
61
-
62
-                std::vector<T*> data;
63
-            };
64
-
65
-            static void attach(Stream& stream, T const& data)
66
-            {
67
-                static arena ar; // our arena
68
-                ar.data.push_back(new T(data));
69
-                stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
70
-            }
71
-
72
-            static T const* get(Stream& stream)
73
-            {
74
-                return (T const*)stream.pword(get_xalloc_index<Tag>());
75
-            }
76
-        };
77
-
78
-        template <typename Tag, typename Stream>
79
-        class string_ios_manip
80
-        {
81
-        public:
82
-
83
-            typedef FUSION_STRING_OF_STREAM(Stream) string_type;
84
-
85
-            typedef stream_data<Stream, Tag, string_type> stream_data_t;
86
-
87
-            string_ios_manip(Stream& str_)
88
-                : stream(str_)
89
-            {}
90
-
91
-            void
92
-            set(string_type const& s)
93
-            {
94
-                stream_data_t::attach(stream, s);
95
-            }
96
-
97
-            void
98
-            print(char const* default_) const
99
-            {
100
-                // print a delimiter
101
-                string_type const* p = stream_data_t::get(stream);
102
-                if (p)
103
-                    stream << *p;
104
-                else
105
-                    stream << default_;
106
-            }
107
-
108
-            void
109
-            read(char const* default_) const
110
-            {
111
-                // read a delimiter
112
-                string_type const* p = stream_data_t::get(stream);
113
-                using namespace std;
114
-                ws(stream);
115
-
116
-                if (p)
117
-                {
118
-                    typedef typename string_type::const_iterator iterator;
119
-                    for (iterator i = p->begin(); i != p->end(); ++i)
120
-                        check_delim(*i);
121
-                }
122
-                else
123
-                {
124
-                    while (*default_)
125
-                        check_delim(*default_++);
126
-                }
127
-            }
128
-
129
-        private:
130
-
131
-            template <typename Char>
132
-            void
133
-            check_delim(Char c) const
134
-            {
135
-                if (!isspace(c))
136
-                {
137
-                    if (stream.get() != c)
138
-                    {
139
-                        stream.unget();
140
-                        stream.setstate(std::ios::failbit);
141
-                    }
142
-                }
143
-            }
144
-
145
-            Stream& stream;
146
-
147
-        private:
148
-            // silence MSVC warning C4512: assignment operator could not be generated
149
-            string_ios_manip& operator= (string_ios_manip const&);
150
-        };
151
-
152
-    } // detail
153
-
154
-
155
-#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
156
-
157
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
158
-    template <typename Char, typename Traits>                                   \
159
-    inline detail::name##_type<Char, Traits>                                    \
160
-    name(const std::basic_string<Char, Traits>& s)                              \
161
-    {                                                                           \
162
-        return detail::name##_type<Char, Traits>(s);                            \
163
-    }                                                                           \
164
-                                                                                \
165
-    inline detail::name##_type<char>                                            \
166
-    name(char const* s)                                                         \
167
-    {                                                                           \
168
-        return detail::name##_type<char>(std::basic_string<char>(s));           \
169
-    }                                                                           \
170
-                                                                                \
171
-    inline detail::name##_type<wchar_t>                                         \
172
-    name(wchar_t const* s)                                                      \
173
-    {                                                                           \
174
-        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s));     \
175
-    }                                                                           \
176
-                                                                                \
177
-    inline detail::name##_type<char>                                            \
178
-    name(char c)                                                                \
179
-    {                                                                           \
180
-        return detail::name##_type<char>(std::basic_string<char>(1, c));        \
181
-    }                                                                           \
182
-                                                                                \
183
-    inline detail::name##_type<wchar_t>                                         \
184
-    name(wchar_t c)                                                             \
185
-    {                                                                           \
186
-        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c));  \
187
-    }
188
-
189
-#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
190
-
191
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
192
-    template <typename Char, typename Traits>                                   \
193
-    inline detail::name##_type<Char, Traits>                                    \
194
-    name(const std::basic_string<Char, Traits>& s)                              \
195
-    {                                                                           \
196
-        return detail::name##_type<Char, Traits>(s);                            \
197
-    }                                                                           \
198
-                                                                                \
199
-    template <typename Char>                                                    \
200
-    inline detail::name##_type<Char>                                            \
201
-    name(Char s[])                                                              \
202
-    {                                                                           \
203
-        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
204
-    }                                                                           \
205
-                                                                                \
206
-    template <typename Char>                                                    \
207
-    inline detail::name##_type<Char>                                            \
208
-    name(Char const s[])                                                        \
209
-    {                                                                           \
210
-        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
211
-    }                                                                           \
212
-                                                                                \
213
-    template <typename Char>                                                    \
214
-    inline detail::name##_type<Char>                                            \
215
-    name(Char c)                                                                \
216
-    {                                                                           \
217
-        return detail::name##_type<Char>(std::basic_string<Char>(1, c));        \
218
-    }
219
-
220
-#endif
221
-
222
-#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
223
-    namespace detail                                                            \
224
-    {                                                                           \
225
-        struct name##_tag;                                                      \
226
-                                                                                \
227
-        template <typename Char, typename Traits = std::char_traits<Char> >     \
228
-        struct name##_type                                                      \
229
-        {                                                                       \
230
-            typedef std::basic_string<Char, Traits> string_type;                \
231
-            string_type data;                                                   \
232
-            name##_type(const string_type& d): data(d) {}                       \
233
-        };                                                                      \
234
-                                                                                \
235
-        template <typename Stream, typename Char, typename Traits>              \
236
-        Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m)        \
237
-        {                                                                       \
238
-            string_ios_manip<name##_tag, Stream> manip(s);                      \
239
-            manip.set(m.data);                                                  \
240
-            return s;                                                           \
241
-        }                                                                       \
242
-                                                                                \
243
-        template <typename Stream, typename Char, typename Traits>              \
244
-        Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m)        \
245
-        {                                                                       \
246
-            string_ios_manip<name##_tag, Stream> manip(s);                      \
247
-            manip.set(m.data);                                                  \
248
-            return s;                                                           \
249
-        }                                                                       \
250
-    }                                                                           \
251
-
252
-
253
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
254
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
255
-    STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
256
-
257
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
258
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
259
-    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
260
-
261
-#undef STD_TUPLE_DEFINE_MANIPULATOR
262
-#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
263
-#undef FUSION_STRING_OF_STREAM
264
-#undef FUSION_GET_CHAR_TYPE
265
-#undef FUSION_GET_TRAITS_TYPE
266
-
267
-}}
268
-
269
-#endif
1
+/*=============================================================================
2
+    Copyright (c) 1999-2003 Jeremiah Willcock
3
+    Copyright (c) 1999-2003 Jaakko Jarvi
4
+    Copyright (c) 2001-2011 Joel de Guzman
5
+
6
+    Distributed under the Boost Software License, Version 1.0. (See accompanying 
7
+    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
+==============================================================================*/
9
+#if !defined(FUSION_MANIP_05052005_1200)
10
+#define FUSION_MANIP_05052005_1200
11
+
12
+#include <boost/config.hpp>
13
+#include <string>
14
+#include <vector>
15
+#include <cctype>
16
+
17
+// Tuple I/O manipulators
18
+
19
+#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
20
+#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
21
+
22
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
23
+#define FUSION_STRING_OF_STREAM(Stream) std::string
24
+#else
25
+#define FUSION_STRING_OF_STREAM(Stream)                                         \
26
+    std::basic_string<                                                          \
27
+        FUSION_GET_CHAR_TYPE(Stream)                                            \
28
+      , FUSION_GET_TRAITS_TYPE(Stream)                                          \
29
+    >
30
+#endif
31
+
32
+//$$$ these should be part of the public API$$$
33
+//$$$ rename tuple_open, tuple_close and tuple_delimiter to 
34
+//    open, close and delimeter and add these synonyms to the
35
+//    TR1 tuple module.
36
+
37
+namespace boost { namespace fusion
38
+{
39
+    namespace detail
40
+    {
41
+        template <typename Tag>
42
+        int get_xalloc_index(Tag* = 0)
43
+        {
44
+            // each Tag will have a unique index
45
+            static int index = std::ios::xalloc();
46
+            return index;
47
+        }
48
+
49
+        template <typename Stream, typename Tag, typename T>
50
+        struct stream_data
51
+        {
52
+            struct arena
53
+            {
54
+                ~arena()
55
+                {
56
+                    for (
57
+                        typename std::vector<T*>::iterator i = data.begin()
58
+                      ; i != data.end()
59
+                      ; ++i)
60
+                    {
61
+                        delete *i;
62
+                    }
63
+                }
64
+
65
+                std::vector<T*> data;
66
+            };
67
+
68
+            static void attach(Stream& stream, T const& data)
69
+            {
70
+                static arena ar; // our arena
71
+                ar.data.push_back(new T(data));
72
+                stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
73
+            }
74
+
75
+            static T const* get(Stream& stream)
76
+            {
77
+                return (T const*)stream.pword(get_xalloc_index<Tag>());
78
+            }
79
+        };
80
+
81
+        template <typename Tag, typename Stream>
82
+        class string_ios_manip
83
+        {
84
+        public:
85
+
86
+            typedef FUSION_STRING_OF_STREAM(Stream) string_type;
87
+
88
+            typedef stream_data<Stream, Tag, string_type> stream_data_t;
89
+
90
+            string_ios_manip(Stream& str_)
91
+                : stream(str_)
92
+            {}
93
+
94
+            void
95
+            set(string_type const& s)
96
+            {
97
+                stream_data_t::attach(stream, s);
98
+            }
99
+
100
+            void
101
+            print(char const* default_) const
102
+            {
103
+                // print a delimiter
104
+                string_type const* p = stream_data_t::get(stream);
105
+                if (p)
106
+                    stream << *p;
107
+                else
108
+                    stream << default_;
109
+            }
110
+
111
+            void
112
+            read(char const* default_) const
113
+            {
114
+                // read a delimiter
115
+                string_type const* p = stream_data_t::get(stream);
116
+                using namespace std;
117
+                ws(stream);
118
+
119
+                if (p)
120
+                {
121
+                    typedef typename string_type::const_iterator iterator;
122
+                    for (iterator i = p->begin(); i != p->end(); ++i)
123
+                        check_delim(*i);
124
+                }
125
+                else
126
+                {
127
+                    while (*default_)
128
+                        check_delim(*default_++);
129
+                }
130
+            }
131
+
132
+        private:
133
+
134
+            template <typename Char>
135
+            void
136
+            check_delim(Char c) const
137
+            {
138
+                if (!isspace(c))
139
+                {
140
+                    if (stream.get() != c)
141
+                    {
142
+                        stream.unget();
143
+                        stream.setstate(std::ios::failbit);
144
+                    }
145
+                }
146
+            }
147
+
148
+            Stream& stream;
149
+
150
+        private:
151
+            // silence MSVC warning C4512: assignment operator could not be generated
152
+            string_ios_manip& operator= (string_ios_manip const&);
153
+        };
154
+
155
+    } // detail
156
+
157
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
158
+
159
+#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
160
+    namespace detail                                                            \
161
+    {                                                                           \
162
+        struct name##_tag;                                                      \
163
+                                                                                \
164
+        struct name##_type                                                      \
165
+        {                                                                       \
166
+            typedef std::string string_type;                                    \
167
+            string_type data;                                                   \
168
+            name##_type(const string_type& d): data(d) {}                       \
169
+        };                                                                      \
170
+                                                                                \
171
+        template <typename Stream>                                              \
172
+        Stream& operator>>(Stream& s, const name##_type& m)                     \
173
+        {                                                                       \
174
+            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
175
+            return s;                                                           \
176
+        }                                                                       \
177
+                                                                                \
178
+        template <typename Stream>                                              \
179
+        Stream& operator<<(Stream& s, const name##_type& m)                     \
180
+        {                                                                       \
181
+            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
182
+            return s;                                                           \
183
+        }                                                                       \
184
+    }
185
+
186
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
187
+    inline detail::name##_type                                                  \
188
+    name(const std::string& s)                                                  \
189
+    {                                                                           \
190
+        return detail::name##_type(s);                                          \
191
+    }                                                                           \
192
+                                                                                \
193
+    inline detail::name##_type                                                  \
194
+    name(const char* s)                                                         \
195
+    {                                                                           \
196
+        return detail::name##_type(std::string(s));                             \
197
+    }                                                                           \
198
+                                                                                \
199
+    inline detail::name##_type                                                  \
200
+    name(char c)                                                                \
201
+    {                                                                           \
202
+        return detail::name##_type(std::string(1, c));                          \
203
+    }
204
+
205
+#else // defined(BOOST_NO_TEMPLATED_STREAMS)
206
+
207
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
208
+
209
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
210
+    template <typename Char, typename Traits>                                   \
211
+    inline detail::name##_type<Char, Traits>                                    \
212
+    name(const std::basic_string<Char, Traits>& s)                              \
213
+    {                                                                           \
214
+        return detail::name##_type<Char, Traits>(s);                            \
215
+    }                                                                           \
216
+                                                                                \
217
+    inline detail::name##_type<char>                                            \
218
+    name(char const* s)                                                         \
219
+    {                                                                           \
220
+        return detail::name##_type<char>(std::basic_string<char>(s));           \
221
+    }                                                                           \
222
+                                                                                \
223
+    inline detail::name##_type<wchar_t>                                         \
224
+    name(wchar_t const* s)                                                      \
225
+    {                                                                           \
226
+        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s));     \
227
+    }                                                                           \
228
+                                                                                \
229
+    inline detail::name##_type<char>                                            \
230
+    name(char c)                                                                \
231
+    {                                                                           \
232
+        return detail::name##_type<char>(std::basic_string<char>(1, c));        \
233
+    }                                                                           \
234
+                                                                                \
235
+    inline detail::name##_type<wchar_t>                                         \
236
+    name(wchar_t c)                                                             \
237
+    {                                                                           \
238
+        return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c));  \
239
+    }
240
+
241
+#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
242
+
243
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
244
+    template <typename Char, typename Traits>                                   \
245
+    inline detail::name##_type<Char, Traits>                                    \
246
+    name(const std::basic_string<Char, Traits>& s)                              \
247
+    {                                                                           \
248
+        return detail::name##_type<Char, Traits>(s);                            \
249
+    }                                                                           \
250
+                                                                                \
251
+    template <typename Char>                                                    \
252
+    inline detail::name##_type<Char>                                            \
253
+    name(Char s[])                                                              \
254
+    {                                                                           \
255
+        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
256
+    }                                                                           \
257
+                                                                                \
258
+    template <typename Char>                                                    \
259
+    inline detail::name##_type<Char>                                            \
260
+    name(Char const s[])                                                        \
261
+    {                                                                           \
262
+        return detail::name##_type<Char>(std::basic_string<Char>(s));           \
263
+    }                                                                           \
264
+                                                                                \
265
+    template <typename Char>                                                    \
266
+    inline detail::name##_type<Char>                                            \
267
+    name(Char c)                                                                \
268
+    {                                                                           \
269
+        return detail::name##_type<Char>(std::basic_string<Char>(1, c));        \
270
+    }
271
+
272
+#endif
273
+
274
+#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
275
+    namespace detail                                                            \
276
+    {                                                                           \
277
+        struct name##_tag;                                                      \
278
+                                                                                \
279
+        template <typename Char, typename Traits = std::char_traits<Char> >     \
280
+        struct name##_type                                                      \
281
+        {                                                                       \
282
+            typedef std::basic_string<Char, Traits> string_type;                \
283
+            string_type data;                                                   \
284
+            name##_type(const string_type& d): data(d) {}                       \
285
+        };                                                                      \
286
+                                                                                \
287
+        template <typename Stream, typename Char, typename Traits>              \
288
+        Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m)        \
289
+        {                                                                       \
290
+            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
291
+            return s;                                                           \
292
+        }                                                                       \
293
+                                                                                \
294
+        template <typename Stream, typename Char, typename Traits>              \
295
+        Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m)        \
296
+        {                                                                       \
297
+            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
298
+            return s;                                                           \
299
+        }                                                                       \
300
+    }                                                                           \
301
+
302
+#endif // defined(BOOST_NO_TEMPLATED_STREAMS)
303
+
304
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
305
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
306
+    STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
307
+
308
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
309
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
310
+    STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
311
+
312
+#undef STD_TUPLE_DEFINE_MANIPULATOR
313
+#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
314
+#undef FUSION_STRING_OF_STREAM
315
+#undef FUSION_GET_CHAR_TYPE
316
+#undef FUSION_GET_TRAITS_TYPE
317
+
318
+}}
319
+
320
+#endif
Browse code

Commit made by the Bioconductor Git-SVN bridge.

Commit id: 0b3d4d9bb71e3ca5891b777610fc8dec103a6d61

Bumped version after KK's updates


Commit id: 9e04409b64757a177893d56c0300904f31945cb1

modified: src/pwiz/data/common/BinaryIndexStream.cpp modified: src/win/i386/libpwiz.a modified: src/win/x64/libpwiz.a


Commit id: f16b04258dc20bf3315beac99708e11728cfc12b

update precompiled lib for windows


Commit id: 5d56197f1148378d92e89b2d0a167e18c4b7ab2e

Bump version, tame .Rbuildignore


Commit id: 432da5bd294c9b87f7761e15bc814c3785c21abf

Merge remote-tracking branch 'origin/boost_159'


Commit id: 92be978bf72d90c2222a19ddf365f6d1acc9f20d

upadte Makevars


Commit id: ae75037a780cead56c4d20bedf822c94fb413677

upgrade to boost 1.5.9



git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR@110126 bc3139a8-67e5-0310-9ffc-ced21a209358

s.neumann authored on 01/11/2015 22:33:47
Showing1 changed files
... ...
@@ -1,320 +1,269 @@
1
-/*=============================================================================
2
-    Copyright (c) 1999-2003 Jeremiah Willcock
3
-    Copyright (c) 1999-2003 Jaakko Jarvi
4
-    Copyright (c) 2001-2011 Joel de Guzman
5
-
6
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
7
-    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
-==============================================================================*/
9
-#if !defined(FUSION_MANIP_05052005_1200)
10
-#define FUSION_MANIP_05052005_1200
11
-
12
-#include <boost/config.hpp>
13
-#include <string>
14
-#include <vector>
15
-#include <cctype>
16
-
17
-// Tuple I/O manipulators
18
-
19
-#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
20
-#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
21
-
22
-#if defined (BOOST_NO_TEMPLATED_STREAMS)
23
-#define FUSION_STRING_OF_STREAM(Stream) std::string
24
-#else
25
-#define FUSION_STRING_OF_STREAM(Stream)                                         \
26
-    std::basic_string<                                                          \
27
-        FUSION_GET_CHAR_TYPE(Stream)                                            \
28
-      , FUSION_GET_TRAITS_TYPE(Stream)                                          \
29
-    >
30
-#endif
31
-
32
-//$$$ these should be part of the public API$$$
33
-//$$$ rename tuple_open, tuple_close and tuple_delimiter to 
34
-//    open, close and delimeter and add these synonyms to the
35
-//    TR1 tuple module.
36
-
37
-namespace boost { namespace fusion
38
-{
39
-    namespace detail
40
-    {
41
-        template <typename Tag>
42
-        int get_xalloc_index(Tag* = 0)
43
-        {
44
-            // each Tag will have a unique index
45
-            static int index = std::ios::xalloc();
46
-            return index;
47
-        }
48
-
49
-        template <typename Stream, typename Tag, typename T>
50
-        struct stream_data
51
-        {
52
-            struct arena
53
-            {
54
-                ~arena()
55
-                {
56
-                    for (
57
-                        typename std::vector<T*>::iterator i = data.begin()
58
-                      ; i != data.end()
59
-                      ; ++i)
60
-                    {
61
-                        delete *i;
62
-                    }
63
-                }
64
-
65
-                std::vector<T*> data;
66
-            };
67
-
68
-            static void attach(Stream& stream, T const& data)
69
-            {
70
-                static arena ar; // our arena
71
-                ar.data.push_back(new T(data));
72
-                stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
73
-            }
74
-
75
-            static T const* get(Stream& stream)
76
-            {
77
-                return (T const*)stream.pword(get_xalloc_index<Tag>());
78
-            }
79
-        };
80
-
81
-        template <typename Tag, typename Stream>
82
-        class string_ios_manip
83
-        {
84
-        public:
85
-
86
-            typedef FUSION_STRING_OF_STREAM(Stream) string_type;
87
-
88
-            typedef stream_data<Stream, Tag, string_type> stream_data_t;
89
-
90
-            string_ios_manip(Stream& str_)
91
-                : stream(str_)
92
-            {}
93
-
94
-            void
95
-            set(string_type const& s)
96
-            {
97
-                stream_data_t::attach(stream, s);
98
-            }
99
-
100
-            void
101
-            print(char const* default_) const
102
-            {
103
-                // print a delimiter
104
-                string_type const* p = stream_data_t::get(stream);
105
-                if (p)
106
-                    stream << *p;
107
-                else
108
-                    stream << default_;
109
-            }
110
-
111
-            void
112
-            read(char const* default_) const
113
-            {
114
-                // read a delimiter
115
-                string_type const* p = stream_data_t::get(stream);
116
-                using namespace std;
117
-                ws(stream);
118
-
119
-                if (p)
120
-                {
121
-                    typedef typename string_type::const_iterator iterator;
122
-                    for (iterator i = p->begin(); i != p->end(); ++i)
123
-                        check_delim(*i);
124
-                }
125
-                else
126
-                {
127
-                    while (*default_)
128
-                        check_delim(*default_++);
129
-                }
130
-            }
131
-
132
-        private:
133
-
134
-            template <typename Char>
135
-            void
136
-            check_delim(Char c) const
137
-            {
138
-                if (!isspace(c))
139
-                {
140
-                    if (stream.get() != c)
141
-                    {
142
-                        stream.unget();
143
-                        stream.setstate(std::ios::failbit);
144
-                    }
145
-                }
146
-            }
147
-
148
-            Stream& stream;
149
-
150
-        private:
151
-            // silence MSVC warning C4512: assignment operator could not be generated
152
-            string_ios_manip& operator= (string_ios_manip const&);
153
-        };
154
-
155
-    } // detail
156
-
157
-#if defined (BOOST_NO_TEMPLATED_STREAMS)
158
-
159
-#define STD_TUPLE_DEFINE_MANIPULATOR(name)                                      \
160
-    namespace detail                                                            \
161
-    {                                                                           \
162
-        struct name##_tag;                                                      \
163
-                                                                                \
164
-        struct name##_type                                                      \
165
-        {                                                                       \
166
-            typedef std::string string_type;                                    \
167
-            string_type data;                                                   \
168
-            name##_type(const string_type& d): data(d) {}                       \
169
-        };                                                                      \
170
-                                                                                \
171
-        template <typename Stream>                                              \
172
-        Stream& operator>>(Stream& s, const name##_type& m)                     \
173
-        {                                                                       \
174
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
175
-            return s;                                                           \
176
-        }                                                                       \
177
-                                                                                \
178
-        template <typename Stream>                                              \
179
-        Stream& operator<<(Stream& s, const name##_type& m)                     \
180
-        {                                                                       \
181
-            string_ios_manip<name##_tag, Stream>(s).set(m.data);                \
182
-            return s;                                                           \
183
-        }                                                                       \
184
-    }
185
-
186
-#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name)                            \
187
-    inline detail::name##_type                                                  \
188
-    name(const std::string& s)                                                  \
189
-    {                                                                           \
190
-        return detail::name##_type(s);                                          \
191
-    }                                                                           \
192
-                                                                                \