From 8531776882b69aef9db276cbf9a18fd614bda9e5 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 23 Mar 2015 17:18:39 +1100 Subject: rtemstoolkit: Add an array operator to return recs in a section. --- rtemstoolkit/rld-config.h | 7 +++++++ 1 file changed, 7 insertions(+) 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; + } }; /** -- cgit v1.2.3