aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/destinations.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-19 20:34:56 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-19 20:34:56 +0100
commit99f4d0b5d3262844f1f4c9f1461d966a88e7b391 (patch)
tree1085f6dad07c0225300c53ac54e55d677dd81cc9 /paludis/resolver/destinations.hh
parent673b696a13c3cf7049df4b8810397aedaa1c3d14 (diff)
downloadpaludis-99f4d0b5d3262844f1f4c9f1461d966a88e7b391.tar.gz
paludis-99f4d0b5d3262844f1f4c9f1461d966a88e7b391.tar.xz
Move destination types back into a container
Diffstat (limited to 'paludis/resolver/destinations.hh')
-rw-r--r--paludis/resolver/destinations.hh26
1 files changed, 20 insertions, 6 deletions
diff --git a/paludis/resolver/destinations.hh b/paludis/resolver/destinations.hh
index 8c327dc..8c1c10f 100644
--- a/paludis/resolver/destinations.hh
+++ b/paludis/resolver/destinations.hh
@@ -22,7 +22,9 @@
#include <paludis/resolver/destinations-fwd.hh>
#include <paludis/resolver/serialise-fwd.hh>
+#include <paludis/resolver/destination_types-fwd.hh>
#include <paludis/util/named_value.hh>
+#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/name.hh>
#include <paludis/package_id-fwd.hh>
#include <tr1/memory>
@@ -33,7 +35,6 @@ namespace paludis
{
struct replacing;
struct repository;
- struct slash;
}
namespace resolver
@@ -49,16 +50,29 @@ namespace paludis
Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
};
- struct Destinations
+ class PALUDIS_VISIBLE Destinations :
+ private PrivateImplementationPattern<Destinations>
{
- NamedValue<n::slash, std::tr1::shared_ptr<Destination> > slash;
+ public:
+ Destinations();
+ ~Destinations();
- void serialise(Serialiser &) const;
+ const std::tr1::shared_ptr<const Destination> by_type(const DestinationType)
+ const PALUDIS_ATTRIBUTE((warn_unused_result));
- static const std::tr1::shared_ptr<Destinations> deserialise(
- Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
+ void set_destination_type(const DestinationType, const std::tr1::shared_ptr<const Destination> &);
+
+ void serialise(Serialiser &) const;
+
+ static const std::tr1::shared_ptr<Destinations> deserialise(
+ Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
+
+#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
+ extern template class PrivateImplementationPattern<resolver::Destinations>;
+#endif
+
}
#endif