Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
2.0 KiB

  1. /*
  2. * REVISIONS:
  3. * ash16Oct95: creation
  4. */
  5. #ifdef SMARTHEAP
  6. #define DEFINE_NEW_MACRO 1
  7. #define MEM_DEBUG 1
  8. #include <smrtheap.hpp>
  9. #endif
  10. #include "cdefine.h"
  11. #include "node.h"
  12. #if !defined( __OBJECT_H)
  13. #include "apcobj.h"
  14. #endif
  15. /* -------------------------------------------------------------------------
  16. Node::SetNext()
  17. ------------------------------------------------------------------------- */
  18. VOID Node::SetNext(PNode item)
  19. {
  20. if (item)
  21. {
  22. theNext = item;
  23. }
  24. else
  25. {
  26. theNext = (PNode)NULL;
  27. }
  28. }
  29. /* -------------------------------------------------------------------------
  30. Node::SetPrev()
  31. ------------------------------------------------------------------------- */
  32. VOID Node::SetPrev(PNode item)
  33. {
  34. if (item)
  35. {
  36. thePrev = item;
  37. }
  38. else
  39. {
  40. thePrev = (PNode)NULL;
  41. }
  42. }
  43. /* -------------------------------------------------------------------------
  44. Node::SetData()
  45. ------------------------------------------------------------------------- */
  46. VOID Node::SetData(PObj data)
  47. {
  48. if (data)
  49. {
  50. theData = data;
  51. }
  52. else
  53. {
  54. theData = (PObj)NULL;
  55. }
  56. }
  57. /* -------------------------------------------------------------------------
  58. Node::GetData()
  59. ------------------------------------------------------------------------- */
  60. PObj Node::GetData()
  61. {
  62. if (theData)
  63. {
  64. return theData;
  65. }
  66. else
  67. {
  68. return (PObj)NULL;
  69. }
  70. }
  71. /* -------------------------------------------------------------------------
  72. Node::GetNext()
  73. ------------------------------------------------------------------------- */
  74. PNode Node::GetNext()
  75. {
  76. if (theNext)
  77. {
  78. return theNext;
  79. }
  80. else
  81. {
  82. return (PNode)NULL;
  83. }
  84. }
  85. /* -------------------------------------------------------------------------
  86. Node::GetPrev()
  87. ------------------------------------------------------------------------- */
  88. PNode Node::GetPrev()
  89. {
  90. if (thePrev)
  91. {
  92. return thePrev;
  93. }
  94. else
  95. {
  96. return (PNode)NULL;
  97. }
  98. }