WPILibC++  unspecified
Value_internal.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2015-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef NTCORE_VALUE_INTERNAL_H_
9 #define NTCORE_VALUE_INTERNAL_H_
10 
11 #include <memory>
12 #include <string>
13 
14 #include <wpi/StringRef.h>
15 
16 #include "ntcore_c.h"
17 
18 namespace nt {
19 
20 class Value;
21 
22 void ConvertToC(const Value& in, NT_Value* out);
23 std::shared_ptr<Value> ConvertFromC(const NT_Value& value);
24 void ConvertToC(wpi::StringRef in, NT_String* out);
25 inline wpi::StringRef ConvertFromC(const NT_String& str) {
26  return wpi::StringRef(str.str, str.len);
27 }
28 
29 } // namespace nt
30 
31 #endif // NTCORE_VALUE_INTERNAL_H_
NetworkTables Entry Value.
Definition: ntcore_c.h:114
Definition: IStorage.h:21
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
A NetworkTables string.
Definition: ntcore_c.h:97
char * str
String contents (UTF-8).
Definition: ntcore_c.h:104
size_t len
Length of the string in bytes.
Definition: ntcore_c.h:110