summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-03-23 17:18:39 +1100
committerChris Johns <chrisj@rtems.org>2015-03-23 17:18:39 +1100
commit8531776882b69aef9db276cbf9a18fd614bda9e5 (patch)
treed0d7ad77bf79ab72f912a78257af8be966e2014a
parentUpdate the version of waf. (diff)
downloadrtems-tools-8531776882b69aef9db276cbf9a18fd614bda9e5.tar.bz2
rtemstoolkit: Add an array operator to return recs in a section.
-rw-r--r--rtemstoolkit/rld-config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/rtemstoolkit/rld-config.h b/rtemstoolkit/rld-config.h
index 5afc7b1..84e17f8 100644
--- a/rtemstoolkit/rld-config.h
+++ b/rtemstoolkit/rld-config.h
@@ -70,6 +70,13 @@ namespace rld
bool single () const {
return items_.size () == 1;
}
+
+ /**
+ * Operator to get an item.
+ */
+ const std::string& operator [] (int index) const {
+ return items_[index].text;
+ }
};
/**