#include <AsciiFile.h>

Public Member Functions | |
| AsciiFile (const char *name, bool remove_empty=false) | |
| AsciiFile (const string &name, bool remove_empty=false) | |
| string | name () const |
| bool | reload () |
| bool | save () |
| void | logContent () const |
| void | append (const string &Line_Cv) |
| void | append (const vector< string > &Lines_Cv) |
| void | insert (unsigned int Before_iv, const string &Line_Cv) |
| void | clear () |
| void | remove (unsigned int Start_iv, unsigned int Cnt_iv) |
| void | replace (unsigned int Start_iv, unsigned int Cnt_iv, const string &Line_Cv) |
| void | replace (unsigned int Start_iv, unsigned int Cnt_iv, const vector< string > &Line_Cv) |
| const string & | operator[] (unsigned int Index_iv) const |
| string & | operator[] (unsigned int Index_iv) |
| template<class Pred> | |
| int | find_if_idx (Pred pred) const |
| unsigned | numLines () const |
| vector< string > & | lines () |
| const vector< string > & | lines () const |
Protected Member Functions | |
| void | removeLastIf (string &Text_Cr, char Char_cv) const |
Protected Attributes | |
| const string | Name_C |
| const bool | remove_empty |
| vector< string > | Lines_C |
| storage::AsciiFile::AsciiFile | ( | const char * | name, | |
| bool | remove_empty = false | |||
| ) | [explicit] |
References reload().
| storage::AsciiFile::AsciiFile | ( | const string & | name, | |
| bool | remove_empty = false | |||
| ) | [explicit] |
References reload().
| string storage::AsciiFile::name | ( | ) | const [inline] |
| bool storage::AsciiFile::reload | ( | ) |
References storage::classic(), clear(), getline(), Lines_C, Name_C, y2err, and y2mil.
Referenced by AsciiFile().
| bool storage::AsciiFile::save | ( | ) |
References storage::classic(), Lines_C, Name_C, remove_empty, y2err, and y2mil.
Referenced by storage::EtcFstab::flush(), storage::EtcMdadm::removeEntry(), and storage::EtcMdadm::updateEntry().
| void storage::AsciiFile::logContent | ( | ) | const |
| void storage::AsciiFile::append | ( | const string & | Line_Cv | ) |
References Lines_C, and removeLastIf().
Referenced by append(), storage::EtcFstab::flush(), and insert().
| void storage::AsciiFile::append | ( | const vector< string > & | Lines_Cv | ) |
References append().
| void storage::AsciiFile::insert | ( | unsigned int | Before_iv, | |
| const string & | Line_Cv | |||
| ) |
References append(), Lines_C, and removeLastIf().
Referenced by storage::EtcFstab::flush(), and replace().
| void storage::AsciiFile::remove | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv | |||
| ) |
References Lines_C.
Referenced by storage::EtcFstab::flush(), storage::ProcParts::reload(), and storage::ProcMounts::reload().
| void storage::AsciiFile::replace | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv, | |||
| const string & | Line_Cv | |||
| ) |
References insert().
| void storage::AsciiFile::replace | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv, | |||
| const vector< string > & | Line_Cv | |||
| ) |
References insert().
| const string & storage::AsciiFile::operator[] | ( | unsigned int | Index_iv | ) | const |
References Lines_C.
| string & storage::AsciiFile::operator[] | ( | unsigned int | Index_iv | ) |
References Lines_C.
| int storage::AsciiFile::find_if_idx | ( | Pred | pred | ) | const [inline] |
References storage::find_if(), and Lines_C.
Referenced by storage::EtcFstab::findCrtab(), storage::EtcFstab::findFile(), and storage::EtcFstab::findPrefix().
| unsigned storage::AsciiFile::numLines | ( | ) | const [inline] |
References Lines_C.
| vector<string>& storage::AsciiFile::lines | ( | ) | [inline] |
References Lines_C.
Referenced by storage::ArchInfo::detect(), storage::EtcMdadm::findArray(), storage::getMajorDevices(), storage::InstallInfFile::getValue(), storage::SysconfigFile::getValue(), storage::ProcMdstat::ProcMdstat(), storage::ProcParts::reload(), storage::ProcMounts::reload(), storage::EtcMdadm::removeEntry(), storage::EtcMdadm::setArrayLine(), storage::EtcMdadm::setAutoLine(), and storage::EtcMdadm::setDeviceLine().
| const vector<string>& storage::AsciiFile::lines | ( | ) | const [inline] |
References Lines_C.
| void storage::AsciiFile::removeLastIf | ( | string & | Text_Cr, | |
| char | Char_cv | |||
| ) | const [protected] |
const string storage::AsciiFile::Name_C [protected] |
Referenced by logContent(), name(), reload(), and save().
const bool storage::AsciiFile::remove_empty [protected] |
Referenced by save().
vector<string> storage::AsciiFile::Lines_C [protected] |
Referenced by append(), clear(), find_if_idx(), insert(), lines(), logContent(), numLines(), operator[](), reload(), remove(), and save().
1.5.6