AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::logger::MapDiagnosticContext Class Reference

Map Diagnostic Context. More...

#include <mdc.hpp>

+ Collaboration diagram for anch::logger::MapDiagnosticContext:

Public Member Functions

 MapDiagnosticContext ()
 
 MapDiagnosticContext (const MapDiagnosticContext &)=delete
 
 MapDiagnosticContext (MapDiagnosticContext &&)=delete
 
virtual ~MapDiagnosticContext ()
 
void add (const std::string &key, const std::string &value) noexcept
 
void put (const std::string &key, const std::string &value) noexcept
 
void remove (const std::string &key) noexcept
 
const std::map< std::string, std::string > & get () const noexcept
 
void reset () noexcept
 
void copy (const MapDiagnosticContext &other) noexcept
 

Detailed Description

Map Diagnostic Context.

Logger diagntostic context for logger (or other usage)

Since
0.1
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ MapDiagnosticContext() [1/3]

anch::logger::MapDiagnosticContext::MapDiagnosticContext ( )

MapDiagnosticContext default constructor

◆ MapDiagnosticContext() [2/3]

anch::logger::MapDiagnosticContext::MapDiagnosticContext ( const MapDiagnosticContext & )
delete

Forbids MapDiagnosticContext copy constructor

+ Here is the call graph for this function:

◆ MapDiagnosticContext() [3/3]

anch::logger::MapDiagnosticContext::MapDiagnosticContext ( MapDiagnosticContext && )
delete

Forbids MapDiagnosticContext move constructor

+ Here is the call graph for this function:

◆ ~MapDiagnosticContext()

virtual anch::logger::MapDiagnosticContext::~MapDiagnosticContext ( )
virtual

Private MapDiagnosticContext move destructor

Member Function Documentation

◆ add()

void anch::logger::MapDiagnosticContext::add ( const std::string & key,
const std::string & value )
noexcept

Add value to context if not exists

Parameters
keythe key
valuethe value

◆ copy()

void anch::logger::MapDiagnosticContext::copy ( const MapDiagnosticContext & other)
noexcept

Copy diagnostics context from another one but thread identifier and constants

Parameters
otherthe diagnostic context to copy
+ Here is the call graph for this function:

◆ get()

const std::map< std::string, std::string > & anch::logger::MapDiagnosticContext::get ( ) const
noexcept

Retrieve the map diagnostic context

Returns
the map diagnostic context

◆ put()

void anch::logger::MapDiagnosticContext::put ( const std::string & key,
const std::string & value )
noexcept

Add or overwrite value to context

Parameters
keythe key
valuethe value

◆ remove()

void anch::logger::MapDiagnosticContext::remove ( const std::string & key)
noexcept

Remove value from context

Parameters
keythe key

◆ reset()

void anch::logger::MapDiagnosticContext::reset ( )
noexcept

Reset diagnostics context but thread identifier and constants

+ Here is the call graph for this function:

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