2 * @file StreamInterceptor.h
4 * @author Martin Corino <mcorino@remedy.nl>
7 #ifndef ACE_IOS_STREAM_INTERCEPTOR_H
8 #define ACE_IOS_STREAM_INTERCEPTOR_H
10 #include /**/ "ace/pre.h"
12 #include /**/ "ace/config-all.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/INet/INet_Export.h"
22 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class ACE_IOS_StreamInterceptorBase
31 * @brief Abstract base for stream interceptors.
34 template <class ACE_CHAR_T
, class TR
= std::char_traits
<ACE_CHAR_T
> >
35 class StreamInterceptorBase
38 typedef std::basic_ios
<ACE_CHAR_T
, TR
> ios_type
;
39 typedef ACE_CHAR_T char_type
;
40 typedef typename
ios_type::openmode openmode
;
42 virtual ~StreamInterceptorBase ();
44 StreamInterceptorBase ();
47 virtual void before_write (const char_type
* buffer
,
48 std::streamsize length_to_write
);
49 virtual void after_write (int length_written
);
50 virtual void before_read (std::streamsize length_to_read
);
51 virtual void after_read (const char_type
* buffer
,
53 virtual void on_eof ();
56 typedef StreamInterceptorBase
<char> StreamInterceptor
;
60 ACE_END_VERSIONED_NAMESPACE_DECL
62 #include "ace/INet/StreamInterceptor.cpp"
64 #include /**/ "ace/post.h"
65 #endif /* ACE_IOS_STREAM_INTERCEPTOR_H */