summaryrefslogtreecommitdiff
path: root/source/application/main/include/AppContext.hpp
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2021-05-12 08:27:15 +0100
committerIsabella Gottardi <isabella.gottardi@arm.com>2021-05-18 09:48:12 +0100
commit56ee6207c1524ddc4c444c6e48e05eb34105985a (patch)
treed4fc7823961034e95364f44b34fb098b34b99d0d /source/application/main/include/AppContext.hpp
parentf4e2c4736f19d2e06fede715bb49c475f93d79a9 (diff)
downloadml-embedded-evaluation-kit-56ee6207c1524ddc4c444c6e48e05eb34105985a.tar.gz
MLECO-1858: Documentation update
* Removing `_` in front of private functions and member Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com> Change-Id: I5a5d652f9647ebb16d2d2bd16ab980e73f7be3cf
Diffstat (limited to 'source/application/main/include/AppContext.hpp')
-rw-r--r--source/application/main/include/AppContext.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/application/main/include/AppContext.hpp b/source/application/main/include/AppContext.hpp
index 588dfaa..10de126 100644
--- a/source/application/main/include/AppContext.hpp
+++ b/source/application/main/include/AppContext.hpp
@@ -35,14 +35,14 @@ namespace app {
public:
~Attribute() override = default;
- explicit Attribute(const T value): _m_value(value){}
+ explicit Attribute(const T value): m_value(value){}
T Get()
{
- return _m_value;
+ return m_value;
}
private:
- T _m_value;
+ T m_value;
};
/* Application context class */
@@ -58,7 +58,7 @@ namespace app {
template<typename T>
void Set(const std::string &name, T object)
{
- this->_m_attributes[name] = new Attribute<T>(object);
+ this->m_attributes[name] = new Attribute<T>(object);
}
/**
@@ -70,7 +70,7 @@ namespace app {
template<typename T>
T Get(const std::string &name)
{
- auto a = (Attribute<T>*)_m_attributes[name];
+ auto a = (Attribute<T>*)m_attributes[name];
return a->Get();
}
@@ -81,19 +81,19 @@ namespace app {
*/
bool Has(const std::string& name)
{
- return _m_attributes.find(name) != _m_attributes.end();
+ return m_attributes.find(name) != m_attributes.end();
}
ApplicationContext() = default;
~ApplicationContext() {
- for (auto& attribute : _m_attributes)
+ for (auto& attribute : m_attributes)
delete attribute.second;
- this->_m_attributes.clear();
+ this->m_attributes.clear();
}
private:
- std::map<std::string, IAttribute*> _m_attributes;
+ std::map<std::string, IAttribute*> m_attributes;
};
} /* namespace app */