AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
JSONFormatter Class Reference
Inheritance diagram for JSONFormatter:
Collaboration diagram for JSONFormatter:

Public Member Functions

 JSONFormatter ()=delete
 JSONFormatter (const JSONFormatter &formatter)=delete
 JSONFormatter (JSONFormatter &&formatter)=delete
 JSONFormatter (std::ostream &output, const MappingOptions &options, bool color, bool null)
void addField ()
virtual void handle (const anch::events::Event< JSONItem > &event) noexcept
Public Member Functions inherited from anch::events::Observer< JSONItem >
virtual void handle (const anch::events::Event< JSONItem > &event) noexcept=0

Detailed Description

JSON formatter on event

Todo
manage array value more precisely
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ JSONFormatter() [1/4]

JSONFormatter::JSONFormatter ( )
delete

Forbids JSONFormatter default constructor

◆ JSONFormatter() [2/4]

JSONFormatter::JSONFormatter ( const JSONFormatter & formatter)
delete

Forbids JSONFormatter copy constructor

Parameters
formatterthe JSON formatter not to copy
Here is the call graph for this function:

◆ JSONFormatter() [3/4]

JSONFormatter::JSONFormatter ( JSONFormatter && formatter)
delete

Forbids JSONFormatter move constructor

Parameters
formatterthe JSON formatter not to move
Here is the call graph for this function:

◆ JSONFormatter() [4/4]

JSONFormatter::JSONFormatter ( std::ostream & output,
const MappingOptions & options,
bool color,
bool null )
inline

JSONFormatter constructor

Parameters
outputthe ouput stream
optionsthe mapping options
colorthe output color options

Member Function Documentation

◆ addField()

void JSONFormatter::addField ( )
inline

Serialize field when set

◆ handle()

virtual void JSONFormatter::handle ( const anch::events::Event< JSONItem > & event)
inlinevirtualnoexcept

Write data in output stream according to options

Parameters
eventthe event to treat
Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • anch-json/utils/jsonFormat.cpp