WPILibC++
2019.2.1-26-ge8b2471
|
A network table entry value. More...
#include <NetworkTableValue.h>
Public Member Functions | |
Value (NT_Type type, uint64_t time, const private_init &) | |
NT_Type | type () const |
Get the data type. More... | |
const NT_Value & | value () const |
Get the data value stored. More... | |
uint64_t | last_change () const |
Get the creation time of the value. More... | |
uint64_t | time () const |
Get the creation time of the value. More... | |
Value (const Value &)=delete | |
Value & | operator= (const Value &)=delete |
Type Checkers | |
bool | IsValid () const |
Determine if entry value contains a value or is unassigned. More... | |
bool | IsBoolean () const |
Determine if entry value contains a boolean. More... | |
bool | IsDouble () const |
Determine if entry value contains a double. More... | |
bool | IsString () const |
Determine if entry value contains a string. More... | |
bool | IsRaw () const |
Determine if entry value contains a raw. More... | |
bool | IsRpc () const |
Determine if entry value contains a rpc definition. More... | |
bool | IsBooleanArray () const |
Determine if entry value contains a boolean array. More... | |
bool | IsDoubleArray () const |
Determine if entry value contains a double array. More... | |
bool | IsStringArray () const |
Determine if entry value contains a string array. More... | |
Type-Safe Getters | |
bool | GetBoolean () const |
Get the entry's boolean value. More... | |
double | GetDouble () const |
Get the entry's double value. More... | |
StringRef | GetString () const |
Get the entry's string value. More... | |
StringRef | GetRaw () const |
Get the entry's raw value. More... | |
StringRef | GetRpc () const |
Get the entry's rpc definition value. More... | |
ArrayRef< int > | GetBooleanArray () const |
Get the entry's boolean array value. More... | |
ArrayRef< double > | GetDoubleArray () const |
Get the entry's double array value. More... | |
ArrayRef< std::string > | GetStringArray () const |
Get the entry's string array value. More... | |
Static Public Member Functions | |
Factory functions | |
static std::shared_ptr< Value > | MakeBoolean (bool value, uint64_t time=0) |
Creates a boolean entry value. More... | |
static std::shared_ptr< Value > | MakeDouble (double value, uint64_t time=0) |
Creates a double entry value. More... | |
static std::shared_ptr< Value > | MakeString (const Twine &value, uint64_t time=0) |
Creates a string entry value. More... | |
template<typename T , typename std::enable_if< std::is_same< T, std::string >::value >::type > | |
static std::shared_ptr< Value > | MakeString (T &&value, uint64_t time=0) |
Creates a string entry value. More... | |
static std::shared_ptr< Value > | MakeRaw (StringRef value, uint64_t time=0) |
Creates a raw entry value. More... | |
template<typename T , typename std::enable_if< std::is_same< T, std::string >::value >::type > | |
static std::shared_ptr< Value > | MakeRaw (T &&value, uint64_t time=0) |
Creates a raw entry value. More... | |
static std::shared_ptr< Value > | MakeRpc (StringRef value, uint64_t time=0) |
Creates a rpc entry value. More... | |
template<typename T > | |
static std::shared_ptr< Value > | MakeRpc (T &&value, uint64_t time=0) |
Creates a rpc entry value. More... | |
static std::shared_ptr< Value > | MakeBooleanArray (ArrayRef< bool > value, uint64_t time=0) |
Creates a boolean array entry value. More... | |
static std::shared_ptr< Value > | MakeBooleanArray (ArrayRef< int > value, uint64_t time=0) |
Creates a boolean array entry value. More... | |
static std::shared_ptr< Value > | MakeDoubleArray (ArrayRef< double > value, uint64_t time=0) |
Creates a double array entry value. More... | |
static std::shared_ptr< Value > | MakeStringArray (ArrayRef< std::string > value, uint64_t time=0) |
Creates a string array entry value. More... | |
static std::shared_ptr< Value > | MakeStringArray (std::vector< std::string > &&value, uint64_t time=0) |
Creates a string array entry value. More... | |
Friends | |
bool | operator== (const Value &lhs, const Value &rhs) |
A network table entry value.
|
inline |
Get the entry's boolean value.
|
inline |
Get the entry's boolean array value.
|
inline |
Get the entry's double value.
|
inline |
Get the entry's double array value.
|
inline |
Get the entry's raw value.
|
inline |
Get the entry's rpc definition value.
|
inline |
Get the entry's string value.
|
inline |
Get the entry's string array value.
|
inline |
Determine if entry value contains a boolean.
|
inline |
Determine if entry value contains a boolean array.
|
inline |
Determine if entry value contains a double.
|
inline |
Determine if entry value contains a double array.
|
inline |
Determine if entry value contains a raw.
|
inline |
Determine if entry value contains a rpc definition.
|
inline |
Determine if entry value contains a string.
|
inline |
Determine if entry value contains a string array.
|
inline |
Determine if entry value contains a value or is unassigned.
|
inline |
Get the creation time of the value.
|
inlinestatic |
Creates a boolean entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a boolean array entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a boolean array entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a double entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a double array entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a raw entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a raw entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a rpc entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a rpc entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a string entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a string entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a string array entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a string array entry value.
value | the value |
time | if nonzero, the creation time to use (instead of the current time) |
|
inline |
Get the creation time of the value.
|
inline |
Get the data type.
|
inline |
Get the data value stored.