From 77272458e7a8906d871b241b5385bbd0f783d861 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 30 Jul 2009 08:36:12 +0000 Subject: Removed the term 'course' everywhere, and replaced it by 'template'. This reduced/simplified the Template class structure a bit. --- server/src/macrotool_dump.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'server/src/macrotool_dump.cc') diff --git a/server/src/macrotool_dump.cc b/server/src/macrotool_dump.cc index 3f9cfd7..71bc690 100644 --- a/server/src/macrotool_dump.cc +++ b/server/src/macrotool_dump.cc @@ -89,14 +89,14 @@ static std::map macroList() std::vector templatefiles = getTemplates(); std::vector::iterator tfs = templatefiles.begin(); while(tfs != templatefiles.end()) { - std::string course = tfs->substr(0, tfs->length() - 4); - TemplateParser parser(course); + std::string templ = tfs->substr(0, tfs->length() - 4); + TemplateParser parser(templ); parser.parse(); Template *t = parser.getTemplate(); - std::vector::iterator ms = t->course.macros.begin(); - while(ms != t->course.macros.end()) { + std::vector::iterator ms = t->macros.begin(); + while(ms != t->macros.end()) { if(ms->attributes.find("header") == ms->attributes.end()) - macros[ms->attributes["name"]].templates.insert(course); + macros[ms->attributes["name"]].templates.insert(templ); ms++; } tfs++; @@ -154,20 +154,20 @@ static std::map templateList() std::vector templatefiles = getTemplates(); std::vector::iterator tfs = templatefiles.begin(); while(tfs != templatefiles.end()) { - std::string course = tfs->substr(0, tfs->length() - 4); - TemplateParser parser(course); + std::string templ = tfs->substr(0, tfs->length() - 4); + TemplateParser parser(templ); parser.parse(); Template *t = parser.getTemplate(); - std::string key = t->course.attributes["name"]; + std::string key = t->attributes["name"]; templates[key].file = *tfs; - templates[key].name = t->course.attributes["name"]; - templates[key].title = t->course.attributes["title"]; - templates[key].version = t->course.attributes["version"]; + templates[key].name = t->attributes["name"]; + templates[key].title = t->attributes["title"]; + templates[key].version = t->attributes["version"]; - std::vector::iterator ms = t->course.macros.begin(); - while(ms != t->course.macros.end()) { + std::vector::iterator ms = t->macros.begin(); + while(ms != t->macros.end()) { if(ms->attributes.find("header") == ms->attributes.end()) templates[key].macros.push_back(ms->attributes["name"]); ms++; -- cgit v1.2.3