aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/prerequisite.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/prerequisite.hxx')
-rw-r--r--libbuild2/prerequisite.hxx26
1 files changed, 1 insertions, 25 deletions
diff --git a/libbuild2/prerequisite.hxx b/libbuild2/prerequisite.hxx
index 9448fbc..476ed9d 100644
--- a/libbuild2/prerequisite.hxx
+++ b/libbuild2/prerequisite.hxx
@@ -13,36 +13,12 @@
#include <libbuild2/variable.hxx>
#include <libbuild2/target-key.hxx>
#include <libbuild2/diagnostics.hxx>
+#include <libbuild2/prerequisite-key.hxx>
#include <libbuild2/export.hxx>
namespace build2
{
- // Light-weight (by being shallow-pointing) prerequisite key, similar
- // to (and based on) target key.
- //
- // Note that unlike prerequisite, the key is not (necessarily) owned by a
- // target. So for the key we instead have the base scope of the target that
- // (would) own it. Note that we assume keys to be ephemeral enough for the
- // base scope to remain unchanged.
- //
- class prerequisite_key
- {
- public:
- using scope_type = build2::scope;
-
- const optional<project_name>& proj;
- target_key tk; // The .dir and .out members can be relative.
- const scope_type* scope; // Can be NULL if tk.dir is absolute.
-
- template <typename T>
- bool is_a () const {return tk.is_a<T> ();}
- bool is_a (const target_type& tt) const {return tk.is_a (tt);}
- };
-
- LIBBUILD2_SYMEXPORT ostream&
- operator<< (ostream&, const prerequisite_key&);
-
// Note that every data member except for the target is immutable (const).
//
class LIBBUILD2_SYMEXPORT prerequisite