/src/Algorithms_NTree/NTreeLeaf.h

http://github.com/Akranar/daguerreo · C Header · 36 lines · 33 code · 3 blank · 0 comment · 0 complexity · 8a0da0de0d50658cb9faca3f98166426 MD5 · raw file

  1. #ifndef _NTREE_LEAF_H_
  2. #define _NTREE_LEAF_H_
  3. #include "NTree.h"
  4. template <typename BASE = NTree, class CHILDREN = BASE>
  5. class NTreeLeaf: public BASE
  6. {
  7. public:
  8. virtual inline CHILDREN * AttachChildAt(unsigned int index, CHILDREN * child)
  9. {
  10. return 0;
  11. }
  12. virtual inline int AttachChild(CHILDREN * child)
  13. {
  14. return -1;
  15. }
  16. virtual inline CHILDREN * DetachChildAt(unsigned int index)
  17. {
  18. return 0;
  19. }
  20. virtual inline CHILDREN * DetachChild(CHILDREN * child)
  21. {
  22. return 0;
  23. }
  24. virtual inline CHILDREN * GetChildAt(unsigned int index) const
  25. {
  26. return 0;
  27. }
  28. virtual inline unsigned int GetOrder() const
  29. {
  30. return 0;
  31. }
  32. };
  33. #endif