[ntcore] Unify listeners (#4536)

This combines all 4 NT listener APIs (topic, value, connection, and
logging) into a single unified listener API.
This commit is contained in:
Peter Johnson
2022-10-31 21:52:14 -07:00
committed by GitHub
parent 32fbfb7da6
commit b114006543
71 changed files with 3613 additions and 5786 deletions

View File

@@ -13,11 +13,12 @@ wpi::mutex InstanceImpl::s_mutex;
using namespace std::placeholders;
InstanceImpl::InstanceImpl(int inst)
: logger_impl(inst),
logger(
std::bind(&LoggerImpl::Log, &logger_impl, _1, _2, _3, _4)), // NOLINT
connectionList(inst),
localStorage(inst, logger),
: listenerStorage{inst},
logger_impl{listenerStorage},
logger{
std::bind(&LoggerImpl::Log, &logger_impl, _1, _2, _3, _4)}, // NOLINT
connectionList{inst, listenerStorage},
localStorage{inst, listenerStorage, logger},
m_inst{inst} {
logger.set_min_level(logger_impl.GetMinLevel());
}