PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Lib/std/std_streambuf.i

#
Swig | 94 lines | 72 code | 22 blank | 0 comment | 0 complexity | 7434d74f74a413e173612cb81b094f30 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. namespace std {
  10. template<typename _CharT, typename _Traits = char_traits<_CharT> >
  11. class basic_streambuf
  12. {
  13. public:
  14. // Types:
  15. typedef _CharT char_type;
  16. typedef _Traits traits_type;
  17. typedef typename traits_type::int_type int_type;
  18. typedef typename traits_type::pos_type pos_type;
  19. typedef typename traits_type::off_type off_type;
  20. public:
  21. virtual
  22. ~basic_streambuf();
  23. // Locales:
  24. locale
  25. pubimbue(const locale &__loc);
  26. locale
  27. getloc() const;
  28. // Buffer and positioning:
  29. basic_streambuf<_CharT, _Traits>*
  30. pubsetbuf(char_type* __s, streamsize __n);
  31. pos_type
  32. pubseekoff(off_type __off, ios_base::seekdir __way,
  33. ios_base::openmode __mode = std::ios_base::in | std::ios_base::out);
  34. pos_type
  35. pubseekpos(pos_type __sp,
  36. ios_base::openmode __mode = std::ios_base::in | std::ios_base::out);
  37. int
  38. pubsync() ;
  39. // Get and put areas:
  40. // Get area:
  41. streamsize
  42. in_avail();
  43. int_type
  44. snextc();
  45. int_type
  46. sbumpc();
  47. int_type
  48. sgetc();
  49. streamsize
  50. sgetn(char_type* __s, streamsize __n);
  51. // Putback:
  52. int_type
  53. sputbackc(char_type __c);
  54. int_type
  55. sungetc();
  56. // Put area:
  57. int_type
  58. sputc(char_type __c);
  59. streamsize
  60. sputn(const char_type* __s, streamsize __n);
  61. protected:
  62. basic_streambuf();
  63. private:
  64. basic_streambuf(const basic_streambuf&);
  65. };
  66. }
  67. namespace std {
  68. %template(streambuf) basic_streambuf<char>;
  69. #if defined(SWIG_WCHAR)
  70. %template(wstreambuf) basic_streambuf<wchar_t>;
  71. #endif
  72. }