CatapultServer  v0.5.0.1 (Elephant)
NetworkHeightConfiguration.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 networkheight {
28 
31  public:
33  uint8_t MaxNodes;
34 
35  private:
36  NetworkHeightConfiguration() = default;
37 
38  public:
41 
42  public:
45 
47  static NetworkHeightConfiguration LoadFromPath(const boost::filesystem::path& resourcesPath);
48  };
49 }}
catapult::networkheight::NetworkHeightConfiguration
Network height configuration settings.
Definition: NetworkHeightConfiguration.h:30
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::networkheight::NetworkHeightConfiguration::MaxNodes
uint8_t MaxNodes
Number of nodes that this node should communicate with during network height detection.
Definition: NetworkHeightConfiguration.h:33
catapult::networkheight::NetworkHeightConfiguration::Uninitialized
static NetworkHeightConfiguration Uninitialized()
Creates an uninitialized network height configuration.
Definition: NetworkHeightConfiguration.cpp:30
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
ConfigurationFileLoader.h
ConfigurationUtils.h
LOAD_NETWORKHEIGHT_PROPERTY
#define LOAD_NETWORKHEIGHT_PROPERTY(NAME)
catapult::networkheight::NetworkHeightConfiguration::LoadFromBag
static NetworkHeightConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a network height configuration from bag.
Definition: NetworkHeightConfiguration.cpp:34
ConfigurationBag.h
catapult
Definition: AddressExtractionExtension.cpp:28
NetworkHeightConfiguration.h
catapult::networkheight::NetworkHeightConfiguration::NetworkHeightConfiguration
NetworkHeightConfiguration()=default
catapult::networkheight::NetworkHeightConfiguration::LoadFromPath
static NetworkHeightConfiguration LoadFromPath(const boost::filesystem::path &resourcesPath)
Loads a network height configuration from resourcesPath.
Definition: NetworkHeightConfiguration.cpp:49