.. _program_listing_file_include_flamegpu_io_JSONLogger.h: Program Listing for File JSONLogger.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/io/JSONLogger.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_IO_JSONLOGGER_H_ #define INCLUDE_FLAMEGPU_IO_JSONLOGGER_H_ #include #include #include "flamegpu/io/Logger.h" #include "flamegpu/detail/Any.h" namespace flamegpu { struct RunLog; struct StepLogFrame; struct ExitLogFrame; struct LogFrame; class RunPlan; namespace io { class JSONLogger : public Logger{ public: JSONLogger(const std::string &outPath, bool prettyPrint, bool truncateFile); void log(const RunLog &log, const RunPlan &plan, bool logSteps = true, bool logExit = true, bool logStepTime = false, bool logExitTime = false) const override; void log(const RunLog &log, bool logConfig = true, bool logSteps = true, bool logExit = true, bool logStepTime = false, bool logExitTime = false) const override; private: void logCommon(const RunLog &log, const RunPlan *plan, bool logConfig, bool logSteps, bool logExit, bool logStepTime, bool logExitTime) const; template void logCommon(T &writer, const RunLog &log, const RunPlan *plan, bool logConfig, bool logSteps, bool logExit, bool logStepTime, bool logExitTime) const; template void logConfig(T &writer, const RunLog &log) const; template void logConfig(T &writer, const RunPlan &plan) const; template void logPerformanceSpecs(T& writer, const RunLog& log) const; template void logSteps(T &writer, const RunLog &log, bool logTime) const; template void logExit(T &writer, const RunLog &log, bool logTime) const; template void writeLogFrame(T &writer, const StepLogFrame&log, bool logTime) const; template void writeLogFrame(T& writer, const ExitLogFrame& log, bool logTime) const; template void writeCommonLogFrame(T& writer, const LogFrame& log) const; template void writeAny(T &writer, const detail::Any &value, unsigned int elements = 1) const; std::string out_path; bool prettyPrint; bool truncateFile; }; } // namespace io } // namespace flamegpu #endif // INCLUDE_FLAMEGPU_IO_JSONLOGGER_H_