Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:11:57

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2008 Google Inc.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_OPTIONS_H__
0009 #define GOOGLE_PROTOBUF_COMPILER_CSHARP_OPTIONS_H__
0010 
0011 #include <string>
0012 
0013 namespace google {
0014 namespace protobuf {
0015 namespace compiler {
0016 namespace csharp {
0017 
0018 // Generator options (used by csharp_generator.cc):
0019 struct Options {
0020   Options()
0021       : file_extension(".cs"),
0022         base_namespace(""),
0023         base_namespace_specified(false),
0024         internal_access(false),
0025         serializable(false),
0026         strip_nonfunctional_codegen(false) {}
0027   // Extension of the generated file. Defaults to ".cs"
0028   std::string file_extension;
0029   // Base namespace to use to create directory hierarchy. Defaults to "".
0030   // This option allows the simple creation of a conventional C# file layout,
0031   // where directories are created relative to a project-specific base
0032   // namespace. For example, in a project with a base namespace of PetShop, a
0033   // proto of user.proto with a C# namespace of PetShop.Model.Shared would
0034   // generate Model/Shared/User.cs underneath the specified --csharp_out
0035   // directory.
0036   //
0037   // If no base namespace is specified, all files are generated in the
0038   // --csharp_out directory, with no subdirectories created automatically.
0039   std::string base_namespace;
0040   // Whether the base namespace has been explicitly specified by the user.
0041   // This is required as the base namespace can be explicitly set to the empty
0042   // string, meaning "create a full directory hierarchy, starting from the first
0043   // segment of the namespace."
0044   bool base_namespace_specified;
0045   // Whether the generated classes should have accessibility level of "internal".
0046   // Defaults to false that generates "public" classes.
0047   bool internal_access;
0048   // Whether the generated classes should have a global::System.Serializable attribute added
0049   // Defaults to false
0050   bool serializable;
0051   // If true, strip out nonfunctional codegen.
0052   bool strip_nonfunctional_codegen;
0053 };
0054 
0055 }  // namespace csharp
0056 }  // namespace compiler
0057 }  // namespace protobuf
0058 }  // namespace google
0059 
0060 #endif  // GOOGLE_PROTOBUF_COMPILER_CSHARP_OPTIONS_H__