.. _program_listing_file_include_yasmin_cb_state.hpp: Program Listing for File cb_state.hpp ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/yasmin/cb_state.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // 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 . #ifndef YASMIN__CB_STATE_HPP #define YASMIN__CB_STATE_HPP #include #include #include #include "yasmin/blackboard/blackboard.hpp" #include "yasmin/state.hpp" namespace yasmin { class CbState : public State { private: std::string (*callback)(std::shared_ptr blackboard); public: CbState(std::set outcomes, std::string (*callback)( std::shared_ptr blackboard)); std::string execute(std::shared_ptr blackboard) override; }; } // namespace yasmin #endif // YASMIN__CB_STATE_HPP