Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: mojo/public/bindings/generators/cpp_templates/struct_serialization.h-template

Issue 60863002: Mojo: Support camel cased types in generator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional fixes Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/public/bindings/generators/mojom_cpp_generator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright $YEAR The Chromium Authors. All rights reserved. 1 // Copyright $YEAR The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef $HEADER_GUARD 5 #ifndef $HEADER_GUARD
6 #define $HEADER_GUARD 6 #define $HEADER_GUARD
7 7
8 #include "mojo/public/bindings/lib/bindings_serialization.h" 8 #include "mojo/public/bindings/lib/bindings_serialization.h"
9 9
10 namespace $NAMESPACE { 10 namespace $NAMESPACE {
11 class $CLASS; 11 class $CLASS;
12 } 12 }
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace internal { 15 namespace internal {
16 16
17 template <> 17 template <>
18 class ObjectTraits<$FULL_CLASS> { 18 class ObjectTraits<$FULL_CLASS> {
19 public: 19 public:
20 static size_t ComputeSizeOf(const $FULL_CLASS* bar); 20 static size_t ComputeSizeOf(const $FULL_CLASS* $NAME);
21 static $FULL_CLASS* Clone(const $FULL_CLASS* bar, Buffer* buf); 21 static $FULL_CLASS* Clone(const $FULL_CLASS* bar, Buffer* buf);
22 static void EncodePointersAndHandles($FULL_CLASS* bar, 22 static void EncodePointersAndHandles($FULL_CLASS* $NAME,
23 std::vector<mojo::Handle>* handles); 23 std::vector<mojo::Handle>* handles);
24 static bool DecodePointersAndHandles($FULL_CLASS* bar, 24 static bool DecodePointersAndHandles($FULL_CLASS* $NAME,
25 const mojo::Message& message); 25 const mojo::Message& message);
26 }; 26 };
27 27
28 } // namespace internal 28 } // namespace internal
29 } // namespace mojo 29 } // namespace mojo
30 30
31 #endif // $HEADER_GUARD 31 #endif // $HEADER_GUARD
OLDNEW
« no previous file with comments | « no previous file | mojo/public/bindings/generators/mojom_cpp_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698