WPILibC++  unspecified
Value_internal.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2015-2018. 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 <llvm/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(llvm::StringRef in, NT_String* out);
25 inline llvm::StringRef ConvertFromC(const NT_String& str) {
26  return llvm::StringRef(str.str, str.len);
27 }
28 
29 } // namespace nt
30 
31 #endif // NTCORE_VALUE_INTERNAL_H_
NetworkTables Entry Value.
Definition: ntcore_c.h:110
Definition: IEntryNotifier.h:16
A NetworkTables string.
Definition: ntcore_c.h:93
char * str
String contents (UTF-8).
Definition: ntcore_c.h:100
size_t len
Length of the string in bytes.
Definition: ntcore_c.h:106
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42