CBMC
structured_datat Class Reference

A way of representing nested key/value data. More...

#include <structured_data.h>

+ Collaboration diagram for structured_datat:

Public Member Functions

 structured_datat (std::map< labelt, structured_data_entryt > data)
 
const std::map< labelt, structured_data_entryt > & data () const
 

Private Attributes

std::map< labelt, structured_data_entryt_data
 

Detailed Description

A way of representing nested key/value data.

Used for logging on any message handler. Usage:

{{labelt{{"my", "data"}},
{{labelt{{"my", "number"}},
{labelt{{"my", "string"}},
message() << data << eom;
A way of representing nested key/value data.
const std::map< labelt, structured_data_entryt > & data() const
static structured_data_entryt data_node(const jsont &data)
static structured_data_entryt entry(std::map< labelt, structured_data_entryt > children)

Then if the output dependending on the UI of the message handler, you'll get appropriately formatted data.

See to_xml(const structured_datat &), to_json(const structured_datat &), to_pretty(const structured_datat &) for details of the format.

Definition at line 73 of file structured_data.h.

Constructor & Destructor Documentation

◆ structured_datat()

structured_datat::structured_datat ( std::map< labelt, structured_data_entryt data)
explicit

Definition at line 108 of file structured_data.cpp.

Member Function Documentation

◆ data()

const std::map< labelt, structured_data_entryt > & structured_datat::data ( ) const

Definition at line 169 of file structured_data.cpp.

Member Data Documentation

◆ _data

std::map<labelt, structured_data_entryt> structured_datat::_data
private

Definition at line 80 of file structured_data.h.


The documentation for this class was generated from the following files: