WPILibC++  trunk
NetworkTableEntryType.h
1 /*
2  * NetworkTableEntryType.h
3  *
4  * Created on: Sep 16, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #ifndef NETWORKTABLEENTRYTYPE_H_
9 #define NETWORKTABLEENTRYTYPE_H_
10 
11 #include <stdlib.h>
12 #include <stdio.h>
13 #ifndef _WRS_KERNEL
14 #include <stdint.h>
15 #endif
16 
20 typedef uint8_t TypeId;
22 
23 #define MAX_NUM_TABLE_ENTRY_TYPES 256
24 
25 #include <string>
26 #include "networktables2/connection/DataIOStream.h"
27 #include "networktables2/NetworkTableEntry.h"
28 #include "tables/ITable.h"
29 
34 public:
35  const TypeId id;
36  const char* name;
37 
44  virtual bool isComplex();
45 
52  virtual void sendValue(EntryValue value, DataIOStream& os) = 0;
53 
61  virtual EntryValue readValue(DataIOStream& is) = 0;
62 
69  virtual EntryValue copyValue(EntryValue value);
70 
79  virtual bool areEqual(EntryValue v1, EntryValue v2) = 0;
80 
89  virtual void deleteValue(EntryValue value);
90  virtual ~NetworkTableEntryType();
91 protected:
99  NetworkTableEntryType(TypeId id, const char* name);
100 };
101 
102 #endif /* NETWORKTABLEENTRYTYPE_H_ */
virtual void sendValue(EntryValue value, DataIOStream &os)=0
virtual EntryValue readValue(DataIOStream &is)=0
NetworkTableEntryType(TypeId id, const char *name)
virtual bool isComplex()
virtual EntryValue copyValue(EntryValue value)
Definition: ITable.h:13
virtual bool areEqual(EntryValue v1, EntryValue v2)=0
virtual void deleteValue(EntryValue value)