Program Listing for File cb_state.hpp

Return to documentation for file (include/yasmin/cb_state.hpp)

// Copyright (C) 2023 Miguel Ángel González Santamarta
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

#ifndef YASMIN__CB_STATE_HPP_
#define YASMIN__CB_STATE_HPP_

#include <functional>
#include <string>

#include "yasmin/blackboard.hpp"
#include "yasmin/state.hpp"
#include "yasmin/types.hpp"

namespace yasmin {

class CbState : public State {

private:
  CbStateCallback callback;

public:
  YASMIN_PTR_ALIASES(CbState)


  CbState(const Outcomes &outcomes, CbStateCallback callback);

  std::string execute(Blackboard::SharedPtr blackboard) override;
};

} // namespace yasmin

#endif // YASMIN__CB_STATE_HPP_