Leaked source code of windows server 2003
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.

42 lines
1003 B

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: diff.inl
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //-----------------------------------------------------------------------------
  8. inline
  9. CDifference::~CDifference()
  10. {
  11. }
  12. inline
  13. CDelta::~CDelta()
  14. {
  15. }
  16. inline
  17. CDiffAlgorithm::~CDiffAlgorithm()
  18. {
  19. }
  20. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  21. // Calculates the delta following the given algorithm and then traverses
  22. // the delta and calls back the delta visitor for each difference in the delta.
  23. //------------------------------------------------------------------------------
  24. inline
  25. void
  26. CDiffEngine::Diff(
  27. CDiffAlgorithm & diffalg,
  28. const wchar_t * seq1, // [in] old sequence
  29. const wchar_t * seq2, // [in] new sequence
  30. const CDeltaVisitor & dv)
  31. {
  32. CDelta * d;
  33. d = diffalg.CalculateDelta(seq1, seq2);
  34. d->Traverse(dv);
  35. delete d;
  36. }