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

Side by Side Diff: ipc/param_traits_macros.h

Issue 6410007: Make the implementation .cc files go away, instead have the authors give us a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months 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 | « ipc/param_traits_log_macros.h ('k') | ipc/param_traits_read_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IPC_PARAM_TRAITS_MACROS_H_
6 #define IPC_PARAM_TRAITS_MACROS_H_
7
8 #include <string>
9
10 // Traits generation for structs.
11 #define IPC_STRUCT_TRAITS_BEGIN(struct_name) \
12 namespace IPC { \
13 template <> \
14 struct ParamTraits<struct_name> { \
15 typedef struct_name param_type; \
16 static void Write(Message* m, const param_type& p); \
17 static bool Read(const Message* m, void** iter, param_type* p); \
18 static void Log(const param_type& p, std::string* l); \
19 }; \
20 }
21
22 #define IPC_STRUCT_TRAITS_MEMBER(name)
23 #define IPC_STRUCT_TRAITS_END()
24
25 // Traits generation for enums.
26 #define IPC_ENUM_TRAITS(enum_name) \
27 namespace IPC { \
28 template <> \
29 struct ParamTraits<enum_name> { \
30 typedef enum_name param_type; \
31 static void Write(Message* m, const param_type& p); \
32 static bool Read(const Message* m, void** iter, param_type* p); \
33 static void Log(const param_type& p, std::string* l); \
34 }; \
35 }
36
37 #endif // IPC_PARAM_TRAITS_MACROS_H_
38
OLDNEW
« no previous file with comments | « ipc/param_traits_log_macros.h ('k') | ipc/param_traits_read_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698