DiscardStream.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Utils_DiscardStream_
18 #define HH_SENF_Utils_DiscardStream_ 1
19 
20 // Custom includes
21 #include <boost/iostreams/concepts.hpp>
22 #include <boost/iostreams/stream.hpp>
23 
24 //#include "DiscardStream.mpp"
25 //-/////////////////////////////////////////////////////////////////////////////////////////////////
26 
27 namespace senf {
28 
30  : public boost::iostreams::sink
31  {
32  public:
33  std::streamsize write(char const * s, std::streamsize n);
34  };
35 
37  : public boost::iostreams::stream<DiscardSink>
38  {
39  public:
40  DiscardStream();
41  };
42 
43 }
44 
45 //-/////////////////////////////////////////////////////////////////////////////////////////////////
46 #include "DiscardStream.cci"
47 //#include "DiscardStream.ct"
48 //#include "DiscardStream.cti"
49 #endif
50 
51 
52 // Local Variables:
53 // mode: c++
54 // fill-column: 100
55 // comment-column: 40
56 // c-file-style: "senf"
57 // indent-tabs-mode: nil
58 // ispell-local-dictionary: "american"
59 // compile-command: "scons -u test"
60 // End:
std::streamsize write(char const *s, std::streamsize n)