aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_field_base.cc
Commit message (Collapse)AuthorAgeFilesLines
* C# Proto2 feature : Field presence and default values (#4642)Sydney Acksman2018-09-241-53/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Compiler changes * Generated code changes * Library changes * Compiler style changes * Generated style changes * Fix Windows build errors * Implement changes from review * Reintroduce proto2 check * Compiler changes (required handling review) * Generated code changes (required handling review) * Library changes (required handling review * Field presence rewrite (compiler changes) * Field presence rewrite (generated code changes) * Compiler comment * IFieldAccessor.HasValue library implementation * Remove Clear methods and default values from proto3 code (Compiler) * Remove Clear methods and default values from proto3 code (Generated) * Remove Clear methods and default values from proto3 code (Library) * Fix distcheck error * Rewrite default string values to use base64 and convert * Library changes (IMessage2) * Compiler changes (IMessage2) * Generated changes (IMessage2) * Rebased and regenerated * Compiler changes (initialized extension) * Generated changes (initialized extension) * Library changes (initialized extension) * Refactor MessageExtensions.IsRequired * Move string default value creator and bytes default value creator back to seperate methods * Dead code cleanup * Fixed segmentation fault Removed unused header method declarations
* Deleted scoped_ptr.hAdam Cozzette2018-03-141-2/+0
| | | | | We no longer need this, now that we have finished the switch to C++11 and are using std::unique_ptr.
* Add std:: namespace prefix to set and map (#3332)tanderson-google2017-07-091-2/+2
| | | * Remove using std::{set,map}
* Remove "using namespace std" from stubs/common.hAdam Cozzette2017-04-261-4/+4
| | | | | | | | This prevents the contents of the std namespace from being effectively pulled into the top-level namespace in all translation units that include common.h. I left in individual using statements for a few common things like std::set and std::map, because it did not seem worth going through the churn of updating the whole codebase to fix those right now.
* Fixing code formatting issuesAndrew Spiering2017-01-111-12/+4
|
* Added the support for class level deprecation which will in turn also ↵Andrew Spiering2016-12-211-0/+10
| | | | deprecate any fields that are currently using that type
* Move DebuggerNonUserCodeAttribute to function membersJon Skeet2016-07-041-1/+2
| | | | | | | | | I think this has caught everything. I've left a stub for attributes to be applied to the types themselves, but we don't currently need anything. Follow-up commit will include the changes to generated code itself. Fixes #1671.
* Use 0 as the default value for all enums, rather than finding the actual ↵Jon Skeet2016-04-111-1/+3
| | | | | | enum value name This will make it easier to change the enum value names, as it reduces the number of places they're used.
* Line-wrapping changes only for C# generator codeJon Skeet2016-04-061-4/+6
| | | | | | | | This should have no behavioral changes at all. This doesn't strictly enforce an 80-column limit, but removes the most egregious violations. The indentation in the C# generator code is inconsistent in general, unfortunately - if we have any good tools that can be trusted to reformat, I'd be happy to apply them.
* Added access_level for typesGaurav Vaish2016-04-051-2/+2
| | | | | | | | | | | * `csharp_options`: Added `Options` to encapsulate generator options. Supported options for now - file_extension, base_namespace * `{Blah}Generator`: Now accept `Options*` as parameter to constructor * `csharp_generator.cc`: Parse and populate options * `Makefile.am`: Added `csharp_options.h` * `extract_includes.bat.in`: Added `csharp_options.h` Refactoring code to two commits. This is the first commit
* fix type initialization problem with FileDescriptorJan Tattermusch2015-08-141-1/+1
|
* Remove our own version of MakeTag now that the main one is fixed.Jon Skeet2015-08-071-1/+1
| | | | "Tested" by regenerating code and observing that there are no changes.
* Prohibit null values for string/bytes fields in generated code.Jon Skeet2015-07-301-11/+0
|
* Remove the usage of attributes for field/method discovery.Jon Skeet2015-07-221-5/+0
| | | | Instead, introduce GeneratedCodeInfo which passes in what we need, and adjust the codegen to take account of this.
* Revamp to reflection.Jon Skeet2015-07-211-1/+1
| | | | | | | | | | | | | | | | | Changes in brief: 1. Descriptor is now the entry point for all reflection. 2. IReflectedMessage has gone; there's now a Descriptor property in IMessage, which is explicitly implemented (due to the static property). 3. FieldAccessorTable has gone away 4. IFieldAccessor and OneofFieldAccessor still exist; we *could* put the functionality straight into FieldDescriptor and OneofDescriptor... I'm unsure about that. 5. There's a temporary property MessageDescriptor.FieldAccessorsByFieldNumber to make the test changes small - we probably want this to go away 6. Discovery for delegates is now via attributes applied to properties and the Clear method of a oneof I'm happy with 1-3. 4 I'm unsure about - feedback welcome. 5 will go away 6 I'm unsure about, both in design and implementation. Should we have a ProtobufMessageAttribute too? Should we find all the relevant attributes in MessageDescriptor and pass them down, to avoid an O(N^2) scenario? Generated code changes coming in the next commit.
* Merge pull request #611 from jskeet/csharp-wrappersJon Skeet2015-07-171-16/+37
|\ | | | | C# wrapper types
| * First pass at wrapper types.Jon Skeet2015-07-161-16/+25
| | | | | | | | | | - We do still generate the message types, as otherwise reflection breaks, even though it doesn't actually use those types. - JSON handling hasn't been implemented yet
| * First part of implementing wrapper types. Not ready yet!Jon Skeet2015-07-161-0/+12
| |
* | Merge pull request #586 from jtattermusch/csharp_names_exportJan Tattermusch2015-07-161-0/+1
|\ \ | |/ |/| Export c# naming routines publicly
| * export c# naming routines publiclyJan Tattermusch2015-07-101-0/+1
| |
* | Merge remote-tracking branch 'upstream/master' into csharp-experimentalJan Tattermusch2015-07-151-7/+3
|\ \ | |/ |/|
| * MinGW64+MSYS2 compilation issues and portable isnan using MathLimitsKarol Ostrovsky2015-07-011-7/+3
| |
* | Codegen changes to support descriptor runtime changesJon Skeet2015-07-091-0/+1
| | | | | | | | | | | | - Add a partial method called by all constructors - Generate internal classes for descriptor.proto (only) - Forbid proto2 descriptors except for descriptor.proto
* | First pass at map support.Jon Skeet2015-06-251-3/+13
| | | | | | | | More tests required. Generated code in next commit.
* | Revert the change to wire_format.h.Jon Skeet2015-06-241-1/+1
| | | | | | | | | | It seems too much code relies on the broken behaviour. See issue #493. Instead, we reimplement MakeTag just for C#, temporarily.
* | Implement freezing for messages and repeated fields.Jon Skeet2015-06-241-0/+5
| | | | | | | | Fixes issue #523.
* | Use the fact that we know the tag size and bytes at codegen time to optimize.Jon Skeet2015-06-171-2/+13
| |
* | First pass at the mutable API. Quite a bit more to do - in particular, it's ↵Jon Skeet2015-06-091-9/+10
| | | | | | | | pretty slow right now.
* | First stab at new proto3-only code generatorJon Skeet2015-06-051-33/+4
|/
* Migrate writer to io::Printer for C#Jie Luo2015-06-041-9/+45
|
* Add oneof support for C#Jie Luo2015-05-291-0/+8
|
* Remove ClsCompliant declarations from C# codeJie Luo2015-05-011-13/+0
|
* added support for deprecated fields, reworded some todosJan Tattermusch2015-04-131-5/+4
|
* updated C# codegen to use restricted set of csharp options from descriptor.protoJan Tattermusch2015-04-131-1/+1
|
* Rewrote C# protogen to C++ (initial version)Jan Tattermusch2015-03-261-0/+394