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.

51 lines
841 B

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. namenode.h
  5. Abstract:
  6. <abstract>
  7. --*/
  8. #ifndef _NAMENODE_H_
  9. #define _NAMENODE_H_
  10. class CNamedNode
  11. {
  12. friend class CNamedNodeList;
  13. protected:
  14. CNamedNode *m_pnodeNext;
  15. public:
  16. CNamedNode() { m_pnodeNext = NULL; }
  17. };
  18. typedef CNamedNode *PCNamedNode;
  19. //
  20. // Class CNamedNodeList
  21. //
  22. class CNamedNodeList
  23. {
  24. private:
  25. PCNamedNode m_pnodeFirst;
  26. PCNamedNode m_pnodeLast;
  27. public:
  28. CNamedNodeList( void ) { m_pnodeFirst = m_pnodeLast = NULL; }
  29. BOOL FindByName ( LPCTSTR pszName, INT iNameOffset, PCNamedNode *ppnodeRet );
  30. void Add ( PCNamedNode pnodeNew, PCNamedNode pnodePos );
  31. void Remove ( PCNamedNode pnode );
  32. BOOL IsEmpty( void ) { return m_pnodeFirst == NULL; }
  33. CNamedNode *First ( void ) { return m_pnodeFirst; }
  34. };
  35. #endif //_NAMENODE_H_