aboutsummaryrefslogtreecommitdiff
path: root/build/name
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-13 10:29:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-13 10:29:25 +0200
commit534f9d8db025d58c9ce23f3b81a37e8c34386a27 (patch)
treee7d0c7871a7caf3b3e41c8d00548212f1ca7aa83 /build/name
parentb4ceb7b6aecb7492b28d7a0f6c53fa657a2cd2e5 (diff)
Add initial import support
Diffstat (limited to 'build/name')
-rw-r--r--build/name10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/name b/build/name
index f45930e..cf7427b 100644
--- a/build/name
+++ b/build/name
@@ -33,6 +33,16 @@ namespace build
name (std::string t, path d, std::string v)
: type (std::move (t)), dir (std::move (d)), value (std::move (v)) {}
+ bool
+ empty () const {type.empty () && dir.empty () && value.empty ();}
+
+ bool
+ simple () const {return type.empty () && dir.empty ();}
+
+ bool
+ directory () const
+ {return type.empty () && !dir.empty () && value.empty ();}
+
std::string type;
path dir;
std::string value;