19#ifndef HEDGEHOG_ABSTRACT_STATE_H_ 
   20#define HEDGEHOG_ABSTRACT_STATE_H_ 
   22#include <shared_mutex> 
   24#include "../../tools/traits.h" 
   25#include "../../behavior/cleanable.h" 
   26#include "../../behavior/multi_execute.h" 
   27#include "../../behavior/input_output/state_multi_senders.h" 
   28#include "../../core/nodes/core_state_manager.h" 
   30#include "../memory_manager/manager/abstract_memory_manager.h" 
   40template<
size_t Separator, 
class ...AllTypes>
 
   43      public tool::BehaviorMultiExecuteTypeDeducer_t<tool::Inputs<Separator, AllTypes...>>,
 
   44      public tool::BehaviorStateMultiSendersTypeDeducer_t<tool::Outputs<Separator, AllTypes...>> {
 
   45#ifndef DOXYGEN_SHOULD_SKIP_THIS 
   50  mutable std::unique_ptr<std::shared_mutex> 
mutex_ = 
nullptr; 
 
std::shared_ptr< ManagedMemory > getManagedMemory()
Accessor to the managed memory if a memory manager has been attached to a StateManager.
void unlock()
Unlock the state.
~AbstractState() override=default
Default state destructor.
StateManager< Separator, AllTypes... > * stateManager_
AbstractState manager currently using the state.
AbstractState()
Default state constructor.
void lock()
Lock the state.
void stateManager(StateManager< Separator, AllTypes... > *stateManager)
AbstractState manager setter.
std::unique_ptr< std::shared_mutex > mutex_
Mutex to protect the state.
std::shared_ptr< ManagedMemory > getManagedMemory()
Get a managed memory for the memory manager attached to the task, can block if none are available at ...
AbstractState manager core.