/* vim: set sw=4 sts=4 et foldmethod=syntax : *//* * Copyright (c) 2007 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General * Public License version 2, as published by the Free Software Foundation. * * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_PACKAGE_ID_HH#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_PACKAGE_ID_HH 1#include<paludis/package_id.hh>#include<paludis/metadata_key.hh>#include<paludis/mask.hh>#include<paludis/util/tr1_functional.hh>#include<paludis/util/set.hh>namespacepaludis{classFakeRepositoryBase;template<typenameC_>classPALUDIS_VISIBLEFakeMetadataCollectionKey:publicMetadataCollectionKey<C_>,privatePrivateImplementationPattern<FakeMetadataCollectionKey<C_>>{protected:typenamePrivateImplementationPattern<FakeMetadataCollectionKey<C_>>::ImpPtr&_imp;FakeMetadataCollectionKey(conststd::string&,conststd::string&,constMetadataKeyType,constPackageID*const,constEnvironment*const);public:~FakeMetadataCollectionKey();virtualconsttr1::shared_ptr<constC_>value()constPALUDIS_ATTRIBUTE((warn_unused_result));};classPALUDIS_VISIBLEFakeMetadataKeywordSetKey:publicFakeMetadataCollectionKey<KeywordNameSet>{public:FakeMetadataKeywordSetKey(conststd::string&,conststd::string&,conststd::string&,constMetadataKeyType,constPackageID*const,constEnvironment*const);voidset_from_string(conststd::string&);virtualstd::stringpretty_print_flat(constFormatter<KeywordName>&)constPALUDIS_ATTRIBUTE((warn_unused_result));};classPALUDIS_VISIBLEFakeMetadataIUseSetKey:publicFakeMetadataCollectionKey<IUseFlagSet>{public:FakeMetadataIUseSetKey(conststd::string&,conststd::string&,conststd::string&,constIUseFlagParseOptions&,constMetadataKeyType,constPackageID*const,constEnvironment*const);voidset_from_string(conststd::string&,constIUseFlagParseOptions&);virtualstd::stringpretty_print_flat(constFormatter<IUseFlag>&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::stringpretty_print_flat_with_comparison(constEnvironment*const,consttr1::shared_ptr<constPackageID>&,constFormatter<IUseFlag>&)constPALUDIS_ATTRIBUTE((warn_unused_result));};template<typenameC_>classPALUDIS_VISIBLEFakeMetadataSpecTreeKey:publicMetadataSpecTreeKey<C_>,privatePrivateImplementationPattern<FakeMetadataSpecTreeKey<C_>>{private:typenamePrivateImplementationPattern<FakeMetadataSpecTreeKey<C_>>::ImpPtr&_imp;public:FakeMetadataSpecTreeKey(conststd::string&,conststd::string&,conststd::string&,consttr1::function<consttr1::shared_ptr<consttypenameC_::ConstItem>(conststd::string&)>&,constMetadataKeyType);~FakeMetadataSpecTreeKey();virtualconsttr1::shared_ptr<consttypenameC_::ConstItem>value()constPALUDIS_ATTRIBUTE((warn_unused_result));voidset_from_string(conststd::string&);virtualstd::stringpretty_print(consttypenameC_::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::stringpretty_print_flat(consttypenameC_::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));};template<>classPALUDIS_VISIBLEFakeMetadataSpecTreeKey<FetchableURISpecTree>:publicMetadataSpecTreeKey<FetchableURISpecTree>,privatePrivateImplementationPattern<FakeMetadataSpecTreeKey<FetchableURISpecTree>>{private:PrivateImplementationPattern<FakeMetadataSpecTreeKey<FetchableURISpecTree>>::ImpPtr&_imp;public:FakeMetadataSpecTreeKey(conststd::string&,conststd::string&,conststd::string&,consttr1::function<consttr1::shared_ptr<constFetchableURISpecTree::ConstItem>(conststd::string&)>&,constMetadataKeyType);~FakeMetadataSpecTreeKey();virtualconsttr1::shared_ptr<constFetchableURISpecTree::ConstItem>value()constPALUDIS_ATTRIBUTE((warn_unused_result));voidset_from_string(conststd::string&);virtualstd::stringpretty_print(constFetchableURISpecTree::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::stringpretty_print_flat(constFetchableURISpecTree::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualconsttr1::shared_ptr<constURILabel>initial_label()constPALUDIS_ATTRIBUTE((warn_unused_result));};template<>classPALUDIS_VISIBLEFakeMetadataSpecTreeKey<DependencySpecTree>:publicMetadataSpecTreeKey<DependencySpecTree>,privatePrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree>>{private:PrivateImplementationPattern<FakeMetadataSpecTreeKey<DependencySpecTree>>::ImpPtr&_imp;public:FakeMetadataSpecTreeKey(conststd::string&,conststd::string&,conststd::string&,consttr1::function<consttr1::shared_ptr<constDependencySpecTree::ConstItem>(conststd::string&)>&,consttr1::shared_ptr<constDependencyLabelSequence>&,constMetadataKeyType);~FakeMetadataSpecTreeKey();virtualconsttr1::shared_ptr<constDependencySpecTree::ConstItem>value()constPALUDIS_ATTRIBUTE((warn_unused_result));voidset_from_string(conststd::string&);virtualstd::stringpretty_print(constDependencySpecTree::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::stringpretty_print_flat(constDependencySpecTree::ItemFormatter&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualconsttr1::shared_ptr<constDependencyLabelSequence>initial_labels()constPALUDIS_ATTRIBUTE((warn_unused_result));};classPALUDIS_VISIBLEFakeUnacceptedMask:publicUnacceptedMask,privatePrivateImplementationPattern<FakeUnacceptedMask>{public:FakeUnacceptedMask(constchar,conststd::string&,consttr1::shared_ptr<constMetadataKey>&);~FakeUnacceptedMask();charkey()const;conststd::stringdescription()const;consttr1::shared_ptr<constMetadataKey>unaccepted_key()const;};classPALUDIS_VISIBLEFakePackageID:publicPackageID,privatePrivateImplementationPattern<FakePackageID>,publictr1::enable_shared_from_this<FakePackageID>{private:PrivateImplementationPattern<FakePackageID>::ImpPtr&_imp;protected:virtualvoidneed_keys_added()const;virtualvoidneed_masks_added()const;public:FakePackageID(constEnvironment*conste,consttr1::shared_ptr<constFakeRepositoryBase>&,constQualifiedPackageName&,constVersionSpec&,conststd::string&eapi);~FakePackageID();virtualconststd::stringcanonical_form(constPackageIDCanonicalForm)const;virtualconstQualifiedPackageNamename()const;virtualconstVersionSpecversion()const;virtualconstSlotNameslot()const;virtualconsttr1::shared_ptr<constRepository>repository()const;virtualconsttr1::shared_ptr<constMetadataPackageIDKey>virtual_for_key()const;virtualconsttr1::shared_ptr<constMetadataCollectionKey<KeywordNameSet>>keywords_key()const;virtualconsttr1::shared_ptr<constMetadataCollectionKey<IUseFlagSet>>iuse_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<ProvideSpecTree>>provide_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<DependencySpecTree>>build_dependencies_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<DependencySpecTree>>run_dependencies_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<DependencySpecTree>>post_dependencies_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<DependencySpecTree>>suggested_dependencies_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<FetchableURISpecTree>>fetches_key()const;virtualconsttr1::shared_ptr<constMetadataSpecTreeKey<SimpleURISpecTree>>homepage_key()const;virtualconsttr1::shared_ptr<constMetadataStringKey>short_description_key()const;virtualconsttr1::shared_ptr<constMetadataStringKey>long_description_key()const;virtualconsttr1::shared_ptr<constMetadataContentsKey>contents_key()const;virtualconsttr1::shared_ptr<constMetadataTimeKey>installed_time_key()const;virtualconsttr1::shared_ptr<constMetadataStringKey>source_origin_key()const;virtualconsttr1::shared_ptr<constMetadataStringKey>binary_origin_key()const;virtualconsttr1::shared_ptr<constMetadataCollectionKey<PackageIDSequence>>contains_key()const;virtualconsttr1::shared_ptr<constMetadataPackageIDKey>contained_in_key()const;virtualconsttr1::shared_ptr<constMetadataFSEntryKey>fs_location_key()const;virtualconsttr1::shared_ptr<constMetadataSizeKey>size_of_download_required_key()const;virtualconsttr1::shared_ptr<constMetadataSizeKey>size_of_all_distfiles_key()const;consttr1::shared_ptr<constMetadataSpecTreeKey<LicenseSpecTree>>license_key()const;consttr1::shared_ptr<FakeMetadataKeywordSetKey>keywords_key();consttr1::shared_ptr<FakeMetadataIUseSetKey>iuse_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<ProvideSpecTree>>provide_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree>>build_dependencies_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree>>run_dependencies_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree>>post_dependencies_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<DependencySpecTree>>suggested_dependencies_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<FetchableURISpecTree>>fetches_key();consttr1::shared_ptr<FakeMetadataSpecTreeKey<SimpleURISpecTree>>homepage_key();voidset_slot(constSlotName&);virtualboolarbitrary_less_than_comparison(constPackageID&)const;virtualstd::size_textra_hash_value()const;virtualboolsupports_action(constSupportsActionTestBase&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualvoidperform_action(Action&)const;virtualboolbreaks_portage()constPALUDIS_ATTRIBUTE((warn_unused_result));virtualvoidinvalidate_masks()const;};}#endif