Make the real object name available for use in templates.

Refs #5882
This commit is contained in:
Gunnar Beutner 2014-03-28 19:45:07 +01:00
parent adce8e95bc
commit 8a1bbc0ace
1 changed files with 6 additions and 2 deletions

View File

@ -89,9 +89,13 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
Array::Ptr templateArray = make_shared<Array>(); Array::Ptr templateArray = make_shared<Array>();
templateArray->Add(m_Name); templateArray->Add(m_Name);
exprs->Add(make_shared<AExpression>(&AExpression::OpSetPlus, "templates", make_shared<AExpression>(&AExpression::OpLiteral, templateArray, m_DebugInfo), m_DebugInfo)); exprs->Add(make_shared<AExpression>(&AExpression::OpSetPlus, "templates", make_shared<AExpression>(&AExpression::OpLiteral, templateArray, m_DebugInfo), m_DebugInfo));
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "type", make_shared<AExpression>(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo));
if (!m_Abstract) {
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "type", make_shared<AExpression>(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo));
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "name", make_shared<AExpression>(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo));
}
exprs->Add(make_shared<AExpression>(&AExpression::OpDict, m_Expressions, true, m_DebugInfo)); exprs->Add(make_shared<AExpression>(&AExpression::OpDict, m_Expressions, true, m_DebugInfo));
exprs->Add(make_shared<AExpression>(&AExpression::OpSet, "name", make_shared<AExpression>(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo));
AExpression::Ptr exprl = make_shared<AExpression>(&AExpression::OpDict, exprs, true, m_DebugInfo); AExpression::Ptr exprl = make_shared<AExpression>(&AExpression::OpDict, exprs, true, m_DebugInfo);