storage::AsciiFile Class Reference

#include <AsciiFile.h>

Inheritance diagram for storage::AsciiFile:

storage::InstallInfFile storage::SysconfigFile

List of all members.

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


Constructor & Destructor Documentation

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().


Member Function Documentation

string storage::AsciiFile::name (  )  const [inline]

References Name_C.

Referenced by storage::EtcFstab::findPrefix().

bool storage::AsciiFile::reload (  ) 

References storage::classic(), clear(), getline(), Lines_C, Name_C, y2err, and y2mil.

Referenced by AsciiFile().

bool storage::AsciiFile::save (  ) 

void storage::AsciiFile::logContent (  )  const

References Lines_C, Name_C, and y2mil.

Referenced by storage::ProcMdstat::ProcMdstat().

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::clear (  ) 

References Lines_C.

Referenced by reload().

void storage::AsciiFile::remove ( unsigned int  Start_iv,
unsigned int  Cnt_iv 
)

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.

template<class Pred>
int storage::AsciiFile::find_if_idx ( Pred  pred  )  const [inline]

unsigned storage::AsciiFile::numLines (  )  const [inline]

References Lines_C.

vector<string>& storage::AsciiFile::lines (  )  [inline]

const vector<string>& storage::AsciiFile::lines (  )  const [inline]

References Lines_C.

void storage::AsciiFile::removeLastIf ( string &  Text_Cr,
char  Char_cv 
) const [protected]

Referenced by append(), and insert().


Member Data Documentation

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]


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

Generated on Mon Feb 6 10:42:57 2012 for yast2-storage by  doxygen 1.5.6