WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Value_internal.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2015. 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 NT_VALUE_INTERNAL_H_
9 #define NT_VALUE_INTERNAL_H_
10 
11 #include <memory>
12 #include <string>
13 
14 #include "llvm/StringRef.h"
15 #include "ntcore_c.h"
16 
17 namespace nt {
18 
19 class Value;
20 
21 void ConvertToC(const Value& in, NT_Value* out);
22 std::shared_ptr<Value> ConvertFromC(const NT_Value& value);
23 void ConvertToC(llvm::StringRef in, NT_String* out);
24 inline llvm::StringRef ConvertFromC(const NT_String& str) {
25  return llvm::StringRef(str.str, str.len);
26 }
27 
28 } // namespace nt
29 
30 #endif // NT_VALUE_INTERNAL_H_
NetworkTables Entry Value.
Definition: ntcore_c.h:80
A NetworkTables string.
Definition: ntcore_c.h:65
char * str
String contents (UTF-8).
Definition: ntcore_c.h:71
size_t len
Length of the string in bytes.
Definition: ntcore_c.h:76