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

Function sequence

example/cacheHierarchy/fkYAML/node.hpp:12171–12190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12169
12170
12171FK_YAML_DETAIL_NAMESPACE_BEGIN
12172
12173///////////////////////////////////
12174// external_node_constructor //
12175///////////////////////////////////
12176
12177/// @brief The external constructor template for basic_node objects.
12178/// @note All the non-specialized instantiations results in compilation error since such instantiations are not
12179/// supported.
12180/// @warning All the specialization must call n.m_value.destroy() first in the construct function to avoid
12181/// memory leak.
12182/// @tparam node_type The resulting YAML node value type.
12183template <typename BasicNodeType>
12184struct external_node_constructor {
12185 template <typename... Args>
12186 static void sequence(BasicNodeType& n, Args&&... args) {
12187 destroy(n);
12188 n.m_attrs |= node_attr_bits::seq_bit;
12189 n.m_value.p_seq = create_object<typename BasicNodeType::sequence_type>(std::forward<Args>(args)...);
12190 }
12191
12192 template <typename... Args>
12193 static void mapping(BasicNodeType& n, Args&&... args) {

Callers 3

node.hppFile · 0.85
deserialize_nodeFunction · 0.85
to_nodeFunction · 0.85

Calls 1

destroyFunction · 0.85

Tested by

no test coverage detected