// // Created by erki on 28.02.21. // #ifndef C_ANALYZER_OPERATIONSTORAGE_HPP #define C_ANALYZER_OPERATIONSTORAGE_HPP #include #include #include #include "OperationLog.hpp" class OperationStorage : public IOperationOutput { public: OperationStorage() = default; OperationStorage(const OperationStorage&) = delete; ~OperationStorage() override; void enablePrettyPrint(); void toStream(std::ostream& stream); void toFile(const std::string& output_filename); void pushOperation(const std::string& filename, OperationLog&& op) override; [[nodiscard]] const std::unordered_map>& getOperations() const; private: std::unordered_map> _operations; bool _pretty_print = false; }; #endif //C_ANALYZER_OPERATIONSTORAGE_HPP