MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / BinaryEventDataSerializer

Class BinaryEventDataSerializer

WinArk/BinaryEventDataSerializer.h:5–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "CompoundFile.h"
4
5class BinaryEventDataSerializer : public IEventDataSerializer {
6public:
7 // Inherited via IEventDataSerializer
8 virtual bool Save(const std::vector<std::shared_ptr<EventData>>& events, const EventDataSerializerOptions& options, PCWSTR path) override;
9 virtual std::vector<std::shared_ptr<EventData>> Load(PCWSTR path) override;
10
11private:
12 void WriteMetadata(StructuredStorage::CompoundFile* file, const std::vector<std::shared_ptr<EventData>>& events);
13 void WriteEventData(StructuredStorage::StructuredDirectory* dir, const EventData* data);
14 void WriteSimpleData(StructuredStorage::StructuredDirectory* dir, PCWSTR streamName, const void* data, int size);
15 void WriteSimpleData(StructuredStorage::StructuredDirectory* dir, PCWSTR streamName, const std::wstring& value);
16 template<typename T>
17 void WriteSimpleData(StructuredStorage::StructuredDirectory* dir, PCWSTR streamName, const T& data) {
18 static_assert(std::is_trivially_constructible<T>::value);
19 WriteSimpleData(dir, streamName, &data, sizeof(data));
20 }
21};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected