Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
ac7408de
Commit
ac7408de
authored
8 years ago
by
murgatroid99
Browse files
Options
Downloads
Patches
Plain Diff
Clang format code
parent
a842413e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/compiler/node_generator.cc
+11
-8
11 additions, 8 deletions
src/compiler/node_generator.cc
with
11 additions
and
8 deletions
src/compiler/node_generator.cc
+
11
−
8
View file @
ac7408de
...
@@ -103,14 +103,17 @@ grpc::string GetRelativePath(const grpc::string& from_file,
...
@@ -103,14 +103,17 @@ grpc::string GetRelativePath(const grpc::string& from_file,
/* Finds all message types used in all services in the file, and returns them
/* Finds all message types used in all services in the file, and returns them
* as a map of fully qualified message type name to message descriptor */
* as a map of fully qualified message type name to message descriptor */
map
<
grpc
::
string
,
const
Descriptor
*>
GetAllMessages
(
const
FileDescriptor
*
file
)
{
map
<
grpc
::
string
,
const
Descriptor
*>
GetAllMessages
(
map
<
grpc
::
string
,
const
Descriptor
*>
message_types
;
const
FileDescriptor
*
file
)
{
for
(
int
service_num
=
0
;
service_num
<
file
->
service_count
();
service_num
++
)
{
map
<
grpc
::
string
,
const
Descriptor
*>
message_types
;
const
ServiceDescriptor
*
service
=
file
->
service
(
service_num
);
for
(
int
service_num
=
0
;
service_num
<
file
->
service_count
();
for
(
int
method_num
=
0
;
method_num
<
service
->
method_count
();
method_num
++
)
{
service_num
++
)
{
const
MethodDescriptor
*
method
=
service
->
method
(
method_num
);
const
ServiceDescriptor
*
service
=
file
->
service
(
service_num
);
const
Descriptor
*
input_type
=
method
->
input_type
();
for
(
int
method_num
=
0
;
method_num
<
service
->
method_count
();
const
Descriptor
*
output_type
=
method
->
output_type
();
method_num
++
)
{
const
MethodDescriptor
*
method
=
service
->
method
(
method_num
);
const
Descriptor
*
input_type
=
method
->
input_type
();
const
Descriptor
*
output_type
=
method
->
output_type
();
message_types
[
input_type
->
full_name
()]
=
input_type
;
message_types
[
input_type
->
full_name
()]
=
input_type
;
message_types
[
output_type
->
full_name
()]
=
output_type
;
message_types
[
output_type
->
full_name
()]
=
output_type
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment