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

Logger writers' registry. More...

#include <writerRegistry.hpp>

Inheritance diagram for anch::log::WriterRegistry:
Collaboration diagram for anch::log::WriterRegistry:

Public Member Functions

 WriterRegistry (const WriterRegistry &other)=delete
 WriterRegistry (WriterRegistry &&other)=delete
void registerWriter (const std::string &name, const anch::log::CreateWriter &writerBuilder)
bool contains (const std::string &name) const
anch::log::Writercreate (const std::string &name, bool threadSafe, bool lowPriority, const anch::conf::Section &section)

Additional Inherited Members

Static Public Member Functions inherited from anch::Singleton< WriterRegistry >
static WriterRegistry & getInstance ()

Detailed Description

Logger writers' registry.

Global logger writers' registry

Author
Vincent Lachenal
Since
0.1

Constructor & Destructor Documentation

◆ WriterRegistry() [1/2]

anch::log::WriterRegistry::WriterRegistry ( const WriterRegistry & other)
delete

Forbids WriterRegistry copy constructor

Parameters
otherthe WriterRegistry not to copy

◆ WriterRegistry() [2/2]

anch::log::WriterRegistry::WriterRegistry ( WriterRegistry && other)
delete

Forbids WriterRegistry move constructor

Parameters
otherthe WriterRegistry not to move

Member Function Documentation

◆ contains()

bool anch::log::WriterRegistry::contains ( const std::string & name) const

Check if a writer's name has been registered

Parameters
namethe writer name to check
Returns
true when writer has been registered, false otherwise

◆ create()

anch::log::Writer * anch::log::WriterRegistry::create ( const std::string & name,
bool threadSafe,
bool lowPriority,
const anch::conf::Section & section )

Create new writer instance

Parameters
namethe writer's name
threadSafedefault thread safe flag
lowPrioritydefault low priority flag
sectionthe writer section
Returns
the new writer

◆ registerWriter()

void anch::log::WriterRegistry::registerWriter ( const std::string & name,
const anch::log::CreateWriter & writerBuilder )

Register writer

Parameters
namethe writer's name
writerBuilderthe wrtier builder function

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