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

CompressMan.hpp

Go to the documentation of this file.
00001 /*
00002 This product contains certain software code or other information
00003 ("AT&T Software") proprietary to AT&T Corp. ("AT&T").  The AT&T
00004 Software is provided to you "AS IS".  YOU ASSUME TOTAL RESPONSIBILITY
00005 AND RISK FOR USE OF THE AT&T SOFTWARE.  AT&T DOES NOT MAKE, AND
00006 EXPRESSLY DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND
00007 WHATSOEVER, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00008 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WARRANTIES OF
00009 TITLE OR NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS, ANY
00010 WARRANTIES ARISING BY USAGE OF TRADE, COURSE OF DEALING OR COURSE OF
00011 PERFORMANCE, OR ANY WARRANTY THAT THE AT&T SOFTWARE IS "ERROR FREE" OR
00012 WILL MEET YOUR REQUIREMENTS.
00013 
00014 Unless you accept a license to use the AT&T Software, you shall not
00015 reverse compile, disassemble or otherwise reverse engineer this
00016 product to ascertain the source code for any AT&T Software.
00017 
00018 (c) AT&T Corp. All rights reserved.  AT&T is a registered trademark of AT&T Corp.
00019 
00020 ***********************************************************************
00021 
00022 History:
00023 
00024       24/11/99  - initial release by Hartmut Liefke, liefke@seas.upenn.edu
00025                                      Dan Suciu,      suciu@research.att.com
00026 */
00027 
00028 //***************************************************************************
00029 //***************************************************************************
00030 
00031 // This module contains the compressor manager, which manages the set
00032 // of compressor factories and the (de)compressor instantiation
00033 // process
00034 
00035 
00036 #ifndef USERCOMPRESSMAN_HPP
00037 #define USERCOMPRESSMAN_HPP
00038 
00039 #include "UserCompress.hpp"
00040 
00041 class CompressMan
00042 {
00043    UserCompressorFactory   *compressorlist,  // The list of user compressors
00044                            **lastref;        // The 'next' element of the last user compressor
00045 
00046 public:
00047 
00048    CompressMan()
00049       // Initializes the user compressor list as empty
00050    {
00051       // We only initialize 'lastref', if the compressorlist is NULL.
00052       // Otherwise, the function AddCompressFactory has been called
00053       // *before* the constructor and we must not initialize
00054       // compressorlist or lastref.
00055 
00056       if(compressorlist==NULL)
00057          lastref=&compressorlist;
00058    }
00059 
00060    void AddCompressFactory(UserCompressorFactory *compressor);
00061       // Adds a new user compressor factory
00062 
00063 #ifdef XMILL   
00064    UserCompressor *CreateCompressorInstance(char * &compressorname,char *endptr);
00065       // Finds a specific user compressor factory that is specified by
00066       // 'compressorname' (the length is given by 'endptr-compressorname')
00067       // The compressor name might have parameters and after the operation,
00068       // the 'compressorname' is set to the next character following the
00069       // compressor name.
00070 
00071 #endif
00072 #ifdef XDEMILL
00073    UserUncompressor *CreateUncompressorInstance(char * &compressorname,char *endptr);
00074       // Finds a specific user decompressor factory that is specified by
00075       // 'compressorname' (the length is given by 'endptr-compressorname')
00076       // The compressor name might have parameters and after the operation,
00077       // the 'compressorname' is set to the next character following the
00078       // compressor name.
00079 
00080 #endif
00081    UserCompressorFactory *FindCompressorFactory(char *name,int len);
00082       // Finds a certain user compressor factory with a given name
00083       // If it doesn't find such a compressor, we exit
00084 
00085 #ifdef XMILL
00086    void PrintCompressorInfo();
00087       // Prints information about the compressors
00088 
00089    unsigned long GetDataSize();
00090       // Each compressor is allowed to store own data
00091       // This function determines how much space is needed by all user compressors
00092 
00093    void CompressSmallGlobalData(Compressor *compressor);
00094       // Stores own data (only the small pieces!) of the user compressor factories
00095       // in the output stream described by 'compressor'.
00096 
00097    void CompressLargeGlobalData(Output *output);
00098       // Stores own data (only the large pieces!) of the user compressor factories
00099       // in the output stream described by 'compressor'.
00100 
00101 #endif
00102 
00103 #ifdef XDEMILL
00104    void UncompressSmallGlobalData(SmallBlockUncompressor *uncompressor);
00105       // Reads the own (small) data from the source described by 'uncompressor' and
00106       // initializes the user compressor factories.
00107 
00108    void UncompressLargeGlobalData(Input *input);
00109       // Reads the own (large) data from the source described by 'uncompressor' and
00110       // initializes the user compressor factories.
00111 
00112    void FinishUncompress();
00113       // This is called after all user compressor data has been decompressed
00114 
00115    void DebugPrint();
00116 #endif
00117 };
00118 
00119 // The actual user compressor manager
00120 extern CompressMan  compressman;
00121 
00122 #endif

Generated on Sat Oct 13 16:08:34 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001