OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // http://code.google.com/p/protobuf/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
11 // * Redistributions in binary form must reproduce the above | 11 // * Redistributions in binary form must reproduce the above |
12 // copyright notice, this list of conditions and the following disclaimer | 12 // copyright notice, this list of conditions and the following disclaimer |
13 // in the documentation and/or other materials provided with the | 13 // in the documentation and/or other materials provided with the |
(...skipping 20 matching lines...) Expand all Loading... |
34 // from protocol-compiler-generated code, which may reside in other components. | 34 // from protocol-compiler-generated code, which may reside in other components. |
35 // It provides reflection support for generated enums, and is included in | 35 // It provides reflection support for generated enums, and is included in |
36 // generated .pb.h files and should have minimal dependencies. The methods are | 36 // generated .pb.h files and should have minimal dependencies. The methods are |
37 // implemented in generated_message_reflection.cc. | 37 // implemented in generated_message_reflection.cc. |
38 | 38 |
39 #ifndef GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ | 39 #ifndef GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ |
40 #define GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ | 40 #define GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ |
41 | 41 |
42 #include <string> | 42 #include <string> |
43 | 43 |
| 44 #include <google/protobuf/stubs/template_util.h> |
| 45 #include <google/protobuf/generated_enum_util.h> |
| 46 |
44 namespace google { | 47 namespace google { |
45 namespace protobuf { | 48 namespace protobuf { |
46 class EnumDescriptor; | 49 class EnumDescriptor; |
47 } // namespace protobuf | 50 } // namespace protobuf |
48 | 51 |
49 namespace protobuf { | 52 namespace protobuf { |
50 | 53 |
51 // Returns the EnumDescriptor for enum type E, which must be a | 54 // Returns the EnumDescriptor for enum type E, which must be a |
52 // proto-declared enum type. Code generated by the protocol compiler | 55 // proto-declared enum type. Code generated by the protocol compiler |
53 // will include specializations of this template for each enum type declared. | 56 // will include specializations of this template for each enum type declared. |
(...skipping 22 matching lines...) Expand all Loading... |
76 // Just a wrapper around printing the name of a value. The main point of this | 79 // Just a wrapper around printing the name of a value. The main point of this |
77 // function is not to be inlined, so that you can do this without including | 80 // function is not to be inlined, so that you can do this without including |
78 // descriptor.h. | 81 // descriptor.h. |
79 LIBPROTOBUF_EXPORT const string& NameOfEnum(const EnumDescriptor* descriptor, in
t value); | 82 LIBPROTOBUF_EXPORT const string& NameOfEnum(const EnumDescriptor* descriptor, in
t value); |
80 | 83 |
81 } // namespace internal | 84 } // namespace internal |
82 } // namespace protobuf | 85 } // namespace protobuf |
83 | 86 |
84 } // namespace google | 87 } // namespace google |
85 #endif // GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ | 88 #endif // GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ |
OLD | NEW |