Dennis Shen | 1dc9ad4 | 2023-05-12 00:21:55 +0000 | [diff] [blame] | 1 | #ifndef {namespace}_HEADER_H |
| 2 | #define {namespace}_HEADER_H |
| 3 | #include "{namespace}.h" |
| 4 | {{ if readwrite }} |
| 5 | #include <server_configurable_flags/get_flags.h> |
| 6 | using namespace server_configurable_flags; |
| 7 | {{ endif }} |
| 8 | namespace {namespace} \{ |
| 9 | {{ for item in class_elements}} |
| 10 | class {item.flag_name} \{ |
| 11 | public: |
| 12 | virtual const bool value() \{ |
| 13 | {{ if item.readwrite- }} |
| 14 | return GetServerConfigurableFlag( |
| 15 | "{namespace}", |
| 16 | "{item.flag_name}", |
| 17 | "{item.default_value}") == "true"; |
| 18 | {{ -else- }} |
| 19 | return {item.default_value}; |
| 20 | {{ -endif }} |
| 21 | } |
| 22 | } |
| 23 | {{ endfor }} |
| 24 | } |
| 25 | #endif |