mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
committed by
Peter Johnson
parent
3d2f41d081
commit
417cf33f90
@@ -562,6 +562,11 @@ class NetworkTable : public ITable {
|
||||
* does not exist
|
||||
*/
|
||||
std::shared_ptr<nt::Value> GetValue(llvm::StringRef key) const override;
|
||||
|
||||
/**
|
||||
* Gets the full path of this table.
|
||||
*/
|
||||
llvm::StringRef GetPath() const override;
|
||||
};
|
||||
|
||||
#endif // NETWORKTABLE_H_
|
||||
|
||||
@@ -482,6 +482,12 @@ class ITable {
|
||||
* @param listener the listener to be removed
|
||||
*/
|
||||
virtual void RemoveTableListener(ITableListener* listener) = 0;
|
||||
|
||||
/**
|
||||
* Gets the full path of this table.
|
||||
*/
|
||||
virtual llvm::StringRef GetPath() const = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // ITABLE_H_
|
||||
|
||||
@@ -1102,4 +1102,14 @@ public class NetworkTable implements ITable, IRemote {
|
||||
public double getDouble(String key, double defaultValue) {
|
||||
return getNumber(key, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -625,4 +625,10 @@ public interface ITable {
|
||||
*/
|
||||
@Deprecated
|
||||
public double getDouble(String key, double defaultValue);
|
||||
|
||||
/**
|
||||
* Gets the full path of this table.
|
||||
*/
|
||||
public String getPath();
|
||||
|
||||
}
|
||||
|
||||
@@ -576,3 +576,7 @@ std::shared_ptr<nt::Value> NetworkTable::GetValue(StringRef key) const {
|
||||
path += key;
|
||||
return nt::GetEntryValue(path);
|
||||
}
|
||||
|
||||
StringRef NetworkTable::GetPath() const {
|
||||
return m_path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user