/*
- * Copyright (c) [2004-2013] Novell, Inc.
+ * Copyright (c) [2004-2015] Novell, Inc.
*
* All Rights Reserved.
*
}
+ void
+ SysconfigFile::setValue(const string& key, const char* value)
+ {
+ setValue(key, string(value));
+ }
+
+
void
SysconfigFile::setValue(const string& key, const string& value)
{
/*
- * Copyright (c) [2004-2013] Novell, Inc.
+ * Copyright (c) [2004-2015] Novell, Inc.
*
* All Rights Reserved.
*
string name() const { return Name_C; }
+ void setName(const string& name) { AsciiFile::Name_C = name; }
+
void reload();
bool save();
protected:
- const string Name_C;
- const bool remove_empty;
-
vector<string> Lines_C;
- };
+ private:
+ string Name_C;
+ bool remove_empty;
+
+ };
class SysconfigFile : protected AsciiFile
SysconfigFile(const string& name) : AsciiFile(name), modified(false) {}
virtual ~SysconfigFile() { if (modified) save(); }
+ void setName(const string& name) { AsciiFile::setName(name); }
+
void save();
virtual void checkKey(const string& key) const;
virtual void setValue(const string& key, bool value);
bool getValue(const string& key, bool& value) const;
+ virtual void setValue(const string& key, const char* value);
virtual void setValue(const string& key, const string& value);
bool getValue(const string& key, string& value) const;