20 #ifndef PALUDIS_GUARD_PALUDIS_UTIL_POOL_HH 21 #define PALUDIS_GUARD_PALUDIS_UTIL_POOL_HH 1 23 #include <paludis/util/pool-fwd.hh> 31 class PoolKeysComparator;
33 template <
typename T_>
35 public Singleton<Pool<T_> >
37 friend class Singleton<Pool<T_> >;
45 template <
typename... Args_>
46 const std::shared_ptr<const T_> really_create(
const Args_ & ...) const
PALUDIS_ATTRIBUTE((warn_unused_result));
49 template <typename... Args_>
50 const
std::shared_ptr<const T_> create(const Args_ & ...) const
PALUDIS_ATTRIBUTE((warn_unused_result));
54 template <typename T1_>
55 const
std::shared_ptr<const T_> create(const T1_ &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
57 template <typename T1_, typename T2_>
58 const
std::shared_ptr<const T_> create(const T1_ &, const T2_ &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
60 template <typename T1_, typename T2_, typename T3_>
61 const
std::shared_ptr<const T_> create(const T1_ &, const T2_ &, const T3_ &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
63 template <typename T1_, typename T2_, typename T3_, typename T4_>
64 const
std::shared_ptr<const T_> create(const T1_ &, const T2_ &, const T3_ &, const T4_ &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
73 explicit PoolKey(
int tc);
75 virtual bool same_value(
const PoolKey &)
const = 0;
78 virtual ~PoolKey() = 0;
80 virtual std::size_t hash()
const = 0;
82 bool same_type_and_value(
const PoolKey &)
const;
85 template <
typename T_>
100 virtual std::size_t hash()
const;
102 bool same_value(
const PoolKey &)
const;
113 void add_one(
const std::shared_ptr<const PoolKey> &);
121 template <
typename Arg_,
typename... Args_>
122 void add(
const Arg_ &,
const Args_ & ...);
143 template <
typename T_>
Definition: about_metadata-fwd.hh:23
#define PALUDIS_ATTRIBUTE(x)
Definition: attributes.hh:53
#define PALUDIS_VISIBLE
Definition: attributes.hh:59