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

Function try_append_anchor

example/cacheHierarchy/fkYAML/node.hpp:11068–11077  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

11066 /// @param str A string to hold serialization result.
11067 /// @return true if an anchor property has been appended, false otherwise.
11068 bool try_append_anchor(const BasicNodeType& node, bool prepends_space, std::string& str) const {
11069 if (node.is_anchor()) {
11070 if (prepends_space) {
11071 str += " ";
11072 }
11073 str += "&" + node.get_anchor_name();
11074 return true;
11075 }
11076 return false;
11077 }
11078
11079 /// @brief Append an alias property if it's available. Do nothing otherwise.
11080 /// @param node The target node which is possibly an alias node.

Callers 2

node.hppFile · 0.85
serialize_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected