20 lines
513 B
C++
20 lines
513 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <sp/protocol/command/Commands.h>
|
|
|
|
namespace sp {
|
|
namespace protocol {
|
|
namespace CommandFactory {
|
|
|
|
template <typename CommandDerived, typename = typename std::enable_if<std::is_base_of<Command, CommandDerived>::value>::type>
|
|
std::shared_ptr<CommandDerived> CreateCommand() {
|
|
return std::make_shared<CommandDerived>();
|
|
}
|
|
|
|
const std::shared_ptr<Command>& CreateReadOnlyCommand(CommandType a_Type);
|
|
|
|
} // namespace CommandFactory
|
|
} // namespace protocol
|
|
} // namespace sp
|