#ifndef NAMETABLE_H #define NAMETABLE_H ///////////////////////////////////////////////////////////////////// // NameTable.h - brief demo of STL constructs for name table // // // // ver 2.0 : added comments to show how to make table static // // // // Jim Fawcett, CSE687 - Object Oriented Design, Spring 2005 // ///////////////////////////////////////////////////////////////////// #include #include #include #include class nameTable { public: typedef std::set FileSet; typedef std::map NameTable; typedef const std::string& conStrRef; nameTable() {} unsigned size() { return _nameTable.size(); } void save(conStrRef name, conStrRef file); void show(); private: // Remove comment, below, if you want table to be static. // You will also have to remove the indicated comment at // the top of NameTable.cpp /* static */ NameTable _nameTable; }; #endif