diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-17 08:09:25 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-11-17 08:09:25 +0000 |
commit | 1ac39dc62b1920d39095e05ce92fdef6afb7fbcf (patch) | |
tree | a2f6c717bbe6af4201ed3c704c88870afb1d34df /ace/IOStream.h | |
parent | cc91701d7182ff5de8d24a8323007c33958dc7a1 (diff) | |
download | ATCD-1ac39dc62b1920d39095e05ce92fdef6afb7fbcf.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/IOStream.h')
-rw-r--r-- | ace/IOStream.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/ace/IOStream.h b/ace/IOStream.h index c47fb18f98a..7e33a5a7959 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -284,14 +284,31 @@ protected: virtual ACE_HANDLE get_handle (void); #if defined (ACE_HAS_STANDARD_CPP_LIBRARY) - char *base (void) const { return eback_saved_; } - char *ebuf (void) const { return eback_saved_ + streambuf_size_; } - int blen (void) const { return streambuf_size_; } + char *base (void) const + { + return cur_mode_ == get_mode_ ? eback_saved_ + : cur_mode_ == put_mode_ ? pbase_saved_ + : 0; + } + char *ebuf (void) const + { + return cur_mode_ == 0 ? 0 : base() + streambuf_size_; + } + + int blen (void) const + { + return streambuf_size_; + } + void setb (char* b, char* eb, int a=0) { setbuf (b, (eb - b)); } - int out_waiting (void) { return pptr () - pbase (); } + + int out_waiting (void) + { + return pptr () - pbase (); + } #endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ }; |