#include <CompressMan.hpp>
Public Methods | |
CompressMan () | |
void | AddCompressFactory (UserCompressorFactory *compressor) |
UserCompressorFactory * | FindCompressorFactory (char *name, int len) |
|
Definition at line 48 of file CompressMan.hpp. 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 } |
|
Definition at line 44 of file CompressMan.cpp. 00046 { 00047 // We need to be a little careful here 00048 // It is possible that the AddCompressFactory is called *before* 00049 // the constructore CompressMan::CompressMan is called 00050 // Therefore, we do some potential initalization of lastref, 00051 // if nexessary: 00052 if(lastref==NULL) 00053 lastref=&compressorlist; 00054 00055 *lastref=compressor; 00056 lastref=&(compressor->next); 00057 *lastref=NULL; 00058 } |
|
Definition at line 250 of file CompressMan.cpp. 00253 { 00254 UserCompressorFactory *compressor=compressorlist; 00255 int namelen; 00256 00257 while(compressor!=NULL) 00258 { 00259 namelen=strlen(compressor->GetName()); 00260 if((namelen==len)&& 00261 (memcmp(compressor->GetName(),name,len)==0)) 00262 return compressor; 00263 compressor=compressor->next; 00264 } 00265 Error("Could not find compressor '"); 00266 ErrorCont(name,len); 00267 ErrorCont("'!"); 00268 Exit(); 00269 return NULL; 00270 } |