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

Function try_append_alias

example/cacheHierarchy/fkYAML/node.hpp:11084–11093  ·  view source on GitHub ↗

@brief Append an alias property if it's available. Do nothing otherwise. @param node The target node which is possibly an alias node. @param prepends_space Whether to prepend a space before an alias property. @param str A string to hold serialization result. @return true if an alias property has been appended, false otherwise.

Source from the content-addressed store, hash-verified

11082 /// @param str A string to hold serialization result.
11083 /// @return true if an alias property has been appended, false otherwise.
11084 bool try_append_alias(const BasicNodeType& node, bool prepends_space, std::string& str) const {
11085 if (node.is_alias()) {
11086 if (prepends_space) {
11087 str += " ";
11088 }
11089 str += "*" + node.get_anchor_name();
11090 return true;
11091 }
11092 return false;
11093 }
11094
11095 /// @brief Append a tag name if it's available. Do nothing otherwise.
11096 /// @param[in] node The target node which possibly has a tag name.

Callers 1

serialize_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected