Skip to content

File model_definition_main.hpp

File List > backends > cxx > include > zmbt > mapping > model_definition_main.hpp

Go to the documentation of this file

#ifndef ZMBT_MAPPING_MODEL_DEFINITION_MAIN_HPP_
#define ZMBT_MAPPING_MODEL_DEFINITION_MAIN_HPP_

#include "zmbt/model/expression_api.hpp"
#include "zmbt/mapping/model_definition.hpp"
#include "zmbt/mapping/model_definition_states.hpp"
#include "zmbt/mapping/model_definition_transitions.hpp"


namespace zmbt {
namespace mapping {

// using SignalMapping = ModelDefinition::N_Main;
class SignalMapping : public ModelDefinition::N_Main
{
  public:

    template <class... T>
    SignalMapping(boost::json::string_view name, T&&... args) : N_Main()
    {
        this->state().set_deferred_param("/name", expr::Format(args...) << name);
    }

    ~SignalMapping()
    {
        this->state().execute();
    }
};


}  // namespace mapping
}  // namespace zmbt

#endif