aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/csharp')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_generator.h8
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_helpers.h8
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_names.h20
3 files changed, 24 insertions, 12 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_generator.h b/src/google/protobuf/compiler/csharp/csharp_generator.h
index c8b19529..dc7319b1 100644
--- a/src/google/protobuf/compiler/csharp/csharp_generator.h
+++ b/src/google/protobuf/compiler/csharp/csharp_generator.h
@@ -37,6 +37,8 @@
#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -46,9 +48,9 @@ namespace csharp {
// header. If you create your own protocol compiler binary and you want
// it to support C# output, you can do so by registering an instance of this
// CodeGenerator with the CommandLineInterface in your main() function.
-class LIBPROTOC_EXPORT Generator
+class PROTOC_EXPORT Generator
: public google::protobuf::compiler::CodeGenerator {
-public:
+ public:
virtual bool Generate(
const FileDescriptor* file,
const string& parameter,
@@ -61,4 +63,6 @@ public:
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.h b/src/google/protobuf/compiler/csharp/csharp_helpers.h
index 8dd265bc..ec0b1c77 100644
--- a/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -42,6 +42,8 @@
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/io/printer.h>
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace compiler {
@@ -96,7 +98,8 @@ std::string UnderscoresToPascalCase(const std::string& input);
// Note that we wouldn't normally want to export this (we're not expecting
// it to be used outside libprotoc itself) but this exposes it for testing.
-std::string LIBPROTOC_EXPORT GetEnumValueName(const std::string& enum_name, const std::string& enum_value_name);
+std::string PROTOC_EXPORT GetEnumValueName(const std::string& enum_name,
+ const std::string& enum_value_name);
// TODO(jtattermusch): perhaps we could move this to strutil
std::string StringToBase64(const std::string& input);
@@ -145,4 +148,7 @@ inline bool IsWrapperType(const FieldDescriptor* descriptor) {
} // namespace compiler
} // namespace protobuf
} // namespace google
+
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_HELPERS_H__
diff --git a/src/google/protobuf/compiler/csharp/csharp_names.h b/src/google/protobuf/compiler/csharp/csharp_names.h
index 21758f28..87a16515 100644
--- a/src/google/protobuf/compiler/csharp/csharp_names.h
+++ b/src/google/protobuf/compiler/csharp/csharp_names.h
@@ -41,6 +41,8 @@
#include <string>
#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
@@ -57,14 +59,14 @@ namespace csharp {
//
// Returns:
// The namespace to use for given file descriptor.
-string LIBPROTOC_EXPORT GetFileNamespace(const FileDescriptor* descriptor);
+string PROTOC_EXPORT GetFileNamespace(const FileDescriptor* descriptor);
// Requires:
// descriptor != NULL
//
// Returns:
// The fully-qualified C# class name.
-string LIBPROTOC_EXPORT GetClassName(const Descriptor* descriptor);
+string PROTOC_EXPORT GetClassName(const Descriptor* descriptor);
// Requires:
// descriptor != NULL
@@ -73,7 +75,7 @@ string LIBPROTOC_EXPORT GetClassName(const Descriptor* descriptor);
// The fully-qualified name of the C# class that provides
// access to the file descriptor. Proto compiler generates
// such class for each .proto file processed.
-string LIBPROTOC_EXPORT GetReflectionClassName(const FileDescriptor* descriptor);
+string PROTOC_EXPORT GetReflectionClassName(const FileDescriptor* descriptor);
// Generates output file name for given file descriptor. If generate_directories
// is true, the output file will be put under directory corresponding to file's
@@ -89,16 +91,16 @@ string LIBPROTOC_EXPORT GetReflectionClassName(const FileDescriptor* descriptor)
// The file name to use as output file for given file descriptor. In case
// of failure, this function will return empty string and error parameter
// will contain the error message.
-string LIBPROTOC_EXPORT GetOutputFile(
- const google::protobuf::FileDescriptor* descriptor,
- const string file_extension,
- const bool generate_directories,
- const string base_namespace,
- string* error);
+string PROTOC_EXPORT
+GetOutputFile(const google::protobuf::FileDescriptor* descriptor,
+ const string file_extension, const bool generate_directories,
+ const string base_namespace, string* error);
} // namespace csharp
} // namespace compiler
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__