File indexing completed on 2025-08-05 08:16:20
0001 #ifndef PHOOL_PHNODEITERATOR_H
0002 #define PHOOL_PHNODEITERATOR_H
0003
0004
0005
0006
0007
0008
0009 #include "PHPointerList.h"
0010
0011 #include <string>
0012
0013 class PHCompositeNode;
0014 class PHNode;
0015 class PHNodeOperation;
0016
0017 class PHNodeIterator
0018 {
0019 public:
0020 explicit PHNodeIterator(PHCompositeNode*);
0021 virtual ~PHNodeIterator() = default;
0022 PHNodeIterator() = default;
0023
0024 public:
0025 void print();
0026 PHPointerList<PHNode>& ls();
0027 PHNode* findFirst(const std::string&, const std::string&);
0028 PHNode* findFirst(const std::string&);
0029 bool cd(const std::string& pathString = "");
0030 bool addNode(PHNode*);
0031 void forEach(PHNodeOperation&);
0032 void for_each(PHNodeOperation&);
0033 PHCompositeNode* get_currentNode() const { return currentNode; }
0034
0035 protected:
0036 PHCompositeNode* currentNode {nullptr};
0037 PHPointerList<PHNode> subNodeList;
0038 };
0039
0040 #endif