21 return (_flags.count(flag) != 0);
27 return _flags.empty();
33 for(
auto flag : _flags) {
34 if(knownFlags.count(flag) == 0) {
44 return _flags == other._flags;
51 return _flags < other._flags;
70 for(
const auto& f : _flags) {
82 return getStringMap().at(flag);
88 std::vector<std::string> names = split(listOfflags);
89 std::set<AccessMode> flagList;
90 for(
const auto& flagName : names) {
91 flagList.insert(getAccessMode(flagName));
98 const std::map<AccessMode, std::string>& AccessModeFlags::getStringMap() {
99 static std::map<AccessMode, std::string> m = {
106 AccessMode AccessModeFlags::getAccessMode(
const std::string& flagName) {
107 static std::map<std::string, AccessMode> reverse_m;
108 for(
const auto& m : getStringMap()) {
109 reverse_m[m.second] = m.first;
112 return reverse_m.at(flagName);
114 catch(std::out_of_range& e) {
121 std::vector<std::string> AccessModeFlags::split(
const std::string& s) {
122 std::vector<std::string> list;
124 char delimiter =
',';
126 std::istringstream stream(s);
127 while(getline(stream, tmp, delimiter)) {