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

Function destroy

example/cacheHierarchy/fkYAML/node.hpp:12859–12878  ·  view source on GitHub ↗

@brief Destroys the existing Node value. This process is recursive if the specified node type is for containers. @param[in] type A Node type to determine the value to be destroyed.

Source from the content-addressed store, hash-verified

12857 /// containers.
12858 /// @param[in] type A Node type to determine the value to be destroyed.
12859 void destroy(detail::node_attr_t value_type_bit) {
12860 switch (value_type_bit) {
12861 case detail::node_attr_bits::seq_bit:
12862 p_seq->clear();
12863 detail::destroy_object<sequence_type>(p_seq);
12864 p_seq = nullptr;
12865 break;
12866 case detail::node_attr_bits::map_bit:
12867 p_map->clear();
12868 detail::destroy_object<mapping_type>(p_map);
12869 p_map = nullptr;
12870 break;
12871 case detail::node_attr_bits::string_bit:
12872 detail::destroy_object<string_type>(p_str);
12873 p_str = nullptr;
12874 break;
12875 default:
12876 break;
12877 }
12878 }
12879
12880 /// A pointer to the value of sequence type.
12881 sequence_type* p_seq;

Callers 10

destroy_objectFunction · 0.85
sequenceFunction · 0.85
mappingFunction · 0.85
null_scalarFunction · 0.85
boolean_scalarFunction · 0.85
integer_scalarFunction · 0.85
float_scalarFunction · 0.85
string_scalarFunction · 0.85
TableClass · 0.85
~TableMethod · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected