December 2001
Intermediate to advanced
416 pages
8h 16m
English
What about the text file against which the user queries are made? There is only one instance of the text file (or if we support multiple text files, one instance of each of the several text files). The text file, then, is represented as a static member, together with several supporting static methods and an indexer:
abstract public class Query { static private [] string ms_textfiles; const private int ms_maxFiles = 24; static protected void check_index( int ix ) {...} static public void add_file( string name ) {...} static public int MaxFiles { get{ return ms_MaxFiles; } } static public string this[ index ix ] { get{ check_index( ix ); return ms_textfiles[ix]; } set{ check_index( ix ); ms_textfiles[ix] ...Read now
Unlock full access