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.

96 lines
1.5 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: worddiff.inl
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // Implementation of CWordDiff
  8. //-----------------------------------------------------------------------------
  9. #include "ltdebug.h"
  10. inline
  11. CWordDiff::CWordDiff(
  12. CDifference::ChangeType type,
  13. int nOldPos,
  14. int nNewPos,
  15. bool bIsFirst,
  16. bool bIsLast,
  17. _bstr_t bstrWord,
  18. const wchar_t * pwszPrefix,
  19. const wchar_t * pwszSufix) :
  20. m_ChangeType(type), m_Word(bstrWord), m_pwszPrefix(pwszPrefix),
  21. m_pwszSufix(pwszSufix), m_bIsFirst(bIsFirst), m_bIsLast(bIsLast),
  22. m_nOldPos(nOldPos), m_nNewPos(nNewPos)
  23. {
  24. LTASSERT(pwszPrefix != NULL);
  25. LTASSERT(pwszSufix != NULL);
  26. LTASSERT(nOldPos >= -1);
  27. LTASSERT(nNewPos >= -1);
  28. }
  29. inline
  30. CDifference::ChangeType
  31. CWordDiff::GetChangeType()
  32. const
  33. {
  34. return m_ChangeType;
  35. }
  36. inline
  37. const wchar_t *
  38. CWordDiff::GetUnit()
  39. const
  40. {
  41. return m_Word;
  42. }
  43. inline
  44. int
  45. CWordDiff::GetOldUnitPosition()
  46. const
  47. {
  48. return m_nOldPos;
  49. }
  50. inline
  51. int
  52. CWordDiff::GetNewUnitPosition()
  53. const
  54. {
  55. return m_nNewPos;
  56. }
  57. inline
  58. const wchar_t *
  59. CWordDiff::GetPrefix()
  60. const
  61. {
  62. return m_pwszPrefix;
  63. }
  64. inline
  65. const wchar_t *
  66. CWordDiff::GetSufix()
  67. const
  68. {
  69. return m_pwszSufix;
  70. }
  71. inline
  72. bool
  73. CWordDiff::IsFirst()
  74. const
  75. {
  76. return m_bIsFirst;
  77. }
  78. inline
  79. bool
  80. CWordDiff::IsLast()
  81. const
  82. {
  83. return m_bIsLast;
  84. }