Now you can download a copy of these docs so you can use them offline! Download now
StringArray.cpp
1 /*
2  * StringArray
3  *
4  * Created on: Nov 16, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #include "networktables2/type/StringArray.h"
9 #include "networktables2/type/DefaultEntryTypes.h"
10 
11 
12 const TypeId StringArray::STRING_ARRAY_RAW_ID = 0x12;
13 ArrayEntryType StringArray::TYPE(STRING_ARRAY_RAW_ID, DefaultEntryTypes::STRING);
14 
15 StringArray::StringArray() : ArrayData(TYPE) {
16 }
17 
18 std::string StringArray::get(int index){
19  return *(std::string*)_get(index).ptr;
20 }
21 
22 void StringArray::set(int index, std::string value){
23  EntryValue eValue;
24  eValue.ptr = &value;
25  _set(index, eValue);
26 }
27 
28 void StringArray::add(std::string value){
29  EntryValue eValue;
30  eValue.ptr = &value;
31  _add(eValue);
32 }
EntryValue _get(unsigned int index)
Definition: ArrayData.cpp:25
void _set(unsigned int index, EntryValue value)
Definition: ArrayData.cpp:29
void _add(EntryValue value)
Definition: ArrayData.cpp:34
Definition: ITable.h:13

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6