handle converting a FileDescriptor to enum strings
| 94 | |
| 95 | // handle converting a FileDescriptor to enum strings |
| 96 | static std::string makeContents(const FileDescriptor& in) { |
| 97 | std::stringstream ret; |
| 98 | |
| 99 | std::string guard = makeGuard(in.name()); |
| 100 | ret << "#ifndef " << guard << std::endl; |
| 101 | ret << "#define " << guard << std::endl; |
| 102 | |
| 103 | handleContainer(in, ret); |
| 104 | for (size_t i=0; i<in.message_type_count(); i++) { |
| 105 | const auto* message = in.message_type(i); |
| 106 | handleMessage(*message, ret); |
| 107 | } |
| 108 | |
| 109 | ret << "#endif" << std::endl; |
| 110 | |
| 111 | return ret.str(); |
| 112 | } |
| 113 | |
| 114 | int main(int argc, char *argv[]) { |
| 115 | CodeGeneratorRequest request; |
no test coverage detected