#ifndef CRCPROC_H #define CRCPROC_H ///////////////////////////////////////////////////////////////////////////// // CRCProc.h - process CRC information // // ver 1.0 // // Language: Visual C++, ver 6.0 // // Platform: Del Dimension 8100, Windows 2000, SP1 // // Application: Project #1 Prototype for CSE691/791 - SWM&A, Fall 2000 // // Author: Jim Fawcett, CST 2-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////////////// /* Module Operations ================= top(); // set current CRC item to first if(nextCRC()) {...} // move to next CRC item if not at end int index = getCRCindex("title");// get index of CRC with this title int len = size(); // return number of CRCs string str = title(); // extract title of current CRC title() = "new title"; // modify title of current CRC string str = text(); // extract text of current CRC text() = "new text" // modify text of current CRC initializeCRC(); // define initial CRC items flush(); // remove all CRC items CRCrepType = getCRCs(); // access internal representation addCRC("a title","some text"); // add a new CRC to the internal rep */ ///////////////////////////////////////////////////////////////////////////// // Build Process // ///////////////////////////////////////////////////////////////////////////// // Required Files: // // CRCProc.h, CRCProc.cpp // // // // IDE Build: // // - Project\Settings\C/C++\Category:General\Preprocessor definitions: // // add ",TEST_CRCPROC" // // - Project\Settings\C/C++\Category:Code generation\Use run-time library:// // select Debug multithreaded // // - compile, link, and run // ///////////////////////////////////////////////////////////////////////////// /* Maintenance History =================== ver 1.0 : 04 Sep 01 - first release */ #pragma warning(disable : 4786) #include #include typedef std::map CRCrepType; void top(); bool nextCRC(); bool find(const std::string &title); int getCRCindex(const std::string &title); int size(); const std::string& title(); std::string& text(); void initializeCRCs(); void flush(); CRCrepType& getCRCs(); void addCRC(const std::string &title, const std::string &text); void delCRC(); #endif