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

RepeatSepCompressorInfo Struct Reference

List of all members.

Public Methods

void ScanParamString (char *paramstr, int len)

Public Attributes

char * delimiter
unsigned long delimiterlen

Member Function Documentation

void RepeatSepCompressorInfo::ScanParamString char *    paramstr,
int    len
[inline]
 

Definition at line 73 of file RepeatCompress.cpp.

00075    {
00076       char  *endptr=paramstr+len,*endstringptr;
00077 
00078       // Skip all white spaces
00079       while(paramstr<endptr)
00080       {
00081          if((*paramstr!=' ')&&(*paramstr!=',')&&(*paramstr!='\t')&&
00082             (*paramstr!='\r')&&(*paramstr!='\n'))
00083             break;
00084          paramstr++;
00085       }
00086 
00087       // Parse the delimiter string
00088       endstringptr=::ParseString(paramstr,endptr);
00089       if(endstringptr==NULL)
00090       {
00091          Error("First parameter in rep(");
00092          ErrorCont(paramstr,len);
00093          ErrorCont(") should be a string!");
00094          Exit();
00095       }
00096 
00097       // Store the delimiter string
00098       delimiter=paramstr+1;
00099       delimiterlen=endstringptr-delimiter;
00100 
00101       // Skip white spaces
00102       endstringptr++;
00103 
00104       while(endstringptr<endptr)
00105       {
00106          if((*endstringptr!=' ')&&(*endstringptr!=',')&&(*endstringptr!='\t')&&
00107             (*endstringptr!='\r')&&(*endstringptr!='\n'))
00108             break;
00109          endstringptr++;
00110       }
00111 
00112       // Next, there must be the compressor as a parameter
00113 #ifdef XMILL
00114       subcompressor2=NULL;
00115       subcompressor=compressman.CreateCompressorInstance(endstringptr,endptr);
00116 
00117       if(subcompressor->IsRejecting())
00118       {
00119          Error("Compressor '");
00120          ErrorCont(endstringptr,endptr-endstringptr);
00121          ErrorCont("' must always accept the string!\n");
00122          Exit();
00123       }
00124 #endif
00125 #ifdef XDEMILL
00126       subuncompressor2=NULL;
00127       subuncompressor=compressman.CreateUncompressorInstance(endstringptr,endptr);
00128 #endif
00129       // Skip white spaces
00130       while(endstringptr<endptr)
00131       {
00132          if((*endstringptr!=' ')&&(*endstringptr!=',')&&(*endstringptr!='\t')&&
00133             (*endstringptr!='\r')&&(*endstringptr!='\n'))
00134             break;
00135          endstringptr++;
00136       }
00137 
00138       // No additional tail compressor?
00139       if(*endstringptr==')')
00140          return;
00141 
00142       // Otherwise find the tail compressor
00143 #ifdef XMILL
00144       subcompressor2=compressman.CreateCompressorInstance(endstringptr,endptr);
00145 #endif
00146 #ifdef XDEMILL
00147       subuncompressor2=compressman.CreateUncompressorInstance(endstringptr,endptr);
00148 #endif
00149 
00150       // Skip white spaces
00151       while(endstringptr<endptr)
00152       {
00153          if((*endstringptr!=' ')&&(*endstringptr!=',')&&(*endstringptr!='\t')&&
00154             (*endstringptr!='\r')&&(*endstringptr!='\n'))
00155             break;
00156          endstringptr++;
00157       }
00158 
00159       // Last character must be ')'
00160       if(*endstringptr!=')')
00161       {
00162          Error("Missing closed parenthesis in '");
00163          ErrorCont(paramstr,len);
00164          Exit();
00165       }
00166    }


Member Data Documentation

char* RepeatSepCompressorInfo::delimiter
 

Definition at line 60 of file RepeatCompress.cpp.

unsigned long RepeatSepCompressorInfo::delimiterlen
 

Definition at line 71 of file RepeatCompress.cpp.


The documentation for this struct was generated from the following file:
Generated on Sat Oct 13 16:08:55 2001 for XMILL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001