Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
class TemplateSubstitutionContext
|
||||
{
|
||||
public:
|
||||
|
||||
void addSubstitution(const std::string& key, const std::string& value)
|
||||
{
|
||||
mSubstitutions[key] = value;
|
||||
}
|
||||
|
||||
bool hasSubstitution(const std::string& key) const
|
||||
{
|
||||
return mSubstitutions.find(key) != mSubstitutions.end();
|
||||
}
|
||||
|
||||
std::string getSubstitution(const std::string& key) const
|
||||
{
|
||||
auto iter = mSubstitutions.find(key);
|
||||
if(iter != mSubstitutions.end())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, std::string> mSubstitutions;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue