CatapultServer  v0.5.0.1 (Elephant)
StateChangeReader.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <memory>
23 #include <vector>
24 
25 namespace catapult {
26  namespace cache { class CacheChangesStorage; }
27  namespace io { class InputStream; }
28  namespace subscribers { class StateChangeSubscriber; }
29 }
30 
31 namespace catapult { namespace subscribers {
32 
34  using CacheChangesStorages = std::vector<std::unique_ptr<const cache::CacheChangesStorage>>;
35 
38  io::InputStream& inputStream,
39  const CacheChangesStorages& cacheChangesStorages,
40  StateChangeSubscriber& subscriber);
41 }}
StateChangeReader.h
exceptions.h
catapult::subscribers::StateChangeSubscriber
State change subscriber.
Definition: StateChangeSubscriber.h:31
CacheChangesStorage.h
StateChangeInfo.h
catapult::subscribers::ReadNextStateChange
void ReadNextStateChange(io::InputStream &inputStream, const CacheChangesStorages &cacheChangesStorages, StateChangeSubscriber &subscriber)
Reads next state change from inputStream and forwards it to subscriber using cacheChangesStorages for...
Definition: StateChangeReader.cpp:63
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
catapult::io::Read8
auto Read8(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:90
catapult::subscribers::StateChangeOperationType::State_Change
State change.
catapult::cache::CacheChanges::MemoryCacheChangesContainer
std::vector< std::unique_ptr< const MemoryCacheChanges > > MemoryCacheChangesContainer
Memory cache changes container.
Definition: CacheChanges.h:114
catapult::cache::ReadCacheChanges
void ReadCacheChanges(io::InputStream &inputStream, MemoryCacheChangesT< TValue > &changes)
Reads serialized cache changes from inputStream.
Definition: CacheChangesSerializer.h:52
CATAPULT_THROW_INVALID_ARGUMENT_1
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
catapult::subscribers::StateChangeOperationType::Score_Change
Score change.
SubscriberOperationTypes.h
ChainScore
model::ChainScore ChainScore
Definition: tools/health/main.cpp:43
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::io::Read64
auto Read64(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:66
PodIoUtils.h
Stream.h
StateChangeSubscriber.h
catapult::subscribers::CacheChangesStorages
std::vector< std::unique_ptr< const cache::CacheChangesStorage > > CacheChangesStorages
Vector of cache changes storage unique pointers.
Definition: StateChangeReader.h:34