Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/corelibs/typechain/handlers/type_z.hh

Go to the documentation of this file.
00001 /* $Id: type_z.hh,v 1.2 2003/05/29 23:24:47 reed Exp $ */
00002 
00003 /*
00004     This file is part of the Virtual Object System of
00005     the Interreality project (http://interreality.org).
00006 
00007     Copyright (C) 2001, 2002 Reed Hedges <reed@zerohour.net>
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public
00020     License along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022 */
00023 
00024 #ifndef _TYPE_Z_HH_
00025 #define _TYPE_Z_HH_
00026 
00027 #include  "../typechain.hh"
00028 #include "../typehandler.hh"
00029 #include <zlib.h>
00030 
00031 /** Class to encode and decode deflated data. Uses zlib
00032  * by Jean-loup Gailly and Mark Adler (http://www.gzip.org/zlib/).
00033     @see TypeHandler
00034     @see TypeChain
00035 */
00036 
00037 class TypeDeflate : public TypeHandler  {
00038 protected:
00039     unsigned int BufferSize;
00040 public:
00041     TypeDeflate();
00042     /** Decode data.  */
00043     virtual void decode(string& data, TypeParams& params); 
00044     /** Encode data.  */
00045     virtual void encode(string& data, TypeParams& params);
00046 };
00047 
00048 /** Class to encode and decode gzip-format data. Uses zlib
00049  * by Jean-loup Gailly and Mark Adler (http://www.gzip.org/zlib/).
00050     @see TypeHandler
00051     @see TypeChain
00052 */
00053 class TypeGZip : public TypeHandler  {
00054 public:
00055     TypeGZip();
00056     /** Decode data.  */
00057     virtual void decode(string& data, TypeParams& params); 
00058     /** Encode data.  */
00059     virtual void encode(string& data, TypeParams& params);
00060 };
00061 
00062 #endif

Generated on Tue Aug 12 03:55:38 2003 for Interreality Project - VOS by doxygen 1.3.2