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
57d1e082
Commit
57d1e082
authored
8 years ago
by
yang-g
Browse files
Options
Downloads
Patches
Plain Diff
resolve comments
parent
c3e1f636
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/compiler/cpp_plugin.cc
+13
-7
13 additions, 7 deletions
src/compiler/cpp_plugin.cc
src/compiler/generator_helpers.h
+1
-1
1 addition, 1 deletion
src/compiler/generator_helpers.h
with
14 additions
and
8 deletions
src/compiler/cpp_plugin.cc
+
13
−
7
View file @
57d1e082
...
...
@@ -43,7 +43,7 @@
#include
"src/compiler/cpp_generator_helpers.h"
#include
"src/compiler/generator_helpers.h"
using
grpc_generator
::
GetComments
;
using
grpc_generator
::
GetC
ppC
omments
;
class
ProtoBufMethod
:
public
grpc_cpp_generator
::
Method
{
public:
...
...
@@ -75,10 +75,12 @@ class ProtoBufMethod : public grpc_cpp_generator::Method {
return
method_
->
client_streaming
()
&&
method_
->
server_streaming
();
}
grpc
::
string
GetLeadingComments
()
const
{
return
GetComments
(
method_
,
true
);
}
grpc
::
string
GetLeadingComments
()
const
{
return
GetCppComments
(
method_
,
true
);
}
grpc
::
string
GetTrailingComments
()
const
{
return
GetComments
(
method_
,
false
);
return
GetC
ppC
omments
(
method_
,
false
);
}
private
:
...
...
@@ -99,11 +101,11 @@ class ProtoBufService : public grpc_cpp_generator::Service {
};
grpc
::
string
GetLeadingComments
()
const
{
return
GetComments
(
service_
,
true
);
return
GetC
ppC
omments
(
service_
,
true
);
}
grpc
::
string
GetTrailingComments
()
const
{
return
GetComments
(
service_
,
false
);
return
GetC
ppC
omments
(
service_
,
false
);
}
private
:
...
...
@@ -154,9 +156,13 @@ class ProtoBufFile : public grpc_cpp_generator::File {
new
ProtoBufPrinter
(
str
));
}
grpc
::
string
GetLeadingComments
()
const
{
return
GetComments
(
file_
,
true
);
}
grpc
::
string
GetLeadingComments
()
const
{
return
GetCppComments
(
file_
,
true
);
}
grpc
::
string
GetTrailingComments
()
const
{
return
GetComments
(
file_
,
false
);
}
grpc
::
string
GetTrailingComments
()
const
{
return
GetCppComments
(
file_
,
false
);
}
private
:
const
grpc
::
protobuf
::
FileDescriptor
*
file_
;
...
...
This diff is collapsed.
Click to expand it.
src/compiler/generator_helpers.h
+
1
−
1
View file @
57d1e082
...
...
@@ -258,7 +258,7 @@ inline grpc::string GenerateCommentsWithPrefix(
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template
<
typename
DescriptorType
>
inline
grpc
::
string
GetComments
(
const
DescriptorType
*
desc
,
bool
leading
)
{
inline
grpc
::
string
GetC
ppC
omments
(
const
DescriptorType
*
desc
,
bool
leading
)
{
std
::
vector
<
grpc
::
string
>
out
;
if
(
leading
)
{
grpc_generator
::
GetComment
(
...
...
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