yast2-core
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IniBase Class Reference

#include <IniFile.h>

Inheritance diagram for IniBase:
IniEntry IniSection

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 More...
 
bool getMapInteger (const YCPMap &in, const string &k, int &i)
 helper for setAllDoIt More...
 
virtual int setAllDoIt (const YCPMap &in)
 

Protected Attributes

string name
 
string comment
 
int read_by
 
bool dirty
 

Detailed Description

Base class of IniEntry and IniSection. This keeps name, its comment and index of rule it was read by. set* functions are used from ycp code to change values. init* functions are set when reading file from disk

Constructor & Destructor Documentation

IniBase::IniBase ( int  rb)
inlineprotected

IniSection default ctor sets to -1. Why?

IniBase::IniBase ( const string &  n)
inlineprotected

Used by another IniSection ctor

virtual IniBase::~IniBase ( )
inlinevirtual

Member Function Documentation

virtual void IniBase::clean ( )
inlinevirtual

set dirty flag to false

Reimplemented in IniSection.

References dirty.

Referenced by IniParser::write_helper().

virtual YCPMap IniBase::getAllDoIt ( )
inlineprotectedvirtual

Constructs a map of the fields, for Read (.all...)

Reimplemented in IniSection, and IniEntry.

References YCPMap::add(), comment, name, and read_by.

Referenced by IniEntry::getAllDoIt(), and IniSection::getAllDoIt().

const char* IniBase::getComment ( ) const
inline
bool IniBase::getMapInteger ( const YCPMap in,
const string &  k,
int &  i 
)
inlineprotected

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 
)
inlineprotected

helper for setAllDoIt

References YCPElement::isNull(), YCPMap::value(), and y2error.

Referenced by setAllDoIt(), IniEntry::setAllDoIt(), and IniSection::setAllDoIt().

const char* IniBase::getName ( ) const
inline
int IniBase::getReadBy ( ) const
inline
void IniBase::init ( const string &  n,
const string &  c,
int  rb 
)
inline

changes values only if not dirty

References comment, dirty, name, and read_by.

Referenced by IniEntry::init().

void IniBase::initComment ( const string &  c)
inline

changes value only if not dirty

References comment, and dirty.

void IniBase::initName ( const string &  c)
inline

changes value only if not dirty

References dirty, and name.

void IniBase::initReadBy ( const int  r)
inline

changes value only if not dirty

References dirty, and read_by.

virtual int IniBase::setAllDoIt ( const YCPMap in)
inlineprotectedvirtual
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

sets dirty flag

References dirty.

Referenced by IniAgent::Write().

void IniBase::setName ( const string &  c)
inline

changes and sets dirty flag

References dirty, and name.

Referenced by IniSection::setMyValue().

void IniBase::setReadBy ( int  r)
inline

changes and sets dirty flag

References dirty, and read_by.

Referenced by IniSection::setMyValue(), and IniSection::setSectionProp().

Member Data Documentation

string IniBase::comment
protected
bool IniBase::dirty
protected
string IniBase::name
protected
int IniBase::read_by
protected

The documentation for this class was generated from the following file:

Generated on a sunny day for yast2-core by doxygen 1.8.6