Commits

Billy O'Neal committed 3e4d0d8

Switched version to be in it's own header. Started work on new report pipeline model.

  • Participants
  • Parent commits fe3430d

Comments (0)

Files changed (8)

File pevFind/main.cpp

 #include <boost/algorithm/string/trim.hpp>
 #include "processManager.h"
 #include "utility.h"
+#include "Version.hpp"
 
 //Subprogram definitions
 #include "clsidCompressor.h"
 		return wait::main(argc, argv);
 	return vFind::main();
 	}
-#ifdef NDEBUG
-	catch(...)
-	{
-std::cerr << 
-"                         _____ _           _ \n"
-"        _ __   _____   _|  ___(_)_ __   __| |\n"
-"       | '_ \\ / _ \\ \\ / / |_  | | '_ \\ / _` |\n"
-"       | |_) |  __/\\ V /|  _| | | | | | (_| |\n"
-"       | .__/ \\___| \\_/ |_|   |_|_| |_|\\__,_|\n"
-"       |_|    by Billy Robert O'Neal III\n"
-"                      Version 1.5.9\n"
-"  Distributed under the Boost Software License, Version 1.0.\n"
-"         http://www.boost.org/LICENSE_1_0.txt\n"
-"pevFind contains some code from Info-ZIP, used with permission.\n"
-"  In accordance with Info-ZIP's License, it can be found at\n"
-"           http://billy-oneal.com/infozip.txt\n"
-"            Filename regular expressions library is\n"
-" Copyright (C)1997-1998 by David R. Tribble, all rights reserved.\n\n";
-	}
-#else
 	catch (std::exception& except)
 	{
-		std::cerr << except.what();
+		std::cerr << 
+		"                         _____ _           _ \n"
+		"        _ __   _____   _|  ___(_)_ __   __| |\n"
+		"       | '_ \\ / _ \\ \\ / / |_  | | '_ \\ / _` |\n"
+		"       | |_) |  __/\\ V /|  _| | | | | | (_| |\n"
+		"       | .__/ \\___| \\_/ |_|   |_|_| |_|\\__,_|\n"
+		"       |_|    by Billy Robert O'Neal III\n"
+		"                      Version " PEVFIND_VERSION "\n"
+		"  Distributed under the Boost Software License, Version 1.0.\n"
+		"         http://www.boost.org/LICENSE_1_0.txt\n"
+		"pevFind contains some code from Info-ZIP, used with permission.\n"
+		"  In accordance with Info-ZIP's License, it can be found at\n"
+		"           http://billy-oneal.com/infozip.txt\n"
+		"            Filename regular expressions library is\n"
+		" Copyright (C)1997-1998 by David R. Tribble, all rights reserved.\n\n";
+		std::cerr << except.what() << "\n";
 	}
-#endif
 }

File pevLib/Version.hpp

+//          Copyright Billy O'Neal 2011
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+//
+#pragma once
+
+#define PEVFIND_VERSION "1.5.10"

File pevLib/pevLib.vcxproj

     <ClCompile Include="regImport.cpp" />
     <ClCompile Include="registry.cpp" />
     <ClCompile Include="regscriptCompiler.cpp" />
+    <ClCompile Include="reportAssembler.cpp" />
+    <ClCompile Include="reportComponents.cpp" />
     <ClCompile Include="rexport.cpp" />
     <ClCompile Include="serviceControl.cpp" />
     <ClCompile Include="timeoutThread.cpp" />
     <ClInclude Include="regImport.h" />
     <ClInclude Include="registry.h" />
     <ClInclude Include="regscriptCompiler.h" />
+    <ClInclude Include="reportAssembler.hpp" />
+    <ClInclude Include="reportComponents.hpp" />
     <ClInclude Include="rexport.h" />
     <ClInclude Include="serviceControl.h" />
     <ClInclude Include="timeoutThread.h" />
     <ClInclude Include="unzip.h" />
     <ClInclude Include="utility.h" />
     <ClInclude Include="uZip.h" />
+    <ClInclude Include="Version.hpp" />
     <ClInclude Include="vFind.h" />
     <ClInclude Include="volumeEnumerate.h" />
     <ClInclude Include="wait.hpp" />

File pevLib/pevLib.vcxproj.filters

     <ClCompile Include="pch.cpp">
       <Filter>Header Files\Precompiled</Filter>
     </ClCompile>
+    <ClCompile Include="reportComponents.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="reportAssembler.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="clsidCompressor.h">
     <ClInclude Include="pch.hpp">
       <Filter>Header Files\Precompiled</Filter>
     </ClInclude>
+    <ClInclude Include="Version.hpp">
+      <Filter>Source Files</Filter>
+    </ClInclude>
+    <ClInclude Include="reportAssembler.hpp">
+      <Filter>Source Files</Filter>
+    </ClInclude>
+    <ClInclude Include="reportComponents.hpp">
+      <Filter>Source Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>

File pevLib/reportAssembler.cpp

+//          Copyright Billy O'Neal 2011
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+//
+#include "pch.hpp"

File pevLib/reportAssembler.hpp

+//          Copyright Billy O'Neal 2011
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+//
+#pragma once
+

File pevLib/reportComponents.cpp

+//          Copyright Billy O'Neal 2011
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+//
+#include "pch.hpp"
+#include "fileData.h"
+#include "reportComponents.hpp"
+
+namespace vFind {
+
+
+	std::vector<FileData> IFilter::Results()
+	{
+		return std::vector<FileData>();
+	}
+
+}

File pevLib/reportComponents.hpp

+//          Copyright Billy O'Neal 2011
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+//
+#pragma once
+#include <windows.h>
+#include <vector>
+#include <string>
+
+namespace vFind {
+
+class FileData;
+
+struct IInputProvider
+{
+	virtual ~IInputProvider() { }
+	virtual FileData Next() = 0;
+};
+
+class FileInput : public IInputProvider
+{
+	std::wstring root;
+	HANDLE hSearch;
+public:
+	FileInput(const std::wstring& rootPath) : root(rootPath), hSearch(0) {}
+	~FileInput();
+	virtual FileData Next();
+};
+
+class ProcessInput : public IInputProvider
+{
+	std::vector<std::wstring> processes;
+	std::vector<std::wstring>::iterator current;
+public:
+	ProcessInput();
+	virtual FileData Next();
+};
+
+struct IFilter
+{
+	virtual ~IFilter() {};
+	virtual bool Apply(const FileData&) = 0;
+	virtual bool End() {}
+	virtual bool HasResults() const { return false; }
+	virtual std::vector<FileData> Results();
+};
+
+class PevTreeFilter : public IFilter
+{
+	virtual bool Apply(const FileData&);
+	virtual std::vector<FileData> Results();
+};
+
+class StatisticsFilter : public IFilter
+{
+	virtual bool Apply(const FileData&);
+	virtual std::vector<FileData> Results();
+};
+
+}