aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/target.cxx')
-rw-r--r--build/target.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/build/target.cxx b/build/target.cxx
index 6cd1fc9..ec96779 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -17,6 +17,18 @@ using namespace std;
namespace build
{
+ // target_type
+ //
+ bool target_type::
+ is_a (const type_index& id) const
+ {
+ for (const target_type* p (this); p != nullptr; p = p->base)
+ if (p->id == id)
+ return true;
+
+ return false;
+ }
+
// target_state
//
static const char* target_state_[] = {