Electroneum
Loading...
Searching...
No Matches
el::base::utils::Utils Class Reference

#include <easylogging++.h>

Static Public Member Functions

template<typename T, typename TPtr>
static bool installCallback (const std::string &id, std::unordered_map< std::string, TPtr > *mapT)
template<typename T, typename TPtr>
static void uninstallCallback (const std::string &id, std::unordered_map< std::string, TPtr > *mapT)
template<typename T, typename TPtr>
static Tcallback (const std::string &id, std::unordered_map< std::string, TPtr > *mapT)

Detailed Description

Definition at line 1554 of file easylogging++.h.

Member Function Documentation

◆ callback()

template<typename T, typename TPtr>
T * el::base::utils::Utils::callback ( const std::string & id,
std::unordered_map< std::string, TPtr > * mapT )
inlinestatic

Definition at line 1573 of file easylogging++.h.

1573 {
1574 typename std::unordered_map<std::string, TPtr>::iterator iter = mapT->find(id);
1575 if (iter != mapT->end()) {
1576 return static_cast<T*>(iter->second.get());
1577 }
1578 return nullptr;
1579 }
#define T(x)
Here is the caller graph for this function:

◆ installCallback()

template<typename T, typename TPtr>
bool el::base::utils::Utils::installCallback ( const std::string & id,
std::unordered_map< std::string, TPtr > * mapT )
inlinestatic

Definition at line 1557 of file easylogging++.h.

1557 {
1558 if (mapT->find(id) == mapT->end()) {
1559 mapT->insert(std::make_pair(id, TPtr(new T())));
1560 return true;
1561 }
1562 return false;
1563 }
Here is the caller graph for this function:

◆ uninstallCallback()

template<typename T, typename TPtr>
void el::base::utils::Utils::uninstallCallback ( const std::string & id,
std::unordered_map< std::string, TPtr > * mapT )
inlinestatic

Definition at line 1566 of file easylogging++.h.

1566 {
1567 if (mapT->find(id) != mapT->end()) {
1568 mapT->erase(id);
1569 }
1570 }
Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/easylogging++/easylogging++.h