Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wvencoder.h

Go to the documentation of this file.
00001 /*
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  * 
00005  * A top-level data encoder class.  You put data in, and when it comes out
00006  * it's encoded.  It might be a different size or not, and future data might
00007  * or might not depend on previous data, depending on the encoder type.
00008  * 
00009  * Decoders are also derived from WvEncoder, since they're
00010  * really just encoders too.
00011  */
00012 #ifndef __WVENCODER_H
00013 #define __WVENCODER_H
00014 
00015 #include "wvbuffer.h"
00016 
00017 class WvEncoder
00018 {
00019 public:
00020     WvEncoder();
00021     virtual ~WvEncoder();
00022     
00023     virtual bool isok() const;
00024     void encode(const void *in, size_t insize, bool flush);
00025     void flush()
00026         { encode(NULL, 0, true); }
00027     
00028     WvBuffer outbuf;
00029     
00030 protected:
00031     // note: this function may be called with in==NULL, but only if insize==0
00032     // and flush==true.
00033     virtual size_t do_encode(const unsigned char *in, size_t insize,
00034                              bool flush) = 0;
00035 };
00036 
00037 #endif // __WVENCODER_H

Generated on Sat Aug 24 23:07:55 2002 for WvStreams by doxygen1.2.15