NodeIf.h 479 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef BEHAVIORTREE_NODEIF_H
  2. #define BEHAVIORTREE_NODEIF_H
  3. #include <string>
  4. namespace Egametang {
  5. class ContexIf;
  6. class BehaviorNodeConf;
  7. class NodeIf
  8. {
  9. public:
  10. virtual ~NodeIf()
  11. {
  12. }
  13. virtual bool Run(ContexIf* contex) = 0;
  14. virtual void AddChildNode(NodeIf *node)
  15. {
  16. }
  17. virtual std::string ToString() = 0;
  18. };
  19. class NodeFactoryIf
  20. {
  21. public:
  22. virtual NodeIf* GetInstance(const BehaviorNodeConf& conf) = 0;
  23. };
  24. } // namespace Egametang
  25. #endif // BEHAVIORTREE_NODEIF_H