|
paludis Version 3.0.2
The one true package mangler
|
Public Types | |
| typedef std::function< std::string(const std::string &)> | KeyFunction |
| typedef std::function< const std::shared_ptr< Repository >(Environment *const, const KeyFunction &)> | CreateFunction |
| typedef std::function< const std::shared_ptr< const RepositoryNameSet >(const Environment *const, const KeyFunction &)> | DependenciesFunction |
| typedef std::function< const RepositoryName(const Environment *const, const KeyFunction &)> | NameFunction |
| typedef std::function< int(const Environment *const, const KeyFunction &)> | ImportanceFunction |
| typedef WrappedForwardIterator< ConstIteratorTag, const std::string > | ConstIterator |
Public Member Functions | |
| const std::shared_ptr< Repository > | create (Environment *const env, const KeyFunction &key_function) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const RepositoryName | name (const Environment *const env, const KeyFunction &key_function) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| int | importance (const Environment *const env, const KeyFunction &key_function) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const std::shared_ptr< const RepositoryNameSet > | dependencies (const Environment *const env, const KeyFunction &key_function) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| void | add_repository_format (const std::shared_ptr< const Set< std::string > > &formats, const NameFunction &name_function, const ImportanceFunction &importance_function, const CreateFunction &create_function, const DependenciesFunction &dependencies_function) |
| ConstIterator | begin_keys () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| ConstIterator | end_keys () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| const Singleton & | operator= (const Singleton &)=delete |
Friends | |
| class | Singleton< RepositoryFactory > |
Additional Inherited Members | |
| static RepositoryFactory * | get_instance () PALUDIS_ATTRIBUTE((warn_unused_result)) |
| static void | destroy_instance () |
| void paludis::RepositoryFactory::add_repository_format | ( | const std::shared_ptr< const Set< std::string > > & | formats, |
| const NameFunction & | name_function, | ||
| const ImportanceFunction & | importance_function, | ||
| const CreateFunction & | create_function, | ||
| const DependenciesFunction & | dependencies_function ) |
Add a repository format.
| formats | must have at least one value, and no value may be specified more than once across all invocations. |
| name_function | is used to implement RepositoryFactory::name. |
| importance_function | is used to implement RepositoryFactory::importance. |
| create_function | is used to implement RepositoryFactory::create. |
| dependencies_function | is used to implement RepositoryFactory::dependencies. |
References PALUDIS_ATTRIBUTE, and PALUDIS_VISIBLE.
| const std::shared_ptr< Repository > paludis::RepositoryFactory::create | ( | Environment *const | env, |
| const KeyFunction & | key_function ) const |
Construct a given repository, or throw ConfigurationError.
If the repository to be created has dependencies upon another repository, that repository must have been created and added to the environment's package database first.
The returned repository is not added to the Environment's package database.
| key_function | should return the value for a given key. The 'format' key must return a value (e.g. 'ebuild'), which is used to select the return type. The 'repo_name' key's value should be the file that best describes the location of the file containing the repository config, if such a file exists. Other key names are repository defined, but typically include things like 'location' and 'sync'. |
References PALUDIS_ATTRIBUTE.
| const std::shared_ptr< const RepositoryNameSet > paludis::RepositoryFactory::dependencies | ( | const Environment *const | env, |
| const KeyFunction & | key_function ) const |
Fetch the names of any repositories depended upon by a particular repository.
References PALUDIS_ATTRIBUTE.
| int paludis::RepositoryFactory::importance | ( | const Environment *const | env, |
| const KeyFunction & | key_function ) const |
Find the importance of the repository that would be constructed if the supplied parameters were passed to RepositoryFactory::create.
References PALUDIS_ATTRIBUTE.
| const RepositoryName paludis::RepositoryFactory::name | ( | const Environment *const | env, |
| const KeyFunction & | key_function ) const |
Find the name of the repository that would be constructed if the supplied parameters were passed to RepositoryFactory::create.
References PALUDIS_ATTRIBUTE.