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

#include <fake_package_id.hh>

+ Inheritance diagram for paludis::FakePackageID:

Public Member Functions

virtual const std::string canonical_form (const PackageIDCanonicalForm) const
 
virtual const QualifiedPackageName name () const
 
virtual const VersionSpec version () const
 
virtual const RepositoryName repository_name () const
 
virtual PackageDepSpec uniquely_identifying_spec () const
 
virtual const std::shared_ptr< const MetadataValueKey< Slot > > slot_key () const
 
virtual const std::shared_ptr< const MetadataCollectionKey< KeywordNameSet > > keywords_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > dependencies_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > build_dependencies_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > run_dependencies_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< DependencySpecTree > > post_dependencies_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< FetchableURISpecTree > > fetches_key () const
 
virtual const std::shared_ptr< const MetadataSpecTreeKey< SimpleURISpecTree > > homepage_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< std::string > > short_description_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< std::string > > long_description_key () const
 
virtual const std::shared_ptr< const MetadataTimeKeyinstalled_time_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< FSPath > > fs_location_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< long > > size_of_download_required_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< long > > size_of_all_distfiles_key () const
 
virtual const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > behaviours_key () const
 
virtual const std::shared_ptr< const MetadataCollectionKey< Set< std::string > > > from_repositories_key () const
 
virtual const std::shared_ptr< const MetadataValueKey< std::shared_ptr< const Choices > > > choices_key () const
 
const std::shared_ptr< const MetadataSpecTreeKey< LicenseSpecTree > > license_key () const
 
char use_expand_separator () const
 
virtual bool arbitrary_less_than_comparison (const PackageID &) const
 
virtual std::size_t extra_hash_value () const
 
virtual bool supports_action (const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result))
 
virtual void perform_action (Action &) const
 
virtual const std::shared_ptr< const Contentscontents () const
 
- Public Member Functions inherited from paludis::PackageID
virtual void can_drop_in_memory_cache () const
 
MasksConstIterator begin_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
MasksConstIterator end_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
bool masked () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
OverriddenMasksConstIterator begin_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
OverriddenMasksConstIterator end_overridden_masks () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
 PackageID ()
 
virtual ~PackageID ()=0
 
std::size_t hash () const PALUDIS_ATTRIBUTE((warn_unused_result))
 
- 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

virtual void need_keys_added () const
 
virtual void need_masks_added () const
 
- Protected Member Functions inherited from paludis::PackageID
virtual void add_mask (const std::shared_ptr< const Mask > &) const
 
virtual void add_overridden_mask (const std::shared_ptr< const OverriddenMask > &) const
 
- 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
 

Basic operations

 FakePackageID (const Environment *const e, const RepositoryName &, const QualifiedPackageName &, const VersionSpec &)
 
 ~FakePackageID ()
 

Modifiable keys

const std::shared_ptr< FakeMetadataKeywordSetKeykeywords_key ()
 
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > build_dependencies_key ()
 
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > run_dependencies_key ()
 
const std::shared_ptr< FakeMetadataSpecTreeKey< DependencySpecTree > > post_dependencies_key ()
 
const std::shared_ptr< FakeMetadataSpecTreeKey< FetchableURISpecTree > > fetches_key ()
 
const std::shared_ptr< FakeMetadataSpecTreeKey< SimpleURISpecTree > > homepage_key ()
 
const std::shared_ptr< FakeMetadataChoicesKeychoices_key ()
 
const std::shared_ptr< Set< std::string > > behaviours_set ()
 
void set_slot (const SlotName &)
 
void set_slot (const SlotName &, const SlotName &)
 

Additional Inherited Members

- Public Types inherited from paludis::PackageID
typedef WrappedForwardIterator< MasksConstIteratorTag, const std::shared_ptr< const Mask > > MasksConstIterator
 
typedef WrappedForwardIterator< OverriddenMasksConstIteratorTag, const std::shared_ptr< const OverriddenMask > > OverriddenMasksConstIterator
 
- Public Types inherited from paludis::MetadataKeyHolder
typedef WrappedForwardIterator< MetadataConstIteratorTag, const std::shared_ptr< const MetadataKey > > MetadataConstIterator
 

Detailed Description

A PackageID in a FakeRepository or a FakeInstalledRepository.

Various keys can be modified.

Since
0.26

Member Function Documentation

virtual bool paludis::FakePackageID::arbitrary_less_than_comparison ( const PackageID ) const
virtual

Perform an arbitrary less than comparison on another PackageID.

Used by PackageIDSetComparator and operator==. This function should not be used by anything else.

This function will only be called if the other PackageID has the same name, version and repository as this. If this is not enough to uniquely identify an ID (e.g. if there is an affix, or if multiple slots per version are allowed), then this function's implementation must differentiate appropriately.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > paludis::FakePackageID::behaviours_key ( ) const
virtual

The behaviours_key may contain strings indicating that the PackageID behaves in a particular way.

Strings with recognised meanings currently are:

  • "transient", saying that an installed ID's origin is expected not to exist
  • "used", saying that an installed ID should not be treated as unused
  • "unbinaryable", saying that we should be excluded from requests to create a binary
  • "unchrootable", saying that we should be excluded from requests to install to a chroot
  • "binary", saying that we are already a binary package
Since
0.48

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::FakePackageID::build_dependencies_key ( ) const
virtual

The build_dependencies_key, if non-zero, indicates a package's build-time dependencies.

Implements paludis::PackageID.

virtual const std::string paludis::FakePackageID::canonical_form ( const PackageIDCanonicalForm  ) const
virtual

Return our canonical string representation.

This method (which is called by paludis::stringify()) should be used when outputting a PackageID or a PackageID's version. Some repositories need to display additional information to identify a package, so outputting merely the name and / or version may be insufficient.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > paludis::FakePackageID::choices_key ( ) const
virtual

The choices_key, if non-zero, contains zero or more MetadataValueKey<std::shared_ptr<const Choice> > child keys holding choice information for this ID.

Implements paludis::PackageID.

virtual const std::shared_ptr<const Contents> paludis::FakePackageID::contents ( ) const
virtual

The contents, if non-zero, contains the contents of a package. For installed packages, this means the files installed; for installable packages, this means the files that will be installed (if known, which it may be for some binary packages).

Since
0.66

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::FakePackageID::dependencies_key ( ) const
virtual

The dependencies_key, if non-zero, provides all of a package's dependencies.

If dependencies_key is used, the client should ignore build_dependencies_key, run_dependencies_key and post_dependencies_key.

Repositories that support this key must also provide the old split out keys.

Since
0.41

Implements paludis::PackageID.

virtual std::size_t paludis::FakePackageID::extra_hash_value ( ) const
virtual

Provide any additional hash information for a PackageID.

The standard PackageID hash incorporates the repository name, the package name and the version of the package. If this function is defined, its value is also used when determining a hash. This can provide increased performance if a repository uses affixes or multiple slots per version.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<FetchableURISpecTree> > paludis::FakePackageID::fetches_key ( ) const
virtual

The fetches_key, if non-zero, indicates files that have to be fetched in order to install a package.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > paludis::FakePackageID::from_repositories_key ( ) const
virtual

The from_repositories key, if non-zero, contains the set of repositories that the ID is 'from'. An ID can be 'from' multiple repositories if, for example, it was built via a binary package.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataValueKey<FSPath> > paludis::FakePackageID::fs_location_key ( ) const
virtual

The fs_location_key, if non-zero, indicates the filesystem location (for example, the ebuild file or VDB directory) that best describes the location of a PackageID.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > paludis::FakePackageID::homepage_key ( ) const
virtual

The homepage_key, if non-zero, describes a package's homepages.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataTimeKey> paludis::FakePackageID::installed_time_key ( ) const
virtual

The installed_time_key, if non-zero, contains the time a package was installed. It affects dependency resolution if DepList is using dl_reinstall_scm_daily or dl_reinstall_scm_weekly.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataCollectionKey<KeywordNameSet> > paludis::FakePackageID::keywords_key ( ) const
virtual

The keywords_key, if non-zero, is used by FindUnusedPackagesTask to determine whether a package is unused.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataValueKey<std::string> > paludis::FakePackageID::long_description_key ( ) const
virtual

The long_description_key, if non-zero, provides a long description of a package.

Implements paludis::PackageID.

virtual const QualifiedPackageName paludis::FakePackageID::name ( ) const
virtual

What is our package name?

Use canonical_form instead for outputting.

Implements paludis::PackageID.

virtual void paludis::FakePackageID::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 void paludis::FakePackageID::need_masks_added ( ) const
protectedvirtual

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

Implements paludis::PackageID.

virtual void paludis::FakePackageID::perform_action ( Action ) const
virtual

Perform the specified action.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::FakePackageID::post_dependencies_key ( ) const
virtual

The post_dependencies_key, if non-zero, indicates a package's post-merge dependencies.

Implements paludis::PackageID.

virtual const RepositoryName paludis::FakePackageID::repository_name ( ) const
virtual

What is our owning repository?

Since
0.58

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > paludis::FakePackageID::run_dependencies_key ( ) const
virtual

The run_dependencies_key, if non-zero, indicates a package's run-time dependencies.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataValueKey<std::string> > paludis::FakePackageID::short_description_key ( ) const
virtual

The short_description_key, if non-zero, provides a short (no more than a few hundred characters) description of a package.

Implements paludis::PackageID.

virtual const std::shared_ptr<const MetadataValueKey<Slot> > paludis::FakePackageID::slot_key ( ) const
virtual

The slot, if specified, controls whether the package can be installed in parallel with other versions of the same package.

Since
0.36

Implements paludis::PackageID.

virtual bool paludis::FakePackageID::supports_action ( const SupportsActionTestBase ) const
virtual

Do we support a particular action?

Attempting to call perform_action with an unsupported action type will lead to an UnsupportedActionError. However, in performance critical code and in situations where creating a full Action subclass instance is non-trivial, supports_action is much simpler.

Implements paludis::PackageID.

virtual PackageDepSpec paludis::FakePackageID::uniquely_identifying_spec ( ) const
virtual

Return a PackageDepSpec that uniquely identifies us.

When stringified, can be turned back into an equivalent unique PackageDepSpec by using parse_user_package_dep_spec.

Since
0.36

Implements paludis::PackageID.

virtual const VersionSpec paludis::FakePackageID::version ( ) const
virtual

What is our package version?

Use canonical_form instead for outputting.

Implements paludis::PackageID.


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