#include <IniFile.h>
Public Member Functions | |
virtual | ~IniBase () |
const char * | getName () const |
const char * | getComment () const |
int | getReadBy () const |
virtual void | clean () |
void | setName (const string &c) |
void | setComment (const string &c) |
void | setReadBy (int r) |
void | setDirty () |
void | initName (const string &c) |
void | initComment (const string &c) |
void | initReadBy (const int r) |
void | init (const string &n, const string &c, int rb) |
Protected Member Functions | |
IniBase (int rb) | |
IniBase (const string &n) | |
virtual YCPMap | getAllDoIt () |
bool | getMapString (const YCPMap &in, const string &k, string &s) |
helper for setAllDoIt | |
bool | getMapInteger (const YCPMap &in, const string &k, int &i) |
helper for setAllDoIt | |
virtual int | setAllDoIt (const YCPMap &in) |
Protected Attributes | |
string | name |
string | comment |
int | read_by |
bool | dirty |
IniBase::IniBase | ( | int | rb | ) | [inline, protected] |
IniSection default ctor sets to -1. Why?
IniBase::IniBase | ( | const string & | n | ) | [inline, protected] |
Used by another IniSection ctor
virtual IniBase::~IniBase | ( | ) | [inline, virtual] |
virtual void IniBase::clean | ( | ) | [inline, virtual] |
set dirty flag to false
Reimplemented in IniSection.
References dirty.
Referenced by IniParser::write_helper().
virtual YCPMap IniBase::getAllDoIt | ( | ) | [inline, protected, virtual] |
Constructs a map of the fields, for Read (.all...)
Reimplemented in IniEntry, and IniSection.
References YCPMap::add(), comment, name, and read_by.
const char* IniBase::getComment | ( | ) | const [inline] |
References comment.
Referenced by IniSection::Dump(), IniSection::getMyValue(), and IniParser::write_helper().
bool IniBase::getMapInteger | ( | const YCPMap & | in, | |
const string & | k, | |||
int & | i | |||
) | [inline, protected] |
helper for setAllDoIt
References YCPElement::isNull(), YCPMap::value(), and y2error.
Referenced by setAllDoIt(), and IniSection::setAllDoIt().
bool IniBase::getMapString | ( | const YCPMap & | in, | |
const string & | k, | |||
string & | s | |||
) | [inline, protected] |
helper for setAllDoIt
References YCPElement::isNull(), YCPMap::value(), and y2error.
Referenced by IniEntry::setAllDoIt(), setAllDoIt(), and IniSection::setAllDoIt().
const char* IniBase::getName | ( | ) | const [inline] |
References name.
Referenced by IniSection::Dump(), IniParser::parse_helper(), IniParser::write(), and IniParser::write_helper().
int IniBase::getReadBy | ( | ) | const [inline] |
References read_by.
Referenced by IniSection::getMyValue(), IniParser::parse_helper(), and IniParser::write_helper().
void IniBase::init | ( | const string & | n, | |
const string & | c, | |||
int | rb | |||
) | [inline] |
void IniBase::initComment | ( | const string & | c | ) | [inline] |
void IniBase::initName | ( | const string & | c | ) | [inline] |
void IniBase::initReadBy | ( | const int | r | ) | [inline] |
virtual int IniBase::setAllDoIt | ( | const YCPMap & | in | ) | [inline, protected, virtual] |
Reimplemented in IniEntry, and IniSection.
References comment, dirty, getMapInteger(), getMapString(), name, and read_by.
void IniBase::setComment | ( | const string & | c | ) | [inline] |
changes and sets dirty flag
References comment, and dirty.
Referenced by IniSection::setMyValue(), and IniSection::setSectionProp().
void IniBase::setDirty | ( | ) | [inline] |
void IniBase::setName | ( | const string & | c | ) | [inline] |
void IniBase::setReadBy | ( | int | r | ) | [inline] |
changes and sets dirty flag
References dirty, and read_by.
Referenced by IniSection::setMyValue(), and IniSection::setSectionProp().
string IniBase::comment [protected] |
comment
Referenced by IniSection::Dump(), getAllDoIt(), getComment(), IniSection::getSectionProp(), init(), initComment(), IniSection::initSection(), setAllDoIt(), setComment(), and IniSection::setEndComment().
bool IniBase::dirty [protected] |
changed?
Referenced by clean(), IniSection::clean(), IniSection::delSection1(), IniSection::delValue1(), IniEntry::init(), init(), initComment(), initName(), IniEntry::initReadBy(), initReadBy(), IniSection::initSection(), IniEntry::initValue(), IniSection::isDirty(), setAllDoIt(), setComment(), setDirty(), IniSection::setMyValue(), setName(), setReadBy(), IniSection::setRewriteBy(), and IniEntry::setValue().
string IniBase::name [protected] |
name
Referenced by IniSection::Dump(), getAllDoIt(), getName(), IniSection::getSection(), init(), initName(), IniSection::initSection(), setAllDoIt(), and setName().
int IniBase::read_by [protected] |
index to params/sections in IniParser using which this item was read
Referenced by IniSection::findEndFromUp(), getAllDoIt(), getReadBy(), IniSection::getSectionProp(), init(), IniSection::initReadBy(), IniEntry::initReadBy(), initReadBy(), IniSection::initSection(), setAllDoIt(), and setReadBy().