#ifndef XPATHDATA_H
#define XPATHDATA_H

#include "xasset.h"
#include "xpathnode.h"
#include "xpathbasenode.h"
#include "xpathnodetree.h"

class XPathData : public XAsset
{
public:
    explicit XPathData();

    void ParseData(QDataStream *aStream) override;

    quint32 GetNodeCount() const;
    void SetNodeCount(quint32 count);

private:
    quint32 mNodeCount = 0;
    // Using our new classes instead of raw pointers to structures
    QVector<XPathNode> mNodes; // Vector for automatic memory management
    QVector<XPathBaseNode> mBaseNodes;
    quint32 mChainNodeCount = 0;
    QVector<unsigned short> mChainNodeForNode;
    QVector<unsigned short> mNodeForChainNode;
    int mVisBytes = 0;
    QByteArray mPathVis; // Using QByteArray for automatic memory management
    int mNodeTreeCount = 0;
    QVector<XPathNodeTree> mNodeTrees;
};

#endif // XPATHDATA_H
