Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / protocols / ace / INet / HTTP_StreamPolicyBase.h
blob5f2e1b58097d606ab4e5e4e86fbb83b29ff6c014
1 /**
2 * @file HTTP_StreamPolicyBase.h
4 * @author Martin Corino <mcorino@remedy.nl>
5 */
7 #ifndef ACE_HTTP_STREAM_POLICY_BASE_H
8 #define ACE_HTTP_STREAM_POLICY_BASE_H
10 #include /**/ "ace/pre.h"
12 #include "ace/INet/INet_Export.h"
13 #include "ace/INet/BufferedStreamBuffer.h"
15 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
17 namespace ACE
19 namespace HTTP
21 /**
22 * @class ACE_IOS_StreamPolicyBase
24 * @brief Abstract base for HTTP stream policies.
27 template <class STREAM_BUFFER>
28 class StreamPolicyBase
30 public:
31 StreamPolicyBase ();
32 virtual ~StreamPolicyBase ();
34 typedef typename STREAM_BUFFER::char_type char_type;
36 virtual int read_from_stream (char_type* buffer, std::streamsize length) = 0;
38 virtual int write_to_stream (const char_type* buffer, std::streamsize length) = 0;
40 void set_stream_buffer (STREAM_BUFFER* streambuf);
42 protected:
43 int read_from_stream_i (char_type* buffer, std::streamsize length);
45 int write_to_stream_i (const char_type* buffer, std::streamsize length);
47 private:
48 STREAM_BUFFER* streambuf_;
53 ACE_END_VERSIONED_NAMESPACE_DECL
55 #include "ace/INet/HTTP_StreamPolicyBase.cpp"
57 #include /**/ "ace/post.h"
58 #endif /* ACE_HTTP_STREAM_POLICY_BASE_H */