summaryrefslogtreecommitdiff
path: root/decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder.h b/decoder.h
index 25dbe56..9faabc1 100644
--- a/decoder.h
+++ b/decoder.h
@@ -11,15 +11,19 @@ class DecoderBase {
public:
typedef boost::shared_ptr<DecoderBase> p;
virtual size_t decode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size) = 0;
+ virtual ~DecoderBase() {}
+
};
//! Input filter to hold a decoder in a filter chain.
class DecoderFilter : public boost::iostreams::multichar_input_filter {
private:
DecoderBase::p decoder;
+
public:
typedef boost::shared_ptr<DecoderFilter> p;
DecoderFilter(DecoderBase::p decoder_);
+
template<typename Source>
std::streamsize read(Source& src, char *s, std::streamsize n) {
char src_data[0x2000];