aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target-type.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-11-08 08:16:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-11-08 08:16:29 +0200
commiteb000f6aa31f48b36ad2fcd09d14559f43106ca2 (patch)
tree27749777eae88ed886419f15a08b30e3f325eda7 /libbuild2/target-type.hxx
parent8edce3ecb1a0a779c3ef6b60dcde1df51635331a (diff)
Incorporate derived target types into generated header logic
Diffstat (limited to 'libbuild2/target-type.hxx')
-rw-r--r--libbuild2/target-type.hxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/libbuild2/target-type.hxx b/libbuild2/target-type.hxx
index 5798766..0e24e3a 100644
--- a/libbuild2/target-type.hxx
+++ b/libbuild2/target-type.hxx
@@ -189,7 +189,7 @@ namespace build2
file_map_.emplace (n, tt);
}
- private:
+ public:
struct target_type_ref
{
// Like reference_wrapper except it sometimes deletes the target type.
@@ -214,8 +214,17 @@ namespace build2
bool d_;
};
- map<string, target_type_ref> type_map_;
- map<string, reference_wrapper<const target_type>> file_map_;
+ using type_map = map<string, target_type_ref>;
+ using file_map = map<string, reference_wrapper<const target_type>>;
+
+ using type_iterator = type_map::const_iterator;
+
+ type_iterator type_begin () const {return type_map_.begin ();}
+ type_iterator type_end () const {return type_map_.end ();}
+
+ private:
+ type_map type_map_;
+ file_map file_map_;
};
}