storage::AsciiFile Class Reference

#include <AsciiFile.h>

Inheritance diagram for storage::AsciiFile:

storage::ProcPart

List of all members.

Public Member Functions

 AsciiFile (bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig")
 AsciiFile (const string &Name_Cv, bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig")
 AsciiFile (const char *Name_Cv, bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig")
 ~AsciiFile ()
bool insertFile (AsciiFile &File_Cv, unsigned int BeforeLine_iv=0)
bool appendFile (AsciiFile &File_Cv)
bool insertFile (const string &Name_Cv, unsigned int BeforeLine_iv=0)
bool appendFile (const string &Name_Cv)
bool loadFile (const string &Name_Cv)
bool updateFile ()
bool saveToFile (const string &Name_Cv)
void append (const string &Line_Cv)
void append (const std::list< string > &Lines_Cv)
void insert (unsigned int Before_iv, const string &Line_Cv)
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 std::list< string > &Line_Cv)
const string & operator[] (unsigned int Index_iv) const
string & operator[] (unsigned int Index_iv)
int find (unsigned int Start_iv, const string &Pat_Cv) const
int find (unsigned int Start_iv, Regex &Pat_Cv) const
unsigned numLines () const
const string & fileName () const
unsigned differentLine (const AsciiFile &File_Cv) const
bool removeIfEmpty ()

Protected Member Functions

bool appendFile (const string &Name_Cv, std::vector< string > &Lines_Cr)
bool appendFile (AsciiFile &File_Cv, std::vector< string > &Lines_Cr)

Protected Attributes

bool BackupCreated_b
string BackupExtension_C
std::vector< string > Lines_C
string Name_C


Constructor & Destructor Documentation

AsciiFile::AsciiFile ( bool  CreateBackup_bv = false,
const char *  BackupExt_Cv = ".orig" 
)

AsciiFile::AsciiFile ( const string &  Name_Cv,
bool  CreateBackup_bv = false,
const char *  BackupExt_Cv = ".orig" 
)

References loadFile().

AsciiFile::AsciiFile ( const char *  Name_Cv,
bool  CreateBackup_bv = false,
const char *  BackupExt_Cv = ".orig" 
)

References loadFile().

AsciiFile::~AsciiFile (  ) 


Member Function Documentation

bool AsciiFile::insertFile ( AsciiFile File_Cv,
unsigned int  BeforeLine_iv = 0 
)

References appendFile(), DBG, Lines_C, and numLines().

bool AsciiFile::appendFile ( AsciiFile File_Cv  ) 

References DBG, Lines_C, and numLines().

Referenced by appendFile(), insertFile(), and loadFile().

bool AsciiFile::insertFile ( const string &  Name_Cv,
unsigned int  BeforeLine_iv = 0 
)

References appendFile(), and Lines_C.

bool AsciiFile::appendFile ( const string &  Name_Cv  ) 

References appendFile(), DBG, and Lines_C.

bool AsciiFile::loadFile ( const string &  Name_Cv  ) 

bool AsciiFile::updateFile (  ) 

bool AsciiFile::saveToFile ( const string &  Name_Cv  ) 

References DBG, and Lines_C.

void AsciiFile::append ( const string &  Line_Cv  ) 

void storage::AsciiFile::append ( const std::list< string > &  Lines_Cv  ) 

void AsciiFile::insert ( unsigned int  Before_iv,
const string &  Line_Cv 
)

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

void 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 std::list< string > &  Line_Cv 
)

const string & AsciiFile::operator[] ( unsigned int  Index_iv  )  const

References Lines_C.

string & AsciiFile::operator[] ( unsigned int  Index_iv  ) 

References Lines_C.

int AsciiFile::find ( unsigned int  Start_iv,
const string &  Pat_Cv 
) const

int storage::AsciiFile::find ( unsigned int  Start_iv,
Regex Pat_Cv 
) const

unsigned AsciiFile::numLines (  )  const

const string & AsciiFile::fileName (  )  const

References Name_C.

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

unsigned AsciiFile::differentLine ( const AsciiFile File_Cv  )  const

References numLines().

bool AsciiFile::removeIfEmpty (  ) 

References Lines_C, Name_C, and y2mil.

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

bool storage::AsciiFile::appendFile ( const string &  Name_Cv,
std::vector< string > &  Lines_Cr 
) [protected]

bool storage::AsciiFile::appendFile ( AsciiFile File_Cv,
std::vector< string > &  Lines_Cr 
) [protected]


Member Data Documentation

Referenced by updateFile().

Referenced by updateFile().

std::vector<string> storage::AsciiFile::Lines_C [protected]

string storage::AsciiFile::Name_C [protected]


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

Generated on Sun Jun 8 10:48:02 2008 for yast2-storage by  doxygen 1.5.5