|
Sierra Toolkit
Version of the Day
|
00001 00010 #include <stk_util/util/Null_Streambuf.hpp> 00011 00012 /*--------------------------------------------------------------------*/ 00013 00014 null_streambuf::null_streambuf() : std::streambuf() 00015 { 00016 setp( buf , buf + sizeof(buf) ); 00017 } 00018 00019 null_streambuf::~null_streambuf() {} 00020 00021 /*--------------------------------------------------------------------*/ 00022 /* Overflow */ 00023 00024 int null_streambuf::overflow( int c ) 00025 { 00026 setp( buf , buf + sizeof(buf) ); 00027 00028 return c ; 00029 } 00030 00031 /*--------------------------------------------------------------------*/ 00032 00033 int null_streambuf::sync() 00034 { 00035 return 0 ; 00036 } 00037 00038 std::streambuf * null_streambuf::setbuf( char * s , std::streamsize n ) 00039 { 00040 return this ; 00041 } 00042 00043 00044 00045 00046 /*--------------------------------------------------------------------*/