summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlnode.h')
-rw-r--r--core/fxcrt/xml/cfx_xmlnode.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/core/fxcrt/xml/cfx_xmlnode.h b/core/fxcrt/xml/cfx_xmlnode.h
index dc3152f19a..55c79dcfe0 100644
--- a/core/fxcrt/xml/cfx_xmlnode.h
+++ b/core/fxcrt/xml/cfx_xmlnode.h
@@ -27,32 +27,29 @@ struct FX_XMLNODE {
class CFX_XMLNode {
public:
- enum NodeItem {
- Root = 0,
- Parent,
- NextSibling,
- FirstChild,
- };
-
CFX_XMLNode();
virtual ~CFX_XMLNode();
virtual FX_XMLNODETYPE GetType() const;
virtual std::unique_ptr<CFX_XMLNode> Clone();
+ CFX_XMLNode* GetRoot();
+ CFX_XMLNode* GetParent() const { return parent_; }
+ CFX_XMLNode* GetFirstChild() const { return first_child_; }
+ CFX_XMLNode* GetNextSibling() const { return next_sibling_; }
+
void AppendChild(CFX_XMLNode* pNode);
void InsertChildNode(CFX_XMLNode* pNode, int32_t index);
void RemoveChildNode(CFX_XMLNode* pNode);
void DeleteChildren();
- CFX_XMLNode* GetNodeItem(CFX_XMLNode::NodeItem eItem) const;
-
void SaveXMLNode(const RetainPtr<CFX_SeekableStreamProxy>& pXMLStream);
- CFX_XMLNode* m_pParent;
- CFX_XMLNode* m_pChild;
- CFX_XMLNode* m_pPrior;
- CFX_XMLNode* m_pNext;
+ private:
+ CFX_XMLNode* parent_ = nullptr;
+ CFX_XMLNode* first_child_ = nullptr;
+ CFX_XMLNode* prev_sibling_ = nullptr;
+ CFX_XMLNode* next_sibling_ = nullptr;
};
#endif // CORE_FXCRT_XML_CFX_XMLNODE_H_