paludis::PackageDepSpec Class Reference
[Dependency specifications]

#include <dep_spec.hh>

Inheritance diagram for paludis::PackageDepSpec:

paludis::StringDepSpec paludis::PrivateImplementationPattern< C_ > paludis::CloneUsingThis< Base_, Child_ > paludis::DepSpec paludis::Cloneable< Base_ > paludis::PrivateImplementationPattern< C_ > paludis::MetadataKeyHolder paludis::Cloneable< T_ > paludis::PrivateImplementationPattern< C_ >

List of all members.

Basic operations

 PackageDepSpec (const std::tr1::shared_ptr< const PackageDepSpecData > &)
 PackageDepSpec (const PackageDepSpec &)
 ~PackageDepSpec ()

Public Member Functions

std::tr1::shared_ptr< const
QualifiedPackageName
package_ptr () const
std::tr1::shared_ptr< const
PackageNamePart
package_name_part_ptr () const
std::tr1::shared_ptr< const
CategoryNamePart
category_name_part_ptr () const
std::tr1::shared_ptr< const
VersionRequirements
version_requirements_ptr () const
VersionRequirementsMode version_requirements_mode () const
std::tr1::shared_ptr< const
SlotRequirement > 
slot_requirement_ptr () const
std::tr1::shared_ptr< const
RepositoryName
in_repository_ptr () const
std::tr1::shared_ptr< const
InstallableToRepository
installable_to_repository_ptr () const
std::tr1::shared_ptr< const
RepositoryName
from_repository_ptr () const
std::tr1::shared_ptr< const
FSEntry
installed_at_path_ptr () const
std::tr1::shared_ptr< const
InstallableToPath
installable_to_path_ptr () const
std::tr1::shared_ptr< const
AdditionalPackageDepSpecRequirements
additional_requirements_ptr () const
std::tr1::shared_ptr< const
DepTag
tag () const
void set_tag (const std::tr1::shared_ptr< const DepTag > &s)
std::tr1::shared_ptr
< PackageDepSpec
without_additional_requirements () const
std::tr1::shared_ptr< const
PackageDepSpecData
data () const
virtual const PackageDepSpecas_package_dep_spec () const

Protected Member Functions

virtual void need_keys_added () const

Friends

std::ostream & operator<< (std::ostream &, const PackageDepSpec &)


Detailed Description

A PackageDepSpec represents a package name (for example, 'app-editors/vim'), possibly with associated version and SLOT restrictions.

A PackageDepSpec is implemented in terms of PackageDepSpecData. Individual repositories provide their own way of creating PackageDepSpec::Data that handle the native syntax for those repositories (e.g. CRAN uses "Blah (>= 1.23)" whilst E uses ">=cat/blah-1.23").

To create a PackageDepSpec from user input, use parse_user_package_dep_spec(), and for programmer input, use make_package_dep_spec().

Examples:

example_dep_spec.cc, and example_formatter.cc.


Constructor & Destructor Documentation

paludis::PackageDepSpec::PackageDepSpec ( const std::tr1::shared_ptr< const PackageDepSpecData > &   ) 

Constructor.

Clients will usually use either parse_user_package_dep_spec() or make_package_dep_spec() rather than calling this method directly. Repositories will define their own way of creating a PackageDepSpec.

Since:
0.26


Member Function Documentation

virtual void paludis::PackageDepSpec::need_keys_added (  )  const [protected, virtual]

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.

std::tr1::shared_ptr<const QualifiedPackageName> paludis::PackageDepSpec::package_ptr (  )  const

Fetch the package name (may be a zero pointer).

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const PackageNamePart> paludis::PackageDepSpec::package_name_part_ptr (  )  const

Fetch the package name part, if wildcarded, or a zero pointer otherwise.

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const CategoryNamePart> paludis::PackageDepSpec::category_name_part_ptr (  )  const

Fetch the category name part, if wildcarded, or a zero pointer otherwise.

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const VersionRequirements> paludis::PackageDepSpec::version_requirements_ptr (  )  const

Fetch the version requirements (may be a zero pointer).

Examples:
example_dep_spec.cc.

VersionRequirementsMode paludis::PackageDepSpec::version_requirements_mode (  )  const

Fetch the version requirements mode.

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const SlotRequirement> paludis::PackageDepSpec::slot_requirement_ptr (  )  const

Fetch the slot requirement (may be a zero pointer).

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const RepositoryName> paludis::PackageDepSpec::in_repository_ptr (  )  const

Fetch the in-repository requirement (may be a zero pointer).

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const InstallableToRepository> paludis::PackageDepSpec::installable_to_repository_ptr (  )  const

Fetch the installable-to-repository requirement (may be a zero pointer).

Since:
0.32
Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const RepositoryName> paludis::PackageDepSpec::from_repository_ptr (  )  const

Fetch the from-repository requirement (may be a zero pointer).

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const FSEntry> paludis::PackageDepSpec::installed_at_path_ptr (  )  const

Fetch the installed-at-path requirement (may be a zero pointer).

Since:
0.32
Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const InstallableToPath> paludis::PackageDepSpec::installable_to_path_ptr (  )  const

Fetch the installable-to-path requirement (may be a zero pointer).

Since:
0.32
Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements> paludis::PackageDepSpec::additional_requirements_ptr (  )  const

Fetch any additional requirements (may be a zero pointer).

Examples:
example_dep_spec.cc.

std::tr1::shared_ptr<const DepTag> paludis::PackageDepSpec::tag (  )  const

Fetch our tag.

void paludis::PackageDepSpec::set_tag ( const std::tr1::shared_ptr< const DepTag > &  s  ) 

Set our tag.

std::tr1::shared_ptr<PackageDepSpec> paludis::PackageDepSpec::without_additional_requirements (  )  const

Fetch a copy of ourself without additional requirements.

std::tr1::shared_ptr<const PackageDepSpecData> paludis::PackageDepSpec::data (  )  const

Access to our data.

virtual const PackageDepSpec* paludis::PackageDepSpec::as_package_dep_spec (  )  const [virtual]

Return us as a PackageDepSpec, or 0 if we are not a ConditionalDepSpec.

Reimplemented from paludis::DepSpec.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const PackageDepSpec  
) [friend]

A PackageDepSpec can be written to an ostream.


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