8 #ifndef NTCORE_ISTORAGE_H_ 9 #define NTCORE_ISTORAGE_H_ 15 #include <llvm/ArrayRef.h> 16 #include <llvm/Twine.h> 19 #include "ntcore_cpp.h" 24 class INetworkConnection;
36 virtual void SetDispatcher(
IDispatcher* dispatcher,
bool server) = 0;
37 virtual void ClearDispatcher() = 0;
42 virtual NT_Type GetMessageEntryType(
unsigned int id)
const = 0;
44 virtual void ProcessIncoming(std::shared_ptr<Message> msg,
46 std::weak_ptr<INetworkConnection> conn_weak) = 0;
47 virtual void GetInitialAssignments(
49 std::vector<std::shared_ptr<Message>>* msgs) = 0;
50 virtual void ApplyInitialAssignments(
52 bool new_server, std::vector<std::shared_ptr<Message>>* out_msgs) = 0;
56 virtual const char* SavePersistent(
const Twine& filename,
57 bool periodic)
const = 0;
58 virtual const char* LoadPersistent(
59 const Twine& filename,
60 std::function<
void(
size_t line,
const char* msg)> warn) = 0;
65 #endif // NTCORE_ISTORAGE_H_ Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
Definition: IStorage.h:26
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:32
Definition: IEntryNotifier.h:16
Definition: IDispatcher.h:21
Definition: INetworkConnection.h:18