CatapultServer  v0.5.0.1 (Elephant)
TimeSynchronizationConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <boost/filesystem/path.hpp>
23 #include <string>
24 
25 namespace catapult { namespace utils { class ConfigurationBag; } }
26 
27 namespace catapult { namespace timesync {
28 
31  public:
33  uint8_t MaxNodes;
34 
35  private:
37 
38  public:
41 
42  public:
45 
47  static TimeSynchronizationConfiguration LoadFromPath(const boost::filesystem::path& resourcesPath);
48  };
49 }}
catapult::utils::VerifyBagSizeLte
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
catapult::timesync::TimeSynchronizationConfiguration::Uninitialized
static TimeSynchronizationConfiguration Uninitialized()
Creates an uninitialized time synchronization configuration.
Definition: TimeSynchronizationConfiguration.cpp:30
TimeSynchronizationConfiguration.h
LOAD_TIMESYNC_PROPERTY
#define LOAD_TIMESYNC_PROPERTY(NAME)
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
ConfigurationFileLoader.h
catapult::timesync::TimeSynchronizationConfiguration::MaxNodes
uint8_t MaxNodes
Number of nodes that this node should communicate with during time synchronization.
Definition: TimeSynchronizationConfiguration.h:33
catapult::timesync::TimeSynchronizationConfiguration::LoadFromBag
static TimeSynchronizationConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a time synchronization configuration from bag.
Definition: TimeSynchronizationConfiguration.cpp:34
catapult::timesync::TimeSynchronizationConfiguration::TimeSynchronizationConfiguration
TimeSynchronizationConfiguration()=default
ConfigurationUtils.h
ConfigurationBag.h
catapult::timesync::TimeSynchronizationConfiguration
Time synchronization configuration settings.
Definition: TimeSynchronizationConfiguration.h:30
catapult::timesync::TimeSynchronizationConfiguration::LoadFromPath
static TimeSynchronizationConfiguration LoadFromPath(const boost::filesystem::path &resourcesPath)
Loads a time synchronization configuration from resourcesPath.
Definition: TimeSynchronizationConfiguration.cpp:49
catapult
Definition: AddressExtractionExtension.cpp:28