monotone

monotone Mtn Source Tree

Root/botan/data_snk.h

1/*************************************************
2* DataSink Header File *
3* (C) 1999-2007 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_DATA_SINK_H__
7#define BOTAN_DATA_SINK_H__
8
9#include <botan/filter.h>
10#include <iosfwd>
11
12namespace Botan {
13
14/*************************************************
15* Generic DataSink Interface *
16*************************************************/
17class DataSink : public Filter
18 {
19 public:
20 bool attachable() { return false; }
21 DataSink() {}
22 virtual ~DataSink() {}
23 private:
24 DataSink& operator=(const DataSink&) { return (*this); }
25 DataSink(const DataSink&);
26 };
27
28/*************************************************
29* Stream-Based DataSink *
30*************************************************/
31class DataSink_Stream : public DataSink
32 {
33 public:
34 void write(const byte[], u32bit);
35 DataSink_Stream(std::ostream&);
36 DataSink_Stream(const std::string&, bool = false);
37 ~DataSink_Stream();
38 private:
39 const std::string fsname;
40 std::ostream* sink;
41 bool owns;
42 };
43
44}
45
46#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status