Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

dsWordSource.h

Go to the documentation of this file.
00001 /*
00002  * $Id: dsWordSource.h,v 1.1.1.1 2002/09/02 18:42:23 dsamersoff Exp $
00003  */
00004 
00005 #ifndef dsWordSource_h
00006 #define dsWordSource_h
00007 
00008 #ifdef HAVE_CONFIG_H
00009 # include <config.h>
00010 #endif
00011 
00012 
00013 #include <stdio.h>
00014 #include <string.h>
00015 #include <ctype.h>
00016 #include <string.h>
00017 
00018 #include <dsSmartException.h>
00019 
00020 DECLARE_EXCEPTION(ws);
00021 
00027 class dsWordSource
00028 {
00029 public:
00030     unsigned    wordcnt; 
00031     unsigned    linecnt; 
00032     const char *delems;  
00033 
00040     dsWordSource(const char *filename, const char *dlm = " $@#%&*.,<>?!~;':\"[]{}\\/|+=_-()\t\r\n");
00041 
00042     ~dsWordSource();
00043 
00049     const char *next();
00050 
00054     void reset();
00055 
00056 private:
00057     int isword(int ch);
00058     void fillbuf();
00059     void nextalpha();
00060     FILE *fp;
00061     char buffer[256];
00062     char *p, *q;
00063     int done;
00064 };
00065 
00066 #endif

Generated on Mon May 16 18:26:58 2005 for libdms4 by doxygen1.3-rc2