paludis  Version 2.6.0
Public Types | Public Member Functions | Friends | List of all members
paludis::OutputManagerFactory Class Reference
+ Inheritance diagram for paludis::OutputManagerFactory:

Public Types

typedef std::function< std::string(const std::string &)> KeyFunction
 
typedef std::function< const std::shared_ptr< OutputManager > const std::string &)> CreateChildFunction
 
typedef std::function< std::string(const std::string &pattern, const std::shared_ptr< const Map< std::string, std::string > > &extra_vars)> ReplaceVarsFunc
 
typedef std::function< const std::shared_ptr< OutputManager > const KeyFunction &, const CreateChildFunction &, const ReplaceVarsFunc &)> CreateFunction
 
typedef WrappedForwardIterator< ConstIteratorTag, const std::string > ConstIterator
 

Public Member Functions

const std::shared_ptr< OutputManagercreate (const KeyFunction &key_function, const CreateChildFunction &create_child_function, const ReplaceVarsFunc &replace_vars_func) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
void add_manager (const std::shared_ptr< const Set< std::string > > &managers, const CreateFunction &create_function)
 
ConstIterator begin_keys () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
ConstIterator end_keys () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
- Public Member Functions inherited from paludis::Singleton< OutputManagerFactory >
 Singleton ()=default
 
 Singleton (const Singleton &)=delete
 
const Singletonoperator= (const Singleton &)=delete
 

Friends

class Singleton< OutputManagerFactory >
 

Additional Inherited Members

- Static Public Member Functions inherited from paludis::Singleton< OutputManagerFactory >
static OutputManagerFactoryget_instance () PALUDIS_ATTRIBUTE((warn_unused_result))
 
static void destroy_instance ()
 

Member Function Documentation

void paludis::OutputManagerFactory::add_manager ( const std::shared_ptr< const Set< std::string > > &  managers,
const CreateFunction &  create_function 
)

Add a manager.

Parameters
managersmust have at least one value, and no value may be specified more than once across all invocations.
create_functionis used to implement OutputManagerFactory::create.
const std::shared_ptr<OutputManager> paludis::OutputManagerFactory::create ( const KeyFunction &  key_function,
const CreateChildFunction &  create_child_function,
const ReplaceVarsFunc &  replace_vars_func 
) const

Construct a given OutputManager, or throw ConfigurationError.

Parameters
key_functionshould return the value for a given key. The 'handler' key must return a value (e.g. 'standard'), which is used to select the return type. Other key names are manager defined, but typically include things like 'location' and 'keep_on_success'.
create_child_functionis used by, for example, TeeOutputManager to create child streams. Given a single string, this function returns the appropriate child.
replace_vars_funcshould replace '%{vars}' with their expanded forms. Variables include 'name', 'action' etc. This is used by, for example, FileOutputManager to allow the user to specify the output file names.

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