Public Methods | |
void | CreateSubCompressors (char *paramstr, int len) |
Public Attributes | |
char * | startseparator |
unsigned long | startseparatorlen |
DivCompressorItem * | subcompressors |
|
Definition at line 76 of file DivCompress.cpp. Referenced by divsepcompressfactory().
00078 { 00079 char *endstringptr; 00080 DivCompressorItem **curitemref; 00081 00082 char *ptr=paramstr; 00083 char *endptr=paramstr+len; 00084 00085 if(*ptr=='"') // Did we find a separator string at the beginning ? 00086 { 00087 endstringptr=::ParseString(ptr,ptr+len); 00088 00089 startseparator=ptr+1; 00090 startseparatorlen=endstringptr-ptr-1; 00091 00092 ptr=endstringptr+1; 00093 } 00094 else // Otherwise, we don't have any start separator 00095 { 00096 startseparator=NULL; 00097 startseparatorlen=0; 00098 } 00099 00100 // We now parse the subcompressors and separator strings 00101 00102 curitemref=&subcompressors; 00103 *curitemref=NULL; 00104 00105 do 00106 { 00107 ptr=SkipWhiteSpaces(ptr,endptr); 00108 if(ptr==endptr) // Did we reach the end? 00109 break; 00110 00111 // First, we identify a compressor 00112 00113 *curitemref=new DivCompressorItem(); 00114 00115 #ifdef XMILL 00116 (*curitemref)->usercompressor=compressman.CreateCompressorInstance(ptr,endptr); 00117 #endif 00118 #ifdef XDEMILL 00119 (*curitemref)->useruncompressor=compressman.CreateUncompressorInstance(ptr,endptr); 00120 #endif 00121 00122 (*curitemref)->next=NULL; 00123 00124 // Next, we identify a delimiter string 00125 00126 ptr=SkipWhiteSpaces(ptr,endptr); 00127 if(ptr==endptr) // Did we reach the end? 00128 break; 00129 00130 // There must be string afterwards 00131 endstringptr=::ParseString(ptr,endptr); 00132 00133 // Let's store the separator string 00134 (*curitemref)->afterseparator=ptr+1; 00135 (*curitemref)->afterseparatorlen=endstringptr-ptr-1; 00136 00137 ptr=endstringptr+1; 00138 00139 curitemref=&((*curitemref)->next); 00140 *curitemref=NULL; 00141 } 00142 while(1); 00143 00144 if(*curitemref!=NULL) 00145 { 00146 (*curitemref)->afterseparator=NULL; 00147 (*curitemref)->afterseparatorlen=0; 00148 } 00149 } |
|
Definition at line 71 of file DivCompress.cpp. |
|
Definition at line 72 of file DivCompress.cpp. Referenced by divsepcompressfactory().
|
|
Definition at line 74 of file DivCompress.cpp. Referenced by divsepcompressfactory().
|