ARTS  2.3.1285(git:92a29ea9-dirty)
sstream.h
Go to the documentation of this file.
1 // <!!-*-C++-*- file: sstream.h --->
2 // <!!-------------------------------------------------------------------------->
3 // <!! Copyright (C) 1996 Dietmar Kuehl >
4 // <!! Universitaet Konstanz, Lehrstuhl fuer praktische Informatik I >
5 // <!!>
6 // <!! Permission to use, copy, modify, distribute and sell this >
7 // <!! software for any purpose is hereby granted without fee, provided >
8 // <!! that the above copyright notice appears in all copies and that >
9 // <!! both that copyright notice and this permission notice appear in >
10 // <!! supporting documentation. Dietmar Kuehl makes no representations >
11 // <!! about the suitability of this software for any purpose. It is >
12 // <!! provided "as is" without express or implied warranty. >
13 // <!!-------------------------------------------------------------------------->
14 
15 // Author: Dietmar Kühl dietmar.kuehl@uni-konstanz.de www.informatik.uni-konstanz.de/~kuehl
16 // Title: An implementation of the string stream classes
17 
18 //------------------------------------------------------------------------------
19 // The first thing to do is to protect the file against multiple inclusion:
20 
21 #include "config_global.h"
22 
23 #ifndef HAVE_SSTREAM
24 #if !defined(SSTREAM_H)
25 #define SSTREAM_H
26 
27 //------------------------------------------------------------------------------
28 // Next, some headerfiles are included:
29 
30 #include <algorithm>
31 #include <string>
32 #include <streambuf.h>
33 #include <iostream.h>
34 #include "iotraits.h"
35 
36 
37 //------------------------------------------------------------------------------
38 
39 #if defined(__GNUC__)
40 // NOTE: This hack will work for character type 'char' only!
41 // However, the actual code was taken from a fully templatized code base.
42 
43  template <class charT, class traits>
44  class basic_streambuf: public streambuf
45  {
46  public:
47  typedef char char_type;
48  typedef int int_type;
49  typedef ios_traits<char> traits_type;
50  typedef streampos pos_type;
51  typedef streamoff off_type;
52  };
53 
54  template <class charT, class traits>
55  class basic_istream: public istream
56  {
57  public:
58  typedef char char_type;
59  typedef int int_type;
60  typedef ios_traits<char> traits_type;
61  typedef streampos pos_type;
62  typedef streamoff off_type;
63  };
64  template <class charT, class traits>
65  class basic_ostream: public ostream
66  {
67  public:
68  typedef char char_type;
69  typedef int int_type;
70  typedef ios_traits<char> traits_type;
71  typedef streampos pos_type;
72  typedef streamoff off_type;
73  };
74  template <class charT, class traits>
75  class basic_iostream: public iostream
76  {
77  public:
78  typedef char char_type;
79  typedef int int_type;
80  typedef ios_traits<char> traits_type;
81  typedef streampos pos_type;
82  typedef streamoff off_type;
83  };
84 
85  struct ios_base: public ios
86  {
87  typedef seek_dir seekdir;
88  };
89 #endif
90 
91 //------------------------------------------------------------------------------
92 
93 template <class _CS_cT, class _CS_traits, class _CS_alloc = string_char_traits<_CS_cT> >
94 class basic_stringbuf: public basic_streambuf<_CS_cT, _CS_traits>
95 {
96 public:
97  typedef basic_string<_CS_cT, _CS_traits, _CS_alloc> string_type;
98  typedef typename basic_streambuf<_CS_cT, _CS_traits>::char_type char_type;
99  typedef typename basic_streambuf<_CS_cT, _CS_traits>::traits_type traits_type;
100  typedef typename basic_streambuf<_CS_cT, _CS_traits>::int_type int_type;
101  typedef typename basic_streambuf<_CS_cT, _CS_traits>::pos_type pos_type;
102  typedef typename basic_streambuf<_CS_cT, _CS_traits>::off_type off_type;
103 
104  basic_stringbuf(ios_base::openmode = ios_base::in | ios_base::out);
105  basic_stringbuf(basic_string<_CS_cT, _CS_traits, _CS_alloc> const&,
106  ios_base::openmode = ios_base::in | ios_base::out);
107  ~basic_stringbuf();
108 
109  basic_string<_CS_cT, _CS_traits, _CS_alloc> str() const;
110  void str(basic_string<_CS_cT, _CS_traits, _CS_alloc> const&);
111 
112 protected:
113  int_type underflow();
114  int_type pbackfail(int_type);
115  int_type overflow(int_type);
116  basic_streambuf<_CS_cT, _CS_traits>* setbuf(char_type*, streamsize);
117  pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode);
118  pos_type seekpos(pos_type pos, ios_base::openmode);
119  int sync();
120 
121 private:
122  basic_stringbuf(basic_stringbuf const&); // deliberatly not accessible
123  void operator=(basic_stringbuf const&); // deliberatly not accessible
124 
125  ios_base::openmode _CS_m_mode;
126  _CS_cT* _CS_m_beg;
127  _CS_cT* _CS_m_end;
128 };
129 
130 // --------------------------------------------------------------------------
131 
132 template <class _CS_cT, class _CS_Tr, class _CS_Al>
134 {
135  public:
136  typedef basic_string<_CS_cT, _CS_Tr, _CS_Al> _CS_string_type;
137 
138  explicit _CS_basic_sstream_base(ios_base::openmode);
139  _CS_basic_sstream_base(_CS_string_type const&, ios_base::openmode);
140 
141  _CS_string_type str() const;
142  void str(_CS_string_type const&);
143 
144  protected:
146 };
147 
148 // --------------------------------------------------------------------------
149 
150 template <class _CS_cT, class _CS_Tr, class _CS_Al>
151 class basic_istringstream: public virtual _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>,
152  public basic_istream<_CS_cT, _CS_Tr>
153 {
154  public:
155  typedef typename basic_istream<_CS_cT, _CS_Tr>::char_type char_type;
156  typedef typename basic_istream<_CS_cT, _CS_Tr>::int_type int_type;
157  typedef typename basic_istream<_CS_cT, _CS_Tr>::pos_type pos_type;
158  typedef typename basic_istream<_CS_cT, _CS_Tr>::off_type off_type;
159  typedef typename basic_istream<_CS_cT, _CS_Tr>::traits_type traits_type;
160  typedef basic_string<_CS_cT, _CS_Tr, _CS_Al> _CS_string_type;
161 
162  explicit basic_istringstream(ios_base::openmode = ios_base::in);
163  explicit basic_istringstream(_CS_string_type const&, ios_base::openmode = ios_base::in);
164 
165  basic_stringbuf<_CS_cT, _CS_Tr, _CS_Al>* rdbuf() const { return &_CS_m_ssbuf; }
166 };
167 
168 // --------------------------------------------------------------------------
169 
170 template <class _CS_cT, class _CS_Tr, class _CS_Al>
171 class basic_ostringstream: public virtual _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>,
172  public basic_ostream<_CS_cT, _CS_Tr>
173 {
174  public:
175  typedef typename basic_ostream<_CS_cT, _CS_Tr>::char_type char_type;
176  typedef typename basic_ostream<_CS_cT, _CS_Tr>::int_type int_type;
177  typedef typename basic_ostream<_CS_cT, _CS_Tr>::pos_type pos_type;
178  typedef typename basic_ostream<_CS_cT, _CS_Tr>::off_type off_type;
179  typedef basic_string<_CS_cT, _CS_Tr, _CS_Al> _CS_string_type;
180 
181  explicit basic_ostringstream(ios_base::openmode = ios_base::out);
182  explicit basic_ostringstream(_CS_string_type const&, ios_base::openmode = ios_base::out);
183 
184  basic_stringbuf<_CS_cT, _CS_Tr, _CS_Al>* rdbuf() const { return &_CS_m_ssbuf; }
185 };
186 
187 // --------------------------------------------------------------------------
188 
189 template <class _CS_cT, class _CS_Tr, class _CS_Al>
190 class basic_stringstream: public virtual _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>,
191  public basic_iostream<_CS_cT, _CS_Tr>
192 {
193  public:
194  typedef basic_string<_CS_cT, _CS_Tr, _CS_Al> _CS_string_type;
195 
196  explicit basic_stringstream(ios_base::openmode = ios_base::in | ios_base::out);
197  explicit basic_stringstream(_CS_string_type const&, ios_base::openmode = ios_base::in|ios_base::out);
198 
199  basic_stringbuf<_CS_cT, _CS_Tr, _CS_Al>* rdbuf() const { return &_CS_m_ssbuf; }
200 };
201 
206 
207 //------------------------------------------------------------------------------
208 
209 #if !defined(SSTREAM_CC)
210 // # include <sstream.cc>
211 // Commented this out, as recommendet in the README file.
212 // SAB 30.05.2000
213 #endif
214 
215 // SAB 30.05.2000:
216 // Instead, I'm including the whole contents of sstream.cc here directly:
217 
218 // --------------------------------------------------------------------------
219 
220 template <class _CS_cT, class _CS_Tr, class _CS_Al>
222  _CS_m_mode(_CS_m),
223  _CS_m_beg(0),
224  _CS_m_end(0)
225 {
226 }
227 
228 template <class _CS_cT, class _CS_Tr, class _CS_Al>
230  ios_base::openmode _CS_m):
231  _CS_m_mode(_CS_m),
232  _CS_m_beg(_CS_s.size() > 0? new _CS_cT[_CS_s.size()]: 0),
233  _CS_m_end(_CS_m_beg + _CS_s.size())
234 {
235  traits_type::copy(_CS_m_beg, _CS_s.data(), _CS_s.size());
236  if (_CS_m & ios_base::in)
237  setg(_CS_m_beg, _CS_m_beg, _CS_m_end);
238  if (_CS_m & ios_base::out)
239  setp(_CS_m_beg, _CS_m_end);
240 }
241 
242 template <class _CS_cT, class _CS_Tr, class _CS_Al>
244 {
245  delete[] _CS_m_beg;
246 }
247 
248 template <class _CS_cT, class _CS_Tr, class _CS_Al>
249 basic_string<_CS_cT, _CS_Tr, _CS_Al>
251 {
252  if (pbase() == epptr())
253  if (eback() == egptr())
254  return basic_string<_CS_cT, _CS_Tr, _CS_Al>();
255  else
256  return basic_string<_CS_cT, _CS_Tr, _CS_Al>(eback(), egptr());
257  else
258  return basic_string<_CS_cT, _CS_Tr, _CS_Al>(pbase(), epptr());
259 }
260 
261 template <class _CS_cT, class _CS_Tr, class _CS_Al>
262 void
264 {
265  _CS_cT* _CS_nv = new _CS_cT[_CS_s.size()];
266  traits_type::copy(_CS_nv, _CS_s.data(), _CS_s.size());
267  delete[] _CS_m_beg;
268 
269  _CS_m_beg = _CS_nv;
270  _CS_m_end = _CS_m_beg + _CS_s.size();
271  traits_type::copy(_CS_m_beg, _CS_s.data(), _CS_s.size());
272  if (_CS_m_mode & ios_base::in)
273  setg(_CS_m_beg, _CS_m_beg, _CS_m_end);
274  if (_CS_m_mode & ios_base::out)
275  setp(_CS_m_beg, _CS_m_end);
276 }
277 
278 template <class _CS_cT, class _CS_Tr, class _CS_Al>
281 {
282  return gptr() == egptr()? traits_type::eof()
283  : traits_type::to_int_type(*gptr());
284 }
285 
286 template <class _CS_cT, class _CS_Tr, class _CS_Al>
289 {
290  if (eback() != gptr())
291  {
292  if (traits_type::eq_int_type(_CS_c, traits_type::eof()))
293  {
294  gbump(-1);
295  return traits_type::not_eof(_CS_c);
296  }
297  else
298  if (traits_type::eq(traits_type::to_char_type(_CS_c), gptr()[-1])
299  || (_CS_m_mode & ios_base::out) != 0)
300  {
301  gbump(-1);
302  traits_type::assign(*gptr(), traits_type::to_char_type(_CS_c));
303  return _CS_c;
304  }
305  }
306  // fails if
307  // - no read position is available
308  // - c is not eof, does not match the last read char, and the stream is
309  // read-only
310  return traits_type::eof();
311 }
312 
313 template <class _CS_cT, class _CS_Tr, class _CS_Al>
316 {
317  if (traits_type::eq_int_type(_CS_c, traits_type::eof()))
318  return traits_type::not_eof(_CS_c);
319  else if (_CS_m_mode & ios_base::out)
320  {
321  if (_CS_m_beg == 0)
322  {
323  _CS_m_beg = new _CS_cT[64];
324  _CS_m_end = _CS_m_beg + 64;
325  setp(_CS_m_beg, _CS_m_beg);
326  }
327 
328  if (pptr() != epptr())
329  {
330  traits_type::assign(*pptr(), traits_type::to_char_type(_CS_c));
331  pbump(1);
332  }
333  else if (epptr() != _CS_m_end)
334  {
335  traits_type::assign(*pptr(), traits_type::to_char_type(_CS_c));
336  setp(pbase(), epptr() + 1);
337  pbump(epptr() - pbase());
338  if (_CS_m_mode & ios_base::in)
339  setg(eback(), gptr(), pptr());
340  }
341  else
342  {
343  streamsize _CS_size = _CS_m_end - _CS_m_beg;
344  _CS_cT* _CS_nv = new _CS_cT[2 * _CS_size];
345  traits_type::copy(_CS_nv, _CS_m_beg, _CS_size);
346  delete[] _CS_m_beg;
347  _CS_m_beg = _CS_nv;
348  _CS_m_end = _CS_nv + 2 * _CS_size;
349  traits_type::assign(_CS_m_beg[_CS_size], traits_type::to_char_type(_CS_c));
350  setp(_CS_m_beg, _CS_m_beg + _CS_size + 1);
351  pbump(_CS_size + 1);
352 
353  if (_CS_m_mode & ios_base::in)
354  setg(pbase(), pbase() + (egptr() - gptr()), pptr());
355  }
356  return _CS_c;
357  }
358 
359  return traits_type::eof();
360 }
361 
362 template <class _CS_cT, class _CS_Tr, class _CS_Al>
363 basic_streambuf<_CS_cT, _CS_Tr>*
365 {
366  //-dk:TODO document that setbuf() has no effect! (implementation defined)
367  return this;
368 }
369 
370 template <class _CS_cT, class _CS_Tr, class _CS_Al>
373  ios_base::seekdir _CS_dir,
374  ios_base::openmode _CS_which)
375 {
376  _CS_cT* _CS_np = 0;
377  _CS_cT* _CS_e = _CS_m_mode & ios_base::out? epptr(): egptr();
378 
379  switch (_CS_dir)
380  {
381  case ios_base::beg:
382  if (_CS_off < 0 || (_CS_e - _CS_m_beg) < _CS_off)
383  return pos_type(off_type(-1));
384  _CS_np = _CS_m_beg + _CS_off;
385  break;
386  case ios_base::end:
387  if (_CS_off > 0 || (_CS_e - _CS_m_beg) < -_CS_off)
388  return pos_type(off_type(-1));
389  _CS_np = _CS_e + _CS_off;
390  break;
391  case ios_base::cur:
392  if ((_CS_which & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out)
393  && pptr() != gptr())
394  return pos_type(off_type(-1));
395  _CS_np = (_CS_which & ios_base::in)? gptr(): pptr();
396 
397  if (_CS_off < -(_CS_np - _CS_m_beg)
398  || _CS_e - _CS_np < _CS_off)
399  return pos_type(off_type(-1));
400  _CS_np += _CS_off;
401  break;
402  }
403 
404  switch (_CS_which & (ios_base::in | ios_base::out))
405  {
406  case ios_base::in:
407  if (_CS_m_mode & ios_base::in)
408  gbump(_CS_np - gptr());
409  else
410  return pos_type(off_type(-1));
411  break;
412  case ios_base::out:
413  if (_CS_m_mode & ios_base::out)
414  pbump(_CS_np - pptr());
415  else
416  return pos_type(off_type(-1));
417  break;
418  case ios_base::in | ios_base::out:
419  if ((_CS_m_mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out))
420  {
421  gbump(_CS_np - gptr());
422  pbump(_CS_np - pptr());
423  }
424  else
425  return pos_type(off_type(-1));
426  break;
427  default:
428  return pos_type(off_type(-1));
429  }
430 
431  return pos_type(_CS_np - _CS_m_beg);
432 }
433 
434 template <class _CS_cT, class _CS_Tr, class _CS_Al>
437  ios_base::openmode _CS_which)
438 {
439  _CS_cT* _CS_p = (_CS_m_mode & ios_base::out)? epptr(): egptr();
440  if (_CS_pos < 0 || (_CS_p - _CS_m_beg) < _CS_pos)
441  return pos_type(off_type(-1));
442 
443  _CS_p = _CS_m_beg + _CS_pos;
444 
445  switch (_CS_which & (ios_base::in | ios_base::out) & _CS_m_mode)
446  {
447  case ios_base::in:
448  gbump(_CS_p - gptr());
449  break;
450  case ios_base::out:
451  pbump(_CS_p - pptr());
452  break;
453  case ios_base::in | ios_base::out:
454  gbump(_CS_p - gptr());
455  pbump(_CS_p - pptr());
456  break;
457  default:
458  return pos_type(off_type(-1));
459  }
460 
461  return _CS_pos;
462 }
463 
464 template <class _CS_cT, class _CS_Tr, class _CS_Al>
465 int
467 {
468  // do nothing, except signaling success
469  return traits_type::not_eof(traits_type::eof());
470 }
471 
472 // --------------------------------------------------------------------------
473 
474 template <class _CS_cT, class _CS_Tr, class _CS_Al>
476  _CS_basic_sstream_base( ios_base::openmode _CS_mode):
477  _CS_m_ssbuf(_CS_mode)
478 {
479 }
480 
481 template <class _CS_cT, class _CS_Tr, class _CS_Al>
484  ios_base::openmode _CS_mode):
485  _CS_m_ssbuf(_CS_str, _CS_mode)
486 {
487 }
488 
489 template <class _CS_cT, class _CS_Tr, class _CS_Al>
490 basic_string<_CS_cT, _CS_Tr, _CS_Al>
492 {
493  return _CS_m_ssbuf.str();
494 }
495 
496 template <class _CS_cT, class _CS_Tr, class _CS_Al>
497 void
499  _CS_string_type const& _CS_str)
500 {
501  _CS_m_ssbuf.str(_CS_str);
502 }
503 
504 // --------------------------------------------------------------------------
505 
506 template <class _CS_cT, class _CS_Tr, class _CS_Al>
508  ios_base::openmode _CS_mode):
509  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_mode | ios_base::in),
510  ios(&_CS_m_ssbuf),
511  basic_istream<_CS_cT, _CS_Tr>(&_CS_m_ssbuf)
512 {
513  init(&_CS_m_ssbuf);
514 }
515 
516 template <class _CS_cT, class _CS_Tr, class _CS_Al>
518  _CS_string_type const& _CS_str,
519  ios_base::openmode _CS_mode):
520  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_str, _CS_mode | ios_base::in),
521  ios(&_CS_m_ssbuf)
522 {
523  init(&_CS_m_ssbuf);
524 }
525 
526 // --------------------------------------------------------------------------
527 
528 template <class _CS_cT, class _CS_Tr, class _CS_Al>
530  ios_base::openmode _CS_mode):
531  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_mode | ios_base::out)
532 {
533  init(&_CS_m_ssbuf);
534 }
535 
536 template <class _CS_cT, class _CS_Tr, class _CS_Al>
538  _CS_string_type const& _CS_str,
539  ios_base::openmode _CS_mode):
540  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_str,
541  _CS_mode | ios_base::out),
542  ios(&_CS_m_ssbuf),
543  basic_ostream<_CS_cT, _CS_Tr>(&_CS_m_ssbuf)
544 {
545  init(&_CS_m_ssbuf);
546 }
547 
548 // --------------------------------------------------------------------------
549 
550 template <class _CS_cT, class _CS_Tr, class _CS_Al>
552  ios_base::openmode _CS_mode):
553  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_mode | in | out),
554  ios(&_CS_m_ssbuf),
555  basic_iostream<_CS_cT, _CS_Tr>(&_CS_m_ssbuf)
556 {
557  init(&_CS_m_ssbuf);
558 }
559 
560 template <class _CS_cT, class _CS_Tr, class _CS_Al>
562  _CS_string_type const& _CS_str,
563  ios_base::openmode _CS_mode):
564  _CS_basic_sstream_base<_CS_cT, _CS_Tr, _CS_Al>(_CS_str, _CS_mode | in | out),
565  ios(&_CS_m_ssbuf),
566  basic_iostream<_CS_cT, _CS_Tr>(&_CS_m_ssbuf)
567 {
568  init(&_CS_m_ssbuf);
569 }
570 
571 // --------------------------------------------------------------------------
572 
573 
574 
575 #endif /* SSTREAM_H */
576 #endif /* HAVE_SSTREAM */
577 
void copy(ConstComplexIterator1D origin, const ConstComplexIterator1D &end, ComplexIterator1D target)
Copy data between begin and end to target.
Definition: complex.cc:478
basic_ostream< _CS_cT, _CS_Tr >::pos_type pos_type
Definition: sstream.h:177
basic_istringstream(ios_base::openmode=ios_base::in)
Definition: sstream.h:507
_CS_cT * _CS_m_beg
Definition: sstream.h:126
basic_istream< _CS_cT, _CS_Tr >::pos_type pos_type
Definition: sstream.h:157
basic_stringstream(ios_base::openmode=ios_base::in|ios_base::out)
Definition: sstream.h:551
_CS_cT * _CS_m_end
Definition: sstream.h:127
basic_istream< _CS_cT, _CS_Tr >::traits_type traits_type
Definition: sstream.h:159
basic_string< _CS_cT, _CS_Tr, _CS_Al > _CS_string_type
Definition: sstream.h:194
basic_istream< _CS_cT, _CS_Tr >::char_type char_type
Definition: sstream.h:155
basic_streambuf< _CS_cT, _CS_traits >::char_type char_type
Definition: sstream.h:98
basic_string< _CS_cT, _CS_Tr, _CS_Al > _CS_string_type
Definition: sstream.h:136
basic_streambuf< _CS_cT, _CS_traits >::int_type int_type
Definition: sstream.h:100
basic_string< _CS_cT, _CS_Tr, _CS_Al > _CS_string_type
Definition: sstream.h:179
basic_stringbuf< _CS_cT, _CS_Tr, _CS_Al > * rdbuf() const
Definition: sstream.h:165
basic_istringstream< char, string_char_traits< char >, alloc > istringstream
Definition: sstream.h:203
basic_stringstream< char, string_char_traits< char >, alloc > stringstream
Definition: sstream.h:205
int_type pbackfail(int_type)
pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode)
int_type underflow()
basic_stringbuf< char, string_char_traits< char >, alloc > stringbuf
Definition: sstream.h:202
_CS_string_type str() const
Definition: sstream.h:491
basic_stringbuf< _CS_cT, _CS_Tr, _CS_Al > * rdbuf() const
Definition: sstream.h:199
_CS_basic_sstream_base(ios_base::openmode)
Definition: sstream.h:476
basic_streambuf< _CS_cT, _CS_traits >::traits_type traits_type
Definition: sstream.h:99
basic_stringbuf< _CS_cT, _CS_Tr, _CS_Al > _CS_m_ssbuf
Definition: sstream.h:145
basic_ostream< _CS_cT, _CS_Tr >::int_type int_type
Definition: sstream.h:176
basic_string< _CS_cT, _CS_traits, _CS_alloc > string_type
Definition: sstream.h:97
basic_istream< _CS_cT, _CS_Tr >::int_type int_type
Definition: sstream.h:156
basic_istream< _CS_cT, _CS_Tr >::off_type off_type
Definition: sstream.h:158
int_type overflow(int_type)
basic_ostream< _CS_cT, _CS_Tr >::char_type char_type
Definition: sstream.h:175
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
Definition: sstream.h:204
Workspace & init(Workspace &ws)
basic_string< _CS_cT, _CS_traits, _CS_alloc > str() const
basic_string< _CS_cT, _CS_Tr, _CS_Al > _CS_string_type
Definition: sstream.h:160
basic_ostringstream(ios_base::openmode=ios_base::out)
Definition: sstream.h:529
basic_ostream< _CS_cT, _CS_Tr >::off_type off_type
Definition: sstream.h:178
pos_type seekpos(pos_type pos, ios_base::openmode)
basic_streambuf< _CS_cT, _CS_traits > * setbuf(char_type *, streamsize)
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
Definition: zeemandata.h:108
basic_streambuf< _CS_cT, _CS_traits >::off_type off_type
Definition: sstream.h:102
basic_stringbuf< _CS_cT, _CS_Tr, _CS_Al > * rdbuf() const
Definition: sstream.h:184
basic_streambuf< _CS_cT, _CS_traits >::pos_type pos_type
Definition: sstream.h:101
ios_base::openmode _CS_m_mode
Definition: sstream.h:125
basic_stringbuf(ios_base::openmode=ios_base::in|ios_base::out)