Commit Graph

31 Commits

Author SHA1 Message Date
Peter Johnson
a8836b7665 Value: Use variant of enable_if to fix MakeString/MakeRaw in GCC.
Tested on GCC 4.8, GCC 4.9, and clang 3.6.
2015-08-22 14:01:33 -07:00
Peter Johnson
c41341c7e3 Clean up trailing whitespace. 2015-08-19 20:41:59 -07:00
Peter Johnson
8d7cdeabbf Implement remote procedure calls. 2015-08-13 21:32:16 -07:00
Peter Johnson
0cbcfbc3f0 Import llvm::DenseMap.
Bring in (most of) MathExtras.h as well, as it's shared by SmallVector and
DenseMap.
2015-08-12 17:08:45 -07:00
Peter Johnson
00feb67064 Only use enable_if template on Windows.
This isn't required and doesn't compile on older GCC versions.
2015-08-04 19:59:45 -07:00
Peter Johnson
4146db6fc8 Visual Studio 2013 compilation fixes.
- Missing header file callouts in some cases (library deltas)
- Lack of support for auto parameters in lambdas
- Defining of ERROR by windows.h
- Dispatcher::Connection needs a move constructor (default not generated)
- Need explicit enable_if on std::string move template in Value to avoid trying to move const char[] (string literal)
- Compile flags
2015-08-03 01:27:02 -07:00
Peter Johnson
06e8d835dd Provide ostream output for StringRef. 2015-07-31 23:20:59 -07:00
Peter Johnson
4356e313ec Add logging framework.
DEBUG messages are completely optimized out if NDEBUG is defined.
2015-07-31 22:41:26 -07:00
Peter Johnson
ae070aca70 Value: Add type check functions. 2015-07-24 22:11:57 -07:00
Peter Johnson
3f24b86875 ITable: Add Persist function to make a key persistent. 2015-07-23 21:53:33 -07:00
Peter Johnson
196fcf791b ITable: Const'ify getter functions. 2015-07-23 21:46:30 -07:00
Peter Johnson
6bccf528d7 ITableListener.h: Forward declare ITable. 2015-07-23 21:41:30 -07:00
Peter Johnson
1fc03803cd ITableListener::ValueChanged: Don't make key const. 2015-07-23 21:40:24 -07:00
Peter Johnson
8fa0e6c914 Add shims for old NetworkTable interface.
This provides classes for virtual subtables using path delimiters within
the global NetworkTable namespace.
2015-07-23 01:23:09 -07:00
Peter Johnson
6f940bcaaf Add immediate_notify and is_new to entry listener.
On the callback function, is_new indicates the value is newly added.

On adding a callback function, immediate_notify indicates the callback
should be called once (with is_new=true) for each matching entry that
already exists.
2015-07-23 01:02:53 -07:00
Peter Johnson
79f732f239 Import llvm::SmallString and dependencies.
Update StringRef and StringExtras with SmallVector functions.
2015-07-22 22:29:46 -07:00
Peter Johnson
593bc28446 Move StringMap.h and StringExtras.h to public includes.
While these aren't required by the public interface, they are generally
useful classes for users of the library.
2015-07-22 22:10:56 -07:00
Peter Johnson
9c204533e8 Value: Disambiguate std::string&& and StringRef.
Making the former a template causes the compiler to prefer the latter
when given a bare C string.
2015-07-22 22:08:13 -07:00
Peter Johnson
4c14f7823a ntcore_cpp.h: Comment cleanup. 2015-07-22 21:41:25 -07:00
Peter Johnson
8bbe5f9fdb ArrayRef: Add portability checks for constexpr. 2015-07-20 20:49:49 -07:00
Peter Johnson
98d45777c6 Remove unnecessary llvm qualifier. 2015-07-20 00:19:20 -07:00
Peter Johnson
1cc148848b StartServer: Take persist_filename as a StringRef. 2015-07-19 16:11:56 -07:00
Peter Johnson
c4a7f6ec9b SavePersistent: Safely save through temp file.
Also change SavePersistent and LoadPersistent to take StringRef.
2015-07-18 00:39:08 -07:00
Peter Johnson
3025a7e51e Finish C wrappers. 2015-07-17 08:47:25 -07:00
Peter Johnson
fcbd2751ba Provide C++ API. Move all classes to "nt" namespace.
The C API is now just simple wrappers around the C++ API.
2015-07-17 07:21:07 -07:00
Peter Johnson
05e084364a Start implementing LoadPersistent.
Switch to using fstream instead of stdio.

Change-Id: I600a8748a0b3dcf24740d63cc296df000abc388d
2015-07-11 09:33:33 -07:00
Peter Johnson
2a1ccaff1e Add timestamp function NT_Now().
Change-Id: I797a220308cd64ca0545222b433a18aa2294bac5
2015-07-11 09:33:33 -07:00
Peter Johnson
1a48e75d43 Implement SavePersistent.
Change-Id: I0b635b3e17dcfb6f238f57f2bff5575538ab7743
2015-07-11 09:33:32 -07:00
Peter Johnson
a896a3ade5 Import LLVM StringMap et al.
Change-Id: Ic48c722c2856c7aa36001935adbcf31b986ac1f3
2015-07-11 09:33:32 -07:00
Peter Johnson
047cccda89 Refactor WireEncoder.
Change-Id: I50106755ce5571821d6e36767b16d08b91f054de
2015-07-11 09:33:32 -07:00
Peter Johnson
842fb957a6 ntcore: Initial commit.
Change-Id: Id8df275a34aaa628581b18e39014b880c29bf9b2
2015-07-11 09:33:32 -07:00