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.

58 lines
1.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: PRTIFLST.CXX
  7. //
  8. // Contents: Partition Information List
  9. //
  10. // Classes:
  11. //
  12. // History: 16-Feb-94 SrikantS Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #include <pch.cxx>
  16. #pragma hdrstop
  17. #include "prtiflst.hxx"
  18. //+---------------------------------------------------------------------------
  19. //----------------------------------------------------------------------------
  20. CPartInfo::CPartInfo( PARTITIONID partId )
  21. : _partId(partId)
  22. {
  23. _widChangeLog = widInvalid ;
  24. _widCurrMasterIndex = widInvalid ;
  25. _widNewMasterIndex = widInvalid ;
  26. _widMMergeLog = widInvalid ;
  27. }
  28. //+---------------------------------------------------------------------------
  29. //----------------------------------------------------------------------------
  30. CPartInfoList::~CPartInfoList()
  31. {
  32. CPartInfo * pNode = NULL;
  33. while ( (pNode = RemoveFirst()) != NULL ) {
  34. delete pNode;
  35. }
  36. }
  37. //+---------------------------------------------------------------------------
  38. //----------------------------------------------------------------------------
  39. CPartInfo* CPartInfoList::GetPartInfo( PARTITIONID partId )
  40. {
  41. for ( CForPartInfoIter it(*this); !AtEnd(it); Advance(it) )
  42. {
  43. if ( it->GetPartId() == partId )
  44. {
  45. return it.GetPartInfo();
  46. }
  47. }
  48. return NULL;
  49. }