// This code implementation is the intellectual property of // the GEANT4 collaboration. // // By copying, distributing or modifying the Program (or any work // based on the Program) you indicate your acceptance of this statement, // and all its terms. // // $Id: ctoken.h,v 1.5 1999/11/29 10:17:41 gcosmo Exp $ // GEANT4 tag $Name: geant4-01-00 $ // // //--------------------------------------------------------------- // GEANT 4 class header file // // G4Tokenizer // // Class description: // // STL wrapper class for String tokenizer. // It implements Rogue Wave RWTokenizer signature but // intrinsically using STL string. //--------------------------------------------------------------- #ifndef __ctoken #define __ctoken #include "g4rw/defs.h" #include "g4rw/cstring.h" class G4Tokenizer { public: G4Tokenizer(const G4String& s):string2tokenize(s),actual(0){} G4SubString operator()(const char* str=" \t\n",size_t l=0) { size_t i,j,tmp; G4bool hasws=false; if(l==0) l=strlen(str); //Skip leading delimeters while(actual