/[debian]/mimetic/branches/upstream/current/mimetic/codec/codec_base.h
ViewVC logotype

Contents of /mimetic/branches/upstream/current/mimetic/codec/codec_base.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 128 - (show annotations)
Sat Feb 25 16:49:20 2006 UTC (15 years, 5 months ago) by gregoa
File MIME type: text/plain
File size: 1590 byte(s)
[svn-inject] Installing original source of mimetic
1 /***************************************************************************
2 copyright : (C) 2002-2005 by Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: codec_base.h,v 1.11 2005/02/23 10:26:15 tat Exp $
6 ***************************************************************************/
7
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16 #ifndef _MIMETIC_CODEC_CODECBASE_H_
17 #define _MIMETIC_CODEC_CODECBASE_H_
18 namespace mimetic
19 {
20
21
22 struct buffered_codec_type_tag
23 {
24 };
25
26 struct unbuffered_codec_type_tag
27 {
28 };
29
30
31 /// Codecs base class
32 struct codec
33 {
34 typedef unsigned char char_type;
35 virtual ~codec() {}
36 virtual const char* name() const = 0;
37 };
38
39
40
41 /// Base class for unbuffered codecs
42 struct unbuffered_codec: public codec
43 {
44 typedef unbuffered_codec_type_tag codec_type;
45 template<typename OutIt>
46 void flush(OutIt&)
47 {
48 }
49 };
50
51 /// Base class for buffered codecs
52 struct buffered_codec: public codec
53 {
54 typedef buffered_codec_type_tag codec_type;
55 };
56
57
58 }
59
60 #endif
61

  ViewVC Help
Powered by ViewVC 1.1.26