paludis Version 3.0.2
The one true package mangler
paludis::SetFile Class Reference

#include <set_file.hh>

Public Member Functions

const std::shared_ptr< const SetSpecTree > contents () const
void rewrite () const
bool add (const std::string &)
bool remove (const std::string &)

Basic operations

 SetFile (const SetFileParams &)
 SetFile (const SetFile &)=delete
SetFile & operator= (const SetFile &)=delete

Detailed Description

Shared code for files containing a package set.

Various set file formats are supported:

  • sft_paludis_conf, a line-based set file with prefixed entries
  • sft_paludis_bash, a bash script that outputs an sft_paludis_conf
  • sft_simple, a simple line-based file

The file can be modified if it is sft_paludis_conf or sft_simple.

Member Function Documentation

◆ add()

bool paludis::SetFile::add ( const std::string & )

Add an item to our contents, if it is not there already.

Since
0.49 returns whether any lines were added

◆ contents()

const std::shared_ptr< const SetSpecTree > paludis::SetFile::contents ( ) const

Fetch our contents.

◆ remove()

bool paludis::SetFile::remove ( const std::string & )

Remove any matching lines.

Since
0.48 returns whether any lines were removed

◆ rewrite()

void paludis::SetFile::rewrite ( ) const

Rewrite our contents.


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