#ifndef RECSCAN_H #define RECSCAN_H ///////////////////////////////////////////////////////////////////// // RecScan.h - Recursively opens included files and invokes // // a processing action on them // // // // Lanaguage: Visual C++ 2005 // // Platform: Dell Dimension 9150, Windows XP SP2 // // Application: Prototype for CSE687 Pr1, Sp06 // // Author: Jim Fawcett, CST 2-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////// /* Module Operations: ================== The class Scanner provides methods to scan files, recursively opening all included local header files. It currently provides "hard-wired" processing in the members: - doNonDestructiveProcessing() processes each SemiExp encountered in the current file. - doFileProcessing(file) processes file level information. To use scanner you have to either put your processing into these members, or better, design plug-in processing, so the module can become reusable. Public Interface: ================= Scanner scanr; scanr.doRecursiveScan(file); Build Process: ============== Required files - RecScan.h, RecScan.cpp, FileInfo.h, FileInfo.cpp, WinTools.h, WinTools.cpp, SemiExpression.h, SemiExpression.cpp, Tokenizer.h, Tokenizer.cpp Build commands (either one) - devenv Project1HelpS06.sln - cl /EHsc /DTEST_RECSCAN RecScan.cpp FileInfo.cpp WinTools.cpp\ SemiExpression.cpp Tokenizer.cpp Maintenance History: ==================== ver 1.0 : 06 Feb 06 - first release */ // #include #include class Scanner { public: Scanner(); void doRecursiveScan(const std::string& file); void doFileProc(const std::string& file); void doNonDestructiveProcess(); std::set& filesProcessed(); private: std::string stripQuotes(const std::string& tok); std::set files; }; inline std::set& Scanner::filesProcessed() { return files; } #endif