paludis  Version 2.6.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
paludis::KeyValueConfigFile Class Reference

#include <config_file.hh>

+ Inheritance diagram for paludis::KeyValueConfigFile:

Public Types

typedef std::function< std::string(const KeyValueConfigFile &, const std::string &)> DefaultFunction
 
typedef std::function< std::string(const KeyValueConfigFile &, const std::string &var, const std::string &old_value, const std::string &new_value)> TransformationFunction
 

Public Member Functions

std::string get (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
const KeyValueConfigFileOptionsoptions () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
const DefaultFunction & default_function () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
const TransformationFunction & transformation_function () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
- Public Member Functions inherited from paludis::ConfigFile
virtual ~ConfigFile ()=0
 

Static Public Member Functions

static std::string no_defaults (const KeyValueConfigFile &, const std::string &)
 
static std::string no_transformation (const KeyValueConfigFile &, const std::string &, const std::string &, const std::string &)
 

Basic operations

 KeyValueConfigFile (const Source &, const KeyValueConfigFileOptions &, const DefaultFunction &, const TransformationFunction &)
 
 ~KeyValueConfigFile ()
 

Iterate over our keys

typedef WrappedForwardIterator< ConstIteratorTag, const std::pair< const std::string, std::string > > ConstIterator
 
ConstIterator begin () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
ConstIterator end () const PALUDIS_ATTRIBUTE((warn_unused_result))
 

Detailed Description

A key=value configuration file.

Various syntax options are available, and are controlled by KeyValueConfigFileOptions:

Constructor & Destructor Documentation

paludis::KeyValueConfigFile::KeyValueConfigFile ( const Source ,
const KeyValueConfigFileOptions ,
const DefaultFunction &  ,
const TransformationFunction &   
)

Constructor.

Since
0.28

Member Function Documentation

std::string paludis::KeyValueConfigFile::get ( const std::string &  ) const

Fetch the value for a particular key.


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