aboutsummaryrefslogtreecommitdiff
path: root/build/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-15 11:59:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-15 11:59:58 +0200
commitad720fabd468974e3909f62a0f4e4e3cf0d03aef (patch)
tree8c6b7d851e42a42118b28488a9a3def8e86cd849 /build/variable
parentace1743f7f78bb13f99553d6e97ad1beecf1ba99 (diff)
Initial library support
Diffstat (limited to 'build/variable')
-rw-r--r--build/variable16
1 files changed, 11 insertions, 5 deletions
diff --git a/build/variable b/build/variable
index f994b58..6c14477 100644
--- a/build/variable
+++ b/build/variable
@@ -100,7 +100,7 @@ namespace build
explicit operator bool () const {return defined () && !null ();}
explicit operator value_ptr& () const {return *p;}
- scope_type* scope;
+ scope_type* scope; // If NULL, then this is a target variable.
// Get interface. See available specializations below.
//
@@ -119,6 +119,11 @@ namespace build
const value_proxy&
operator= (std::string) const;
+ // Append enother simple name to list_value.
+ //
+ const value_proxy&
+ operator+= (std::string) const;
+
const value_proxy&
operator= (dir_path) const;
@@ -218,7 +223,7 @@ namespace build
value_proxy
operator[] (const variable& v)
{
- return value_proxy (&base::operator[] (v), &scope_);
+ return value_proxy (&base::operator[] (v), scope_);
}
value_proxy
@@ -234,7 +239,7 @@ namespace build
return i != end ()
// @@ To do this properly we seem to need ro_value_proxy.
//
- ? value_proxy (&const_cast<value_ptr&> (i->second), &scope_)
+ ? value_proxy (&const_cast<value_ptr&> (i->second), scope_)
: value_proxy (nullptr, nullptr);
}
@@ -251,10 +256,11 @@ namespace build
}
explicit
- variable_map (scope& s): scope_ (s) {}
+ variable_map (scope* s): scope_ (s) {}
private:
- scope& scope_; // Scope to which this map belongs (and all its value).
+ scope* scope_; // Scope to which this map belongs or NULL if this
+ // is a target variable map.
};
}