aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-12-24 20:13:34 (GMT)
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-10 07:22:06 (GMT)
commit470eced5567500dcce9020008f73ff4b397af46c (patch)
tree723b4b1fddda0bf7033e37a5d2ecb9dea5b6bf49
parentc397dd43d3d6b7d81817006734e5e1ab81ffcd19 (diff)
Add build_config::classes member
-rw-r--r--libbbot/build-config.cxx6
-rw-r--r--libbbot/build-config.hxx5
2 files changed, 11 insertions, 0 deletions
diff --git a/libbbot/build-config.cxx b/libbbot/build-config.cxx
index 2e6dfbc..7d174c4 100644
--- a/libbbot/build-config.cxx
+++ b/libbbot/build-config.cxx
@@ -30,6 +30,9 @@ namespace bbot
build_configs r;
tab_parser parser (is, name);
+ r.classes.push_back ("all");
+ r.classes.push_back ("default");
+
tab_fields tl;
while (!(tl = parser.next ()).empty ())
{
@@ -161,6 +164,9 @@ namespace bbot
j = r.class_inheritance_map.find (base);
}
+
+ if (c != "all" && c != "default")
+ r.classes.push_back (c);
}
else if (j->second != base && !base.empty ())
throw invalid_argument ("'" + c + "' new base '" + base +
diff --git a/libbbot/build-config.hxx b/libbbot/build-config.hxx
index 9396782..b5c5ade 100644
--- a/libbbot/build-config.hxx
+++ b/libbbot/build-config.hxx
@@ -37,6 +37,11 @@ namespace bbot
struct build_configs: std::vector<build_config>
{
+ // List of all configuration class names. Starts with the all and default
+ // classes. The rest follows in the same order as in the buildtab.
+ //
+ std::vector<std::string> classes;
+
// A map of derived class names to their bases.
//
std::map<std::string, std::string> class_inheritance_map;