8 #include "networktables2/type/DefaultEntryTypes.h"
9 #include "networktables2/type/NetworkTableEntryType.h"
10 #include "networktables2/connection/DataIOStream.h"
11 #include "networktables2/type/BooleanArray.h"
12 #include "networktables2/type/NumberArray.h"
13 #include "networktables2/type/StringArray.h"
16 DefaultEntryTypes::BOOLEAN_t DefaultEntryTypes::BOOLEAN;
17 DefaultEntryTypes::DOUBLE_t DefaultEntryTypes::DOUBLE;
18 DefaultEntryTypes::STRING_t DefaultEntryTypes::STRING;
22 os.writeByte(value.b);
26 value.b = (is.readByte()!=0);
35 uint64_t value = *
reinterpret_cast<uint64_t*
>(&eValue.f);
36 for(
int i = 0; i<8; ++i){
37 os.writeByte((value>>56)&0xFF);
44 for(
int i = 0; i<8; ++i){
46 value |= (is.readByte()&0xFF);
50 eValue.f = *
reinterpret_cast<double*
>(&value);
59 os.writeString(*(std::string*)value.ptr);
63 value.ptr = is.readString();
70 newValue.ptr =
new std::string(*((std::string*)value.ptr));
73 void DefaultEntryTypes::STRING_t::deleteValue(
EntryValue value){
75 delete (std::string*)value.ptr;
78 std::string* str1 = (std::string*)v1.ptr;
79 std::string* str2 = (std::string*)v2.ptr;
80 return str1->compare(*str2)==0;
void RegisterType(NetworkTableEntryType &type)
static void registerTypes(NetworkTableEntryTypeManager *typeManager)