COMPMID-415: New framework - printers [4/5]

Change-Id: Ibbaced7b01c16361843f4381fbf6cd15a4487062
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79758
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
diff --git a/framework/Framework.h b/framework/Framework.h
index fbc95ba..fbb6b9c 100644
--- a/framework/Framework.h
+++ b/framework/Framework.h
@@ -30,6 +30,7 @@
 #include "TestResult.h"
 #include "Utils.h"
 #include "instruments/Instruments.h"
+#include "printers/Printer.h"
 
 #include <algorithm>
 #include <chrono>
@@ -190,6 +191,15 @@
      */
     void set_test_result(std::string test_case_name, TestResult result);
 
+    /** Use the specified printer to output test results from the last run.
+     *
+     * This method can be used if the test results need to be obtained using a
+     * different printer than the one managed by the framework.
+     *
+     * @param[in] printer Printer used to output results.
+     */
+    void print_test_results(Printer &printer) const;
+
     /** Factory method to obtain a configured profiler.
      *
      * The profiler enables all instruments that have been passed to the @ref
@@ -199,6 +209,12 @@
      */
     Profiler get_profiler() const;
 
+    /** Set the printer used for the output of test results.
+     *
+     * @param[in] printer Pointer to a printer.
+     */
+    void set_printer(Printer *printer);
+
     /** List of @ref TestId's.
      *
      * @return Vector with all test ids.
@@ -231,6 +247,7 @@
     std::chrono::seconds _runtime{ 0 };
     int                  _num_iterations{ 1 };
     bool                 _throw_errors{ false };
+    Printer             *_printer{ nullptr };
 
     using create_function = std::unique_ptr<Instrument>();
     std::map<InstrumentType, create_function *> _available_instruments{};