Celeritas  0.5.0-57+aeecb15
Classes | Functions
OutputInterface.hh File Reference
#include <iosfwd>
#include <string>
#include <string_view>
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::OutputInterface
 Pure abstract interface for writing metadata output to JSON. More...
 

Functions

char const * celeritas::to_cstring (Category value)
 Get a string corresponding to a category.
 
std::string celeritas::to_string (OutputInterface const &output)
 Get the JSON representation of a single output. More...
 
std::ostream & celeritas::operator<< (std::ostream &os, OutputInterface const &output)
 Stream the JSON representation of a single output.
 

Function Documentation

◆ to_string()

std::string celeritas::to_string ( OutputInterface const &  output)

Get the JSON representation of a single output.

This is used mostly for testing, but it can also be useful for quickly generating useful JSON output from applications, e.g. with exception output.