SkillFactory.cpp
Go to the documentation of this file.
1#include "SkillFactory.h"
2
3#include <memory>
4#include <utility>
5
8
12
13namespace armarx::skills
14{
15 std::unique_ptr<Skill>
17 {
18 auto s = _createSkill();
19 s->setProviderId(pid);
20 ARMARX_DEBUG << "Setting skill's logging level to `"
21 << armarx::LogSender::levelToString(logLevel) << "`.";
22 s->setLocalMinimumLoggingLevel(logLevel);
23 return s;
24 }
25
28 {
29 auto s = createSkill(pid, MessageTypeT::FATAL); // Logs are not relevant here.
30 return s->getSkillDescription();
31 }
32
37
42} // namespace armarx::skills
static std::string levelToString(MessageTypeT type)
SkillBlueprint(const FunctionTypeToCreateSkill &s)
FunctionTypeToCreateSkill _createSkill
virtual SkillDescription createSkillDescription(const skills::ProviderID &pid) const
virtual std::unique_ptr< Skill > createSkill(const skills::ProviderID &pid, MessageTypeT logLevel) const
std::function< std::unique_ptr< Skill >()> FunctionTypeToCreateSkill
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
Definition Logging.h:184
This file is part of ArmarX.
MessageTypeT
Definition LogSender.h:46