aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/package_or_block_dep_spec.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-12 20:54:16 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-12 20:54:16 +0100
commit3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1 (patch)
tree7d96e38b8977e5d2cfc7879b97e622a0f5d9fd35 /paludis/resolver/package_or_block_dep_spec.hh
parentd0f0c51bc9f2e32436c17bb7ec1d27844d2b852e (diff)
downloadpaludis-3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1.tar.gz
paludis-3932fa2e349b8f673d60a9a8dfe4d34bdc722fa1.tar.xz
Give PackageOrBlockDepSpec its own header
Diffstat (limited to 'paludis/resolver/package_or_block_dep_spec.hh')
-rw-r--r--paludis/resolver/package_or_block_dep_spec.hh55
1 files changed, 55 insertions, 0 deletions
diff --git a/paludis/resolver/package_or_block_dep_spec.hh b/paludis/resolver/package_or_block_dep_spec.hh
new file mode 100644
index 000000000..48a35de60
--- /dev/null
+++ b/paludis/resolver/package_or_block_dep_spec.hh
@@ -0,0 +1,55 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2010 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_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_HH
+#define PALUDIS_GUARD_PALUDIS_RESOLVER_PACKAGE_OR_BLOCK_DEP_SPEC_HH 1
+
+#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
+#include <paludis/util/named_value.hh>
+#include <paludis/dep_spec.hh>
+#include <paludis/serialise-fwd.hh>
+
+namespace paludis
+{
+ namespace n
+ {
+ typedef Name<struct if_package_name> if_package;
+ typedef Name<struct if_block_name> if_block;
+ }
+
+ namespace resolver
+ {
+ struct PackageOrBlockDepSpec
+ {
+ NamedValue<n::if_block, std::tr1::shared_ptr<BlockDepSpec> > if_block;
+ NamedValue<n::if_package, std::tr1::shared_ptr<PackageDepSpec> > if_package;
+
+ PackageOrBlockDepSpec(const BlockDepSpec &);
+ PackageOrBlockDepSpec(const PackageDepSpec &);
+
+ void serialise(Serialiser &) const;
+
+ static PackageOrBlockDepSpec deserialise(
+ Deserialisation & d,
+ const std::tr1::shared_ptr<const PackageID> & for_id) PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+ }
+}
+
+#endif