@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.
| 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. |