Cool. If you like, feel free to propose a modification to the standard code
generator which makes the file descriptor pointer directly accessible, so
that you don't have to have the extra lookup step.
On Thu, Mar 11, 2010 at 11:58 AM, Andrew Kimpton wrote:
>
>
> On Thu, Mar 11, 2010 at 2:27 PM,
On Thu, Mar 11, 2010 at 2:27 PM, Kenton Varda wrote:
> On the first call to your descriptor() or GetDescriptor() method, you could
> look up the ServiceDescriptor in
> google::protobuf::DescriptorPool::generated_pool().
>
I think that's what my generated code is essentially now doing :
In my ge
On the first call to your descriptor() or GetDescriptor() method, you could
look up the ServiceDescriptor in
google::protobuf::DescriptorPool::generated_pool().
Alternatively, we could add a (public) way to directly fetch the file's
FileDescriptor, then your descriptor getter could simply return
"
On Wed, Mar 10, 2010 at 8:50 PM, Kenton Varda wrote:
> Note that to write your plugin, you do *not* have to copy the CppGenerator
> sources. Instead, write your plugin to use
> output_directory->OpenForInsert() to insert additional code into what the
> C++ code generator already generated. Spec
Note that to write your plugin, you do *not* have to copy the CppGenerator
sources. Instead, write your plugin to use
output_directory->OpenForInsert() to insert additional code into what the
C++ code generator already generated. Specifically, you want to insert at
the "namespace_scope" insertion
In your .proto file, just specify the file-level option cc_generic_services
= false.
Comments from descriptor.proto:
// Should generic services be generated in each language? "Generic"
services
// are not specific to any particular RPC system. They are generated by
the
// main code genera
I'm trying to throw together an alternative RPC mechanism using a
protoc plugin/CodeGenerator (rather than use the deprecated headers).
I've hacked a new plugin together by liberally grabbing from the
current compiler/cpp generator sources. It works to output code that
looks good to my eyes howeve