Program Listing for File command_pack.hpp

Return to documentation for file (fang-mcb-project/src/control/command/command_pack.hpp)

#pragma once

#include "tap/control/command_mapper.hpp"
#include "tap/control/command_mapping.hpp"

#include <span>
#include <functional>

namespace fang::command
{
    class CommandPack
    {
    public:
        using CommandMapper = tap::control::CommandMapper;
        using CommandMapping = tap::control::CommandMapping;
        using RemoteState = tap::control::RemoteMapState;

        virtual void initialize() = 0;

        CommandPack(CommandMapper& mapper);

        virtual ~CommandPack() = default;
    protected:
        void registerCommandMappings(std::span<std::reference_wrapper<CommandMapping>> mappings);
    private:
        tap::control::CommandMapper& mapper_;
    };
}