accesslist.h

来自「C++高级编程这本书所附的源代码」· C头文件 代码 · 共 36 行

H
36
字号
#include <set>#include <string>#include <list>using std::set;using std::string;using std::list;class AccessList{ public:  AccessList() {}  //  // Adds the user to the permissions list.  //  void addUser(const string& user);  //  // Removes the user from the permissions list.  //  void removeUser(const string& user);  //  // Returns true if user is in the permissionns list.  //  bool isAllowed(const string& user) const;  //  // Returns a list of all the users who have permissions.  //  list<string> getAllUsers() const; protected:  set<string> mAllowed;};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?