Home | History | Annotate | Download | only in std
      1 %include <std_ios.i>
      2 %{
      3 #ifndef SWIG_STD_NOMODERN_STL
      4 #include <streambuf>
      5 #else
      6 #include <streambuf.h>
      7 #endif
      8 %}
      9 
     10 namespace std {
     11 
     12   template<typename _CharT, typename _Traits = char_traits<_CharT> >
     13   class basic_streambuf
     14   {
     15   public:
     16     // Types:
     17     typedef _CharT 					char_type;
     18     typedef _Traits 					traits_type;
     19     typedef typename traits_type::int_type 		int_type;
     20     typedef typename traits_type::pos_type 		pos_type;
     21     typedef typename traits_type::off_type 		off_type;
     22 
     23   public:
     24     virtual
     25     ~basic_streambuf();
     26 
     27     // Locales:
     28     locale
     29     pubimbue(const locale &__loc);
     30 
     31     locale
     32     getloc() const;
     33 
     34     // Buffer and positioning:
     35     basic_streambuf<_CharT, _Traits>*
     36     pubsetbuf(char_type* __s, streamsize __n);
     37 
     38     pos_type
     39     pubseekoff(off_type __off, ios_base::seekdir __way,
     40 	       ios_base::openmode __mode = std::ios_base::in | std::ios_base::out);
     41 
     42     pos_type
     43     pubseekpos(pos_type __sp,
     44 	       ios_base::openmode __mode = std::ios_base::in | std::ios_base::out);
     45 
     46     int
     47     pubsync() ;
     48 
     49     // Get and put areas:
     50     // Get area:
     51     streamsize
     52     in_avail();
     53 
     54     int_type
     55     snextc();
     56 
     57     int_type
     58     sbumpc();
     59 
     60     int_type
     61     sgetc();
     62 
     63     streamsize
     64     sgetn(char_type* __s, streamsize __n);
     65 
     66     // Putback:
     67     int_type
     68     sputbackc(char_type __c);
     69 
     70     int_type
     71     sungetc();
     72 
     73     // Put area:
     74     int_type
     75     sputc(char_type __c);
     76 
     77     streamsize
     78     sputn(const char_type* __s, streamsize __n);
     79 
     80   protected:
     81     basic_streambuf();
     82 
     83   private:
     84     basic_streambuf(const basic_streambuf&);
     85 
     86   };
     87 }
     88 
     89 namespace std {
     90   %template(streambuf) basic_streambuf<char>;
     91 #if defined(SWIG_WCHAR)
     92   %template(wstreambuf) basic_streambuf<wchar_t>;
     93 #endif
     94 }
     95