* \brief Constructs a DOM Node with type and content. * * Creates either an ELEMENT node with a tag name or a TEXT node with text content. * The constructor determines the node type and stores the appropriate value. * * \param t The node type (ELEMENT or TEXT). * \param content The tag name (if ELEMENT) or text content (if TEXT). */
| 10 | * \param content The tag name (if ELEMENT) or text content (if TEXT). |
| 11 | */ |
| 12 | NODE::NODE(NODE_TYPE t, const std::string &content) : m_type(t) |
| 13 | { |
| 14 | if (t == NODE_TYPE::ELEMENT) |
| 15 | { |
| 16 | m_tag_name = content; |
| 17 | m_text = ""; |
| 18 | } |
| 19 | else |
| 20 | { |
| 21 | m_text = content; |
| 22 | m_tag_name = ""; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * \brief Adds a child node and establishes parent-child relationship. |
nothing calls this directly
no outgoing calls
no test coverage detected