00001 /** 00002 * @file IDocumentForm.h 00003 * @brief Interface to compare two documents 00004 * 00005 * @author Nakashima h 00006 * @date 2022-02-02 00007 * 00008 * $Id: ICompareDocuments.h 32 2022-07-14 03:20:43Z shingo.yoneda $ 00009 * 00010 * Copyright (c) 2022 Antenna House, Inc. All rights reserved. 00011 */ 00012 00013 #pragma once 00014 #include <queue> 00015 #include <memory> 00016 #include <string> 00017 00018 //#include <AHOOXMLDocxManagerCppCtl/ChangedRatio.h> 00019 #include "ChangedRatio.h" 00020 00021 /** 00022 * @brief Class to compare two documents 00023 */ 00024 class ICompareDocuments { 00025 protected: 00026 /** 00027 * @brief Default constructor 00028 */ 00029 ICompareDocuments() = default; 00030 00031 /** 00032 * @brief Copy constructor 00033 */ 00034 ICompareDocuments(const ICompareDocuments&) = delete; 00035 00036 /** 00037 * @brief Copy assignment operator 00038 */ 00039 ICompareDocuments& operator=(const ICompareDocuments&) = delete; 00040 00041 /** 00042 * @brief Move constructor 00043 */ 00044 ICompareDocuments(ICompareDocuments&&) = delete; 00045 00046 /** 00047 * @brief Move assignment operator 00048 */ 00049 ICompareDocuments& operator=(ICompareDocuments&&) = delete; 00050 00051 public: 00052 /** 00053 * @brief Destructor 00054 */ 00055 virtual ~ICompareDocuments() = default; 00056 00057 /** 00058 * @brief Generate an object to perform document comparison 00059 */ 00060 static std::unique_ptr<ICompareDocuments> create(); 00061 00062 /** 00063 * @brief Perform document comparison 00064 * @param originalFilePath - Original file path 00065 * @param revisedFilePath - Revised file path 00066 * @param outputFilePath - Output path of comparison results 00067 */ 00068 virtual void CompareDocument(std::string const& originalFilePath, std::string const& revisedFilePath, std::string const& outputFilePath) = 0; 00069 00070 /** 00071 * @brief Create comparison table 00072 * @param originalFilePath - Original file path 00073 * @param revisedFilePath - Revised file path 00074 * @param outputFilePath - Output path of comparison table 00075 */ 00076 virtual void CreateComparativeTable(std::string const& originalFilePath, std::string const& revisedFilePath, std::string const& outputFilePath) = 0; 00077 00078 /** 00079 * @brief Parsing the document changed ratio 00080 * @param originalFilePath - Original file path 00081 * @param revisedFilePath - Revised file path 00082 * @return Document changed ratio 00083 */ 00084 virtual ChangedRatio ParseChangedRatio(std::string const& originalFilePath, std::string const& revisedFilePath) = 0; 00085 };