]> git.stg.codes - stg.git/blob - include/stg/service_conf.h
Default constructor added for SERVICE_CONF
[stg.git] / include / stg / service_conf.h
1 #ifndef SERVICE_CONF_H
2 #define SERVICE_CONF_H
3
4 #include <string>
5
6 struct SERVICE_CONF
7 {
8 SERVICE_CONF()
9     : name(), comment(), cost(0), payDay(0)
10 {}
11 SERVICE_CONF(const std::string & n)
12     : name(n), comment(), cost(0), payDay(0)
13 {}
14 SERVICE_CONF(const std::string & n, double c)
15     : name(n), comment(), cost(c), payDay(0)
16 {}
17 SERVICE_CONF(const std::string & n, double c, unsigned p)
18     : name(n), comment(), cost(c), payDay(p)
19 {}
20 SERVICE_CONF(const std::string & n, double c,
21              unsigned p, const std::string & com)
22     : name(n), comment(com), cost(c), payDay(p)
23 {}
24
25 std::string name;
26 std::string comment;
27 double      cost;
28 unsigned    payDay;
29 };
30
31 inline
32 bool operator==(const SERVICE_CONF & a, const SERVICE_CONF & b)
33 {
34 return a.name == b.name;
35 }
36
37 #endif //SERVICE_CONF_H
38