blob: ef40564455efa44f9e2e7c671f1b61aef326c163 [file] [log] [blame]
Zane Shelley508ce582020-05-05 13:47:19 -05001#include <isolator/hei_isolation_chip.hpp>
2
3namespace libhei
4{
5
6//------------------------------------------------------------------------------
7
8bool IsolationChip::analyze(const Chip& i_chip, IsolationData& io_isoData) const
9{
10 bool o_activeAttn = false; // Initially, assume no active attentions.
11
12 // The given chip must be the same type as iv_chipType.
13 HEI_ASSERT(iv_chipType == i_chip.getType());
14
15 // Iterate each root node.
16 for (const auto& node : iv_rootNodes)
17 {
18 if (node.second->analyze(i_chip, node.first, io_isoData))
19 {
20 // At least one attention type had an active attention.
21 o_activeAttn = true;
22 }
23 }
24
25 return o_activeAttn;
26}
27
28//------------------------------------------------------------------------------
29
30} // end namespace libhei