File Mode.hpp changed (mode: 100644) (index 21322f0..e95ec1b) |
22 |
22 |
#include <deque> |
#include <deque> |
23 |
23 |
#include <functional> |
#include <functional> |
24 |
24 |
#include <string> |
#include <string> |
|
25 |
|
#include <unordered_set> |
25 |
26 |
|
|
26 |
27 |
namespace vle { |
namespace vle { |
27 |
28 |
|
|
|
... |
... |
public: |
69 |
70 |
{ return useCount; } |
{ return useCount; } |
70 |
71 |
|
|
71 |
72 |
// Registers a shortcut. Throws `std::invalid_argument` if shortcut is too |
// Registers a shortcut. Throws `std::invalid_argument` if shortcut is too |
72 |
|
// long. |
|
|
73 |
|
// long or a duplicate. |
73 |
74 |
void addShortcut(Shortcut shortcut); |
void addShortcut(Shortcut shortcut); |
74 |
75 |
// Retrieves shortcuts of this mode. |
// Retrieves shortcuts of this mode. |
75 |
76 |
const std::deque<Shortcut> & getShortcuts() const |
const std::deque<Shortcut> & getShortcuts() const |
76 |
77 |
{ return shortcuts; } |
{ return shortcuts; } |
77 |
78 |
|
|
78 |
79 |
private: |
private: |
79 |
|
std::string id; // Identifier of the mode. |
|
80 |
|
std::deque<Shortcut> shortcuts; // Shortcuts of this mode. |
|
81 |
|
bool useCount = false; // Whether count is used by shortcuts. |
|
|
80 |
|
// Identifier of the mode. |
|
81 |
|
std::string id; |
|
82 |
|
// Known hortcut values of this mode. |
|
83 |
|
std::unordered_set<std::wstring> seenShortcuts; |
|
84 |
|
// Shortcuts of this mode. |
|
85 |
|
std::deque<Shortcut> shortcuts; |
|
86 |
|
// Whether count is used by shortcuts. |
|
87 |
|
bool useCount; |
82 |
88 |
}; |
}; |
83 |
89 |
|
|
84 |
90 |
} |
} |