diff options
author | jcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-04 03:31:53 +0000 |
---|---|---|
committer | jcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-04 03:31:53 +0000 |
commit | 88379af20d3b234d0f535a3de1e05a861811dfbc (patch) | |
tree | 6c51beed28ff0aae0d19b721d766c9f22972734c /ace/IOStream_T.h | |
parent | 278a91d6494236da3b854fbda53a3faa4af86218 (diff) | |
download | ATCD-88379af20d3b234d0f535a3de1e05a861811dfbc.tar.gz |
Restored 4.6.25 versions
Diffstat (limited to 'ace/IOStream_T.h')
-rw-r--r-- | ace/IOStream_T.h | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/ace/IOStream_T.h b/ace/IOStream_T.h index f311c34237d..86e0c6bf645 100644 --- a/ace/IOStream_T.h +++ b/ace/IOStream_T.h @@ -1,7 +1,7 @@ /* -*- C++ -*- */ // $Id$ -//============================================================================ +// ============================================================================ // // = LIBRARY // ace @@ -17,7 +17,7 @@ // Instead, it should #include "ace/IOStream.h". That's because // we only put some conditional compilations in that file. // -//============================================================================ +// ============================================================================ #ifndef ACE_IOSTREAM_T_H #define ACE_IOSTREAM_T_H @@ -31,10 +31,8 @@ #if !defined (ACE_LACKS_ACE_IOSTREAM) #if defined (ACE_HAS_STRING_CLASS) -template <class STREAM> STREAM & operator>> (STREAM &stream, -ACE_Quoted_String &str); -template <class STREAM> STREAM & operator<< (STREAM &stream, -ACE_Quoted_String &str); +template <class STREAM> STREAM & operator>> (STREAM &stream, ACE_Quoted_String &str); +template <class STREAM> STREAM & operator<< (STREAM &stream, ACE_Quoted_String &str); #endif /* defined (ACE_HAS_STRING_CLASS) */ template <class STREAM> @@ -49,12 +47,6 @@ public: // other streambuf objects, we can be input-only, output-only or // both. - ACE_Streambuf_T (u_int streambuf_size = ACE_STREAMBUF_SIZE, - int io_mode = ios::in | ios::out); - // We will create the STREAM by ourselves. Like - // other streambuf objects, we can be input-only, output-only or - // both. - virtual ssize_t send (char *buf, ssize_t len); virtual ssize_t recv (char *buf, @@ -79,12 +71,7 @@ protected: }; template <class STREAM> -class ACE_IOStream : public STREAM, - protected ACE_Streambuf_T<STREAM>, - // This is where all of the action takes place. The - // ACE_Streambuf_T<STREAM> - // is the interface to the underlying STREAM. - public iostream +class ACE_IOStream : public iostream, public STREAM { // = TITLE // A template adapter for creating an iostream-like object using @@ -128,6 +115,8 @@ public: // on STREAM. virtual ~ACE_IOStream (void); + // We have to get rid of the <streambuf_> ourselves since we gave it + // to the <iostream> base class; virtual int close (void); // The only ambituity in the multiple inheritance is the <close> @@ -202,10 +191,8 @@ public: virtual void osfx (void) { if (flags() & unitbuf) flush(); } #else #if defined (__GNUC__) - // Optimized ipfx(0) - virtual int ipfx0(void) { return iostream::ipfx0 (); } - // Optimized ipfx(1) - virtual int ipfx1(void) { return iostream::ipfx1(); } + virtual int ipfx0(void) { return iostream::ipfx0 (); } // Optimized ipfx(0) + virtual int ipfx1(void) { return iostream::ipfx1(); } // Optimized ipfx(1) #else virtual int ipfx0(void) { return iostream::ipfx (0); } virtual int ipfx1(void) { return iostream::ipfx (1); } @@ -220,14 +207,19 @@ public: // Allow the programmer to provide a timeout for read operations. // Give it a pointer to NULL to block forever. +protected: + ACE_Streambuf_T<STREAM> *streambuf_; + // This is where all of the action takes place. The streambuf_ is + // the interface to the underlying STREAM. + private: // = Private methods. // We move these into the private section so that they cannot be // used by the application programmer. This is necessary because - // the ACE_Streambuf_T<STREAM> will be buffering IO on the STREAM object. - // If these functions were used in your program, there is a danger of - // getting the datastream out of sync. + // streambuf_ will be buffering IO on the STREAM object. If these + // functions were used in your program, there is a danger of getting + // the datastream out of sync. ACE_UNIMPLEMENTED_FUNC (ssize_t send (...)) ACE_UNIMPLEMENTED_FUNC (ssize_t recv (...)) ACE_UNIMPLEMENTED_FUNC (ssize_t send_n (...)) @@ -279,7 +271,7 @@ protected: #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation "IOStream_T.cpp" +#pragma implementation ("IOStream_T.cpp") #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #endif /* ACE_LACKS_ACE_IOSTREAM */ #endif /* ACE_IOSTREAM_T_H */ |