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

Side by Side Diff: ppapi/cpp/common.h

Issue 7054060: New documentation for resource.h, core.h, and common.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | « no previous file | ppapi/cpp/core.h » ('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 (c) 2010 The Chromium Authors. All rights reserved. 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 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 PPAPI_CPP_COMMON_H_ 5 #ifndef PPAPI_CPP_COMMON_H_
6 #define PPAPI_CPP_COMMON_H_ 6 #define PPAPI_CPP_COMMON_H_
7 7
8 /** 8
9 * @file 9 /// @file
10 * Defines the API ... 10 /// Defines the API to convert PP_Bool to and from their C++ equivalent.
11 *
12 * @addtogroup CPP
13 * @{
14 */
15 11
16 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
17 13
18 namespace pp { 14 namespace pp {
19 15
20 /** Convert a C++ bool to the appropriate PP_Bool value. */ 16 /// This function is used to convert a C++ bool to the appropriate PP_Bool
17 /// value.
18 /// @param[in] value A C++ boolean value.
19 /// @return A PP_Bool equivalent of the C++ boolean value.
21 inline PP_Bool BoolToPPBool(bool value) { 20 inline PP_Bool BoolToPPBool(bool value) {
22 return value ? PP_TRUE : PP_FALSE; 21 return value ? PP_TRUE : PP_FALSE;
23 } 22 }
24 23
25 /** Convert a PP_Bool to a C++ bool value. */ 24 /// This function is used to convert a PP_Bool to a C++ boolean value.
25 /// value.
26 /// @param[in] value A PP_Bool boolean value.
27 /// @return A C++ equivalent of the PP_Bool boolean value.
26 inline bool PPBoolToBool(PP_Bool value) { 28 inline bool PPBoolToBool(PP_Bool value) {
27 return !!value; 29 return !!value;
28 } 30 }
29 31
30 } // namespace pp 32 } // namespace pp
31 33
32 /**
33 * @}
34 * End addtogroup CPP
35 */
36
37 #endif // PPAPI_CPP_COMMON_H_ 34 #endif // PPAPI_CPP_COMMON_H_
38 35
OLDNEW
« no previous file with comments | « no previous file | ppapi/cpp/core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698