1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 04:46:37 +02:00

Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums

This commit is contained in:
Adam
2013-01-21 22:31:16 -05:00
parent 51c049e1a7
commit ddaa001daf
128 changed files with 1857 additions and 2293 deletions
+15 -1
View File
@@ -15,13 +15,19 @@
class SaveData : public Serialize::Data
{
public:
Anope::string last;
std::fstream *fs;
SaveData() : fs(NULL) { }
std::iostream& operator[](const Anope::string &key) anope_override
{
*fs << "\nDATA " << key << " ";
if (key != last)
{
*fs << "\nDATA " << key << " ";
last = key;
}
return *fs;
}
};
@@ -57,6 +63,14 @@ class LoadData : public Serialize::Data
this->ss << this->data[key];
return this->ss;
}
std::set<Anope::string> KeySet() const anope_override
{
std::set<Anope::string> keys;
for (std::map<Anope::string, Anope::string>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
keys.insert(it->first);
return keys;
}
void Reset()
{