paludis  Version 2.6.0
Public Member Functions | Protected Member Functions | List of all members
paludis::FakeRepositoryBase Class Reference

#include <fake_repository_base.hh>

+ Inheritance diagram for paludis::FakeRepositoryBase:

Public Member Functions

 ~FakeRepositoryBase ()
 
void add_category (const CategoryNamePart &)
 
void add_package (const QualifiedPackageName &)
 
std::shared_ptr< FakePackageIDadd_version (const QualifiedPackageName &, const VersionSpec &)
 
std::shared_ptr< FakePackageIDadd_version (const std::string &c, const std::string &p, const std::string &v)
 
virtual void invalidate ()
 
const Environmentenvironment () const
 
virtual std::shared_ptr< const PackageIDSequencepackage_ids (const QualifiedPackageName &, const RepositoryContentMayExcludes &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::shared_ptr< const QualifiedPackageNameSetpackage_names (const CategoryNamePart &, const RepositoryContentMayExcludes &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual std::shared_ptr< const CategoryNamePartSetcategory_names (const RepositoryContentMayExcludes &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool has_package_named (const QualifiedPackageName &, const RepositoryContentMayExcludes &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool has_category_named (const CategoryNamePart &, const RepositoryContentMayExcludes &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual bool sync (const std::string &, const std::string &, const std::shared_ptr< OutputManager > &) const
 
virtual HookResult perform_hook (const Hook &hook, const std::shared_ptr< OutputManager > &)
 
- Public Member Functions inherited from paludis::Repository
virtual ~Repository ()
 
 Repository (const Repository &)=delete
 
Repositoryoperator= (const Repository &)=delete
 
const RepositoryName name () const noexcept PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual const std::shared_ptr< const MetadataValueKey< std::string > > format_key () const =0
 
virtual const std::shared_ptr< const MetadataValueKey< FSPath > > location_key () const =0
 
virtual const std::shared_ptr< const MetadataValueKey< FSPath > > installed_root_key () const =0
 
virtual const std::shared_ptr< const MetadataCollectionKey< Map< std::string, std::string > > > sync_host_key () const =0
 
virtual std::shared_ptr< const CategoryNamePartSetunimportant_category_names (const RepositoryContentMayExcludes &repository_content_may_excludes) const
 
virtual const bool is_unimportant () const =0
 
virtual std::shared_ptr< const CategoryNamePartSetcategory_names_containing_package (const PackageNamePart &p, const RepositoryContentMayExcludes &repository_content_may_excludes) const
 
virtual bool some_ids_might_support_action (const SupportsActionTestBase &) const =0
 
virtual bool some_ids_might_not_be_masked () const =0
 
virtual const std::shared_ptr< const Set< std::string > > maybe_expand_licence_nonrecursively (const std::string &) const =0
 
virtual void regenerate_cache () const
 
virtual void purge_invalid_cache () const
 
virtual void can_drop_in_memory_cache () const
 
- Public Member Functions inherited from paludis::MetadataKeyHolder
MetadataConstIterator begin_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
MetadataConstIterator end_metadata () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
MetadataConstIterator find_metadata (const std::string &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 

Protected Member Functions

 FakeRepositoryBase (const Environment *const env, const RepositoryName &name, const RepositoryCapabilities &caps)
 
virtual void need_keys_added () const
 
- Protected Member Functions inherited from paludis::Repository
 Repository (const Environment *const, const RepositoryName &, const RepositoryCapabilities &)
 
- Protected Member Functions inherited from paludis::MetadataKeyHolder
virtual void add_metadata_key (const std::shared_ptr< const MetadataKey > &) const
 
virtual void clear_metadata_keys () const
 

Set methods

virtual void populate_sets () const
 

Additional Inherited Members

- Public Types inherited from paludis::MetadataKeyHolder
typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > MetadataConstIterator
 
- Public Attributes inherited from paludis::RepositoryCapabilities
NamedValue< n::destination_interface, RepositoryDestinationInterface * > destination_interface
 
NamedValue< n::environment_variable_interface, RepositoryEnvironmentVariableInterface * > environment_variable_interface
 
NamedValue< n::manifest_interface, RepositoryManifestInterface * > manifest_interface
 

Detailed Description

A FakeRepositoryBase is a Repository subclass whose subclasses are used for various test cases.

See also
FakeRepository
FakeInstalledRepository

Constructor & Destructor Documentation

paludis::FakeRepositoryBase::FakeRepositoryBase ( const Environment *const  env,
const RepositoryName name,
const RepositoryCapabilities caps 
)
protected

Constructor.

paludis::FakeRepositoryBase::~FakeRepositoryBase ( )

Destructor.

Member Function Documentation

void paludis::FakeRepositoryBase::add_category ( const CategoryNamePart )

Add a category.

void paludis::FakeRepositoryBase::add_package ( const QualifiedPackageName )

Add a package, and a category if necessary.

std::shared_ptr<FakePackageID> paludis::FakeRepositoryBase::add_version ( const QualifiedPackageName ,
const VersionSpec  
)

Add a version, and a package and category if necessary, and set some default values for its metadata, and return said metadata.

std::shared_ptr<FakePackageID> paludis::FakeRepositoryBase::add_version ( const std::string &  c,
const std::string &  p,
const std::string &  v 
)

Add a version, and a package and category if necessary, and set some default values for its metadata, and return said metadata (convenience overload taking strings).

virtual std::shared_ptr<const CategoryNamePartSet> paludis::FakeRepositoryBase::category_names ( const RepositoryContentMayExcludes repository_content_may_excludes) const
virtual

Fetch our category names.

Implements paludis::Repository.

const Environment* paludis::FakeRepositoryBase::environment ( ) const

Fetch our associated environment.

virtual bool paludis::FakeRepositoryBase::has_category_named ( const CategoryNamePart c,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
virtual

Do we have a category with the given name?

Since
0.59 takes repository_content_may_excludes

Implements paludis::Repository.

virtual bool paludis::FakeRepositoryBase::has_package_named ( const QualifiedPackageName q,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
virtual

Do we have a package in the given category with the given name?

Implements paludis::Repository.

virtual void paludis::FakeRepositoryBase::invalidate ( )
virtual

Invalidate any in memory cache.

Implements paludis::Repository.

virtual void paludis::FakeRepositoryBase::need_keys_added ( ) const
protectedvirtual

This method will be called before any of the metadata key iteration methods does its work. It can be used by subclasses to implement as-needed loading of keys.

Implements paludis::MetadataKeyHolder.

virtual std::shared_ptr<const PackageIDSequence> paludis::FakeRepositoryBase::package_ids ( const QualifiedPackageName p,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
virtual

Fetch our IDs.

Implements paludis::Repository.

virtual std::shared_ptr<const QualifiedPackageNameSet> paludis::FakeRepositoryBase::package_names ( const CategoryNamePart c,
const RepositoryContentMayExcludes repository_content_may_excludes 
) const
virtual

Fetch our package names.

Implements paludis::Repository.

virtual HookResult paludis::FakeRepositoryBase::perform_hook ( const Hook hook,
const std::shared_ptr< OutputManager > &  optional_output_manager 
)
virtual

Perform a hook.

Since
0.40 (previously in an interface)
0.53 takes optional_output_manager

Implements paludis::Repository.

virtual void paludis::FakeRepositoryBase::populate_sets ( ) const
virtual

Call Environment::add_set for every set we define.

Environment will call this method at most once, so no cache or check for repeats is required. Nothing else should call this method.

Since
0.40

Implements paludis::Repository.

virtual bool paludis::FakeRepositoryBase::sync ( const std::string &  source,
const std::string &  revision,
const std::shared_ptr< OutputManager > &   
) const
virtual

Sync, if necessary.

Returns
True if we synced successfully, false if we skipped sync.
Since
0.42 (previously in an interface)
0.55 takes a source (may be empty)
0.61 takes a revision (may be empty)

Implements paludis::Repository.


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