paludis  Version 1.4.2
fake_repository.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_REPOSITORY_HH
21 #define PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_REPOSITORY_HH 1
22 
24 #include <paludis/util/named_value.hh>
25 
26 namespace paludis
27 {
28  namespace n
29  {
30  typedef Name<struct name_environment> environment;
31  typedef Name<struct name_name> name;
32  }
33 
34  /**
35  * Options for FakeRepository.
36  *
37  * \ingroup grpfakerepository
38  * \see FakeRepository
39  * \since 0.26
40  * \nosubgrouping
41  */
43  {
46  };
47 
48  /**
49  * Fake repository for use in test cases.
50  *
51  * \ingroup grpfakerepository
52  */
54  public FakeRepositoryBase
55  {
56  private:
58 
59  public:
60  ///\name Basic operations
61  ///\{
62 
63  ///\since 0.26
65 
66  ~FakeRepository();
67 
68  ///\}
69 
70  virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
71 
72  virtual bool some_ids_might_not_be_masked() const;
73 
74  virtual const bool is_unimportant() const;
75 
76  virtual const std::shared_ptr<const Set<std::string> > maybe_expand_licence_nonrecursively(
77  const std::string &) const;
78 
79  /* Keys */
80 
81  virtual const std::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
82  virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
83  virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
84  virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
85  };
86 }
87 
88 #endif
Definition: pimp.hh:51
Definition: fake_repository.hh:53
Definition: named_value-fwd.hh:26
Definition: fake_repository.hh:42
Definition: action.hh:618
Definition: fake_repository_base.hh:45
#define PALUDIS_VISIBLE
Definition: attributes.hh:71