00001
00002
00003
00004
00005
00006
00007 #ifndef _MIMETIC_CODEC_CODECBASE_H_
00008 #define _MIMETIC_CODEC_CODECBASE_H_
00009 namespace mimetic
00010 {
00011
00012
00013 struct buffered_codec_type_tag
00014 {
00015 };
00016
00017 struct unbuffered_codec_type_tag
00018 {
00019 };
00020
00021
00022
00023 struct codec
00024 {
00025 typedef unsigned char char_type;
00026 virtual ~codec() {}
00027 virtual const char* name() const = 0;
00028
00029
00030
00031 virtual double codeSizeMultiplier() const { return 1.0; }
00032 };
00033
00034
00035
00036
00037 struct unbuffered_codec: public codec
00038 {
00039 typedef unbuffered_codec_type_tag codec_type;
00040 template<typename OutIt>
00041 void flush(OutIt&)
00042 {
00043 }
00044 };
00045
00046
00047 struct buffered_codec: public codec
00048 {
00049 typedef buffered_codec_type_tag codec_type;
00050 };
00051
00052
00053 }
00054
00055 #endif
00056