mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Add missing SubTableListener methods to C++ NetworkTable (#1465)
This commit is contained in:
committed by
Peter Johnson
parent
b64dfacff3
commit
3d546428ab
@@ -56,6 +56,7 @@ class NetworkTable final : public ITable {
|
||||
mutable wpi::StringMap<NT_Entry> m_entries;
|
||||
typedef std::pair<ITableListener*, NT_EntryListener> Listener;
|
||||
std::vector<Listener> m_listeners;
|
||||
std::vector<NT_EntryListener> m_lambdaListeners;
|
||||
|
||||
static std::vector<std::string> s_ip_addresses;
|
||||
static std::string s_persistent_filename;
|
||||
@@ -338,14 +339,14 @@ class NetworkTable final : public ITable {
|
||||
* @return Listener handle
|
||||
*/
|
||||
NT_EntryListener AddSubTableListener(TableListener listener,
|
||||
bool localNotify = false) const;
|
||||
bool localNotify = false);
|
||||
|
||||
/**
|
||||
* Remove a sub-table listener.
|
||||
*
|
||||
* @param listener listener handle
|
||||
*/
|
||||
void RemoveTableListener(NT_EntryListener listener) const;
|
||||
void RemoveTableListener(NT_EntryListener listener);
|
||||
|
||||
WPI_DEPRECATED(
|
||||
"use AddEntryListener() instead with flags value of NT_NOTIFY_NEW | "
|
||||
|
||||
@@ -31,7 +31,7 @@ using wpi::StringRef;
|
||||
* @ingroup ntcore_cpp_api
|
||||
*/
|
||||
typedef std::function<void(NetworkTable* parent, StringRef name,
|
||||
NetworkTable* table)>
|
||||
std::shared_ptr<NetworkTable> table)>
|
||||
TableListener;
|
||||
|
||||
} // namespace nt
|
||||
|
||||
Reference in New Issue
Block a user