[rtems-tools commit] rtemstoolkit: Add an array operator to return recs in a section.

Chris Johns chrisj at rtems.org
Mon Mar 23 06:24:57 UTC 2015


Module:    rtems-tools
Branch:    master
Commit:    8531776882b69aef9db276cbf9a18fd614bda9e5
Changeset: http://git.rtems.org/rtems-tools/commit/?id=8531776882b69aef9db276cbf9a18fd614bda9e5

Author:    Chris Johns <chrisj at rtems.org>
Date:      Mon Mar 23 17:18:39 2015 +1100

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;
+      }
     };
 
     /**



More information about the vc mailing list