paludis::EnvironmentFactory Class Reference
[Environment]

#include <environment_factory.hh>

Inheritance diagram for paludis::EnvironmentFactory:

paludis::PrivateImplementationPattern< C_ >

List of all members.

Public Types

typedef std::tr1::function
< const std::tr1::shared_ptr
< Environment >const
std::string &)> 
CreateFunction

Public Member Functions

const std::tr1::shared_ptr
< Environment
create (const std::string &spec) const PALUDIS_ATTRIBUTE((warn_unused_result))
void add_environment_format (const std::tr1::shared_ptr< const Set< std::string > > &formats, const CreateFunction &create_function)

Friends

class InstantiationPolicy< EnvironmentFactory, instantiation_method::SingletonTag >


Detailed Description

Factory for Environment creation.

Since:
0.30

Member Function Documentation

const std::tr1::shared_ptr<Environment> paludis::EnvironmentFactory::create ( const std::string &  spec  )  const

Create an Environment subclass from the specified spec.

Parameters:
spec The environment spec, which is in the form env:suffix, where env is the string representing an Environment's kind (e.g. "paludis", "portage") and suffix is the information to pass to the constructing function (for paludis, a config suffix, and for portage, a location). If env is not specified, it defaults to trying paludis then portage. If suffix is not specified, it defaults to an empty string. If no colon is present, the supplied string is taken as env (this includes an empty string).

void paludis::EnvironmentFactory::add_environment_format ( const std::tr1::shared_ptr< const Set< std::string > > &  formats,
const CreateFunction &  create_function 
)

Add a repository format.

Parameters:
formats must have at least one value, and no value may be specified more than once across all invocations.
create_function is used to implement EnvironmentFactory::create.


The documentation for this class was generated from the following file:
Generated on Mon Sep 21 10:36:10 2009 for paludis by  doxygen 1.5.4