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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user