7 LatchComponent::LatchComponent(std::unique_ptr<GateTypeComponent> component) : m_component(
std::move(component))
11 std::unique_ptr<LatchComponent> LatchComponent::create(std::unique_ptr<GateTypeComponent> component)
13 return std::unique_ptr<LatchComponent>(
new LatchComponent(std::move(component)));
23 return component->
get_type() == m_type;
26 std::vector<GateTypeComponent*> LatchComponent::get_components(
const std::function<
bool(
const GateTypeComponent*)>& filter)
const
28 if (m_component !=
nullptr)
30 std::vector<GateTypeComponent*> res = m_component->get_components(filter);
33 if (filter(m_component.get()))
35 res.push_back(m_component.get());
40 res.push_back(m_component.get());
51 return m_data_in_bf.
clone();
56 m_data_in_bf = data_in_bf.
clone();
61 return m_enable_bf.
clone();
66 m_enable_bf = enable_bf.
clone();
71 return m_async_reset_bf.
clone();
74 void LatchComponent::set_async_reset_function(
const BooleanFunction& async_reset_bf)
76 m_async_reset_bf = async_reset_bf.
clone();
81 return m_async_set_bf.
clone();
86 m_async_set_bf = async_set_bf.
clone();
89 const std::pair<AsyncSetResetBehavior, AsyncSetResetBehavior>& LatchComponent::get_async_set_reset_behavior()
const
91 return m_async_set_reset_behavior;
96 m_async_set_reset_behavior = std::make_pair(behav_state, behav_neg_state);
BooleanFunction clone() const
virtual ComponentType get_type() const =0