MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / ~basic_node

Function ~basic_node

example/cacheHierarchy/fkYAML/node.hpp:13060–13077  ·  view source on GitHub ↗

@brief Destroy the basic_node object and its value storage. @sa https://fktn-k.github.io/fkYAML/api/basic_node/destructor/

Source from the content-addressed store, hash-verified

13058 /// @brief Destroy the basic_node object and its value storage.
13059 /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/destructor/
13060 ~basic_node() noexcept // NOLINT(bugprone-exception-escape)
13061 {
13062 if (m_attrs & detail::node_attr_mask::anchoring) {
13063 if (m_attrs & detail::node_attr_bits::anchor_bit) {
13064 auto itr = mp_meta->anchor_table.equal_range(m_prop.anchor).first;
13065 std::advance(itr, detail::node_attr_bits::get_anchor_offset(m_attrs));
13066 itr->second.m_value.destroy(itr->second.m_attrs & detail::node_attr_mask::value);
13067 itr->second.m_attrs = detail::node_attr_bits::default_bits;
13068 itr->second.mp_meta.reset();
13069 }
13070 }
13071 else if ((m_attrs & detail::node_attr_bits::null_bit) == 0) {
13072 m_value.destroy(m_attrs & detail::node_attr_mask::value);
13073 }
13074
13075 m_attrs = detail::node_attr_bits::default_bits;
13076 mp_meta.reset();
13077 }
13078
13079public:
13080 /// @brief Deserialize the first YAML document in the input into a basic_node object.

Callers

nothing calls this directly

Calls 4

get_anchor_offsetFunction · 0.85
equal_rangeMethod · 0.45
destroyMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected