mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Provide C++ API. Move all classes to "nt" namespace.
The C API is now just simple wrappers around the C++ API.
This commit is contained in:
committed by
Peter Johnson
parent
56f1481c24
commit
fcbd2751ba
@@ -9,15 +9,14 @@
|
||||
#define NT_STORAGE_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
|
||||
#include "ntcore.h"
|
||||
|
||||
#include "Value.h"
|
||||
#include "llvm/StringMap.h"
|
||||
#include "nt_Value.h"
|
||||
|
||||
namespace ntimpl {
|
||||
namespace nt {
|
||||
|
||||
class StorageEntry {
|
||||
public:
|
||||
@@ -53,8 +52,9 @@ class Storage {
|
||||
const EntriesMap& entries() const { return m_entries; }
|
||||
|
||||
void SavePersistent(std::ostream& os) const;
|
||||
bool LoadPersistent(std::istream& is,
|
||||
void (*warn)(std::size_t line, const char* msg));
|
||||
bool LoadPersistent(
|
||||
std::istream& is,
|
||||
std::function<void(std::size_t line, const char* msg)> warn);
|
||||
|
||||
private:
|
||||
Storage();
|
||||
@@ -66,6 +66,6 @@ class Storage {
|
||||
static std::unique_ptr<Storage> m_instance;
|
||||
};
|
||||
|
||||
} // namespace ntimpl
|
||||
} // namespace nt
|
||||
|
||||
#endif // NT_STORAGE_H_
|
||||
|
||||
Reference in New Issue
Block a user