35 explicit MasterGroup(
const std::string& name,
const std::string& slave_name,
const std::string& slave_group_name,
double flow_limit_fraction) :
37 m_slave_name{slave_name},
38 m_slave_group_name{slave_group_name},
39 m_flow_limit_fraction{flow_limit_fraction}
43 const std::string name()
const {
46 const std::string slaveName()
const {
47 return this->m_slave_name;
49 const std::string slaveGroupName()
const {
50 return this->m_slave_group_name;
52 double flowLimitFraction()
const {
53 return this->m_flow_limit_fraction;
55 void name(
const std::string& value) {
58 void slaveName(
const std::string& value) {
59 this->m_slave_name = value;
61 void slaveGroupName(
const std::string& value) {
62 this->m_slave_group_name = value;
64 void flowLimitFraction(
double value) {
65 this->m_flow_limit_fraction = value;
69 template<
class Serializer>
73 serializer(m_slave_name);
74 serializer(m_slave_group_name);
75 serializer(m_flow_limit_fraction);
80 std::string m_slave_name{};
81 std::string m_slave_group_name{};
82 double m_flow_limit_fraction{};
89 explicit Slave(
const std::string& name,
const std::string& data_filename,
const std::string& directory_path,
unsigned int numprocs) :
91 m_data_filename{data_filename},
92 m_directory_path{directory_path},
95 static Slave serializationTestObject();
97 const std::string& name()
const {
100 const std::string& dataFilename()
const {
101 return this->m_data_filename;
103 const std::string& directoryPath()
const {
104 return this->m_directory_path;
106 unsigned int numprocs()
const {
107 return this->m_numprocs;
110 void name(
const std::string& value) {
111 this->m_name = value;
113 void dataFilename(
const std::string& value) {
114 this->m_data_filename = value;
116 void directoryPath(
const std::string& value) {
117 this->m_directory_path = value;
119 void numprocs(
unsigned int value) {
120 this->m_numprocs = value;
122 bool operator==(
const Slave& other)
const;
124 template<
class Serializer>
128 serializer(m_data_filename);
129 serializer(m_directory_path);
130 serializer(m_numprocs);
133 std::string m_name{};
134 std::string m_data_filename{};
135 std::string m_directory_path{};
136 unsigned int m_numprocs{};
144 std::map<std::string, Slave>& slaves() {
145 return this->m_slaves;
147 std::map<std::string, MasterGroup>& masterGroups() {
148 return this->m_master_groups;
151 bool hasSlave(
const std::string& name)
const {
152 return m_slaves.find(name) != m_slaves.end();
154 const Slave& slave(
const std::string& name)
const {
155 return m_slaves.at(name);
157 bool hasMasterGroup(
const std::string& name)
const {
158 return m_master_groups.find(name) != m_master_groups.end();
160 const MasterGroup& masterGroup(
const std::string& name)
const {
161 return m_master_groups.at(name);
163 template<
class Serializer>
166 serializer(m_slaves);
167 serializer(m_master_groups);
170 std::map<std::string, Slave> m_slaves;
171 std::map<std::string, MasterGroup> m_master_groups;