From 1678a7e673dd7623002ca58ef40c74b9db2ee939 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 31 May 2011 18:17:12 +0000 Subject: [PATCH] Change comment format to support automatic document generation using the CppDoc application. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@251 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- include/internal/cef_ptr.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/internal/cef_ptr.h b/include/internal/cef_ptr.h index a2583dc51..0aec0075f 100644 --- a/include/internal/cef_ptr.h +++ b/include/internal/cef_ptr.h @@ -47,27 +47,27 @@ // void some_function() { // // The MyFoo object that |foo| represents starts with a single // // reference. -// CefRefPtr foo = new MyFoo(); -// foo->Method(param); +// CefRefPtr<MyFoo> foo = new MyFoo(); +// foo->Method(param); // // |foo| is released when this function returns // } // // void some_other_function() { -// CefRefPtr foo = new MyFoo(); +// CefRefPtr<MyFoo> foo = new MyFoo(); // ... // foo = NULL; // explicitly releases |foo| // ... // if (foo) -// foo->Method(param); +// foo->Method(param); // } // -// The above examples show how CefRefPtr acts like a pointer to T. -// Given two CefRefPtr classes, it is also possible to exchange +// The above examples show how CefRefPtr<T> acts like a pointer to T. +// Given two CefRefPtr<T> classes, it is also possible to exchange // references between the two objects, like so: //
 //   {
-//     CefRefPtr a = new MyFoo();
-//     CefRefPtr b;
+//     CefRefPtr<MyFoo> a = new MyFoo();
+//     CefRefPtr<MyFoo> b;
 //
 //     b.swap(a);
 //     // now, |b| references the MyFoo object, and |a| references NULL.
@@ -77,8 +77,8 @@
 // object, simply use the assignment operator:
 // 
 //   {
-//     CefRefPtr a = new MyFoo();
-//     CefRefPtr b;
+//     CefRefPtr<MyFoo> a = new MyFoo();
+//     CefRefPtr<MyFoo> b;
 //
 //     b = a;
 //     // now, |a| and |b| each own a reference to the same MyFoo object.
@@ -88,16 +88,16 @@
 // Reference counted objects can also be passed as function parameters and
 // used as function return values:
 // 
-//   void some_func_with_param(CefRefPtr param) {
+//   void some_func_with_param(CefRefPtr<MyFoo> param) {
 //     // A reference is added to the MyFoo object that |param| represents
 //     // during the scope of some_func_with_param() and released when
 //     // some_func_with_param() goes out of scope.
 //   }
 //
-//   CefRefPtr some_func_with_retval() {
+//   CefRefPtr<MyFoo> some_func_with_retval() {
 //     // The MyFoo object that |foox| represents starts with a single
 //     // reference.
-//     CefRefPtr foox = new MyFoo();
+//     CefRefPtr<MyFoo> foox = new MyFoo();
 //
 //     // Creating the return value adds an additional reference.
 //     return foox;
@@ -107,12 +107,12 @@
 //   }
 //
 //   void and_another_function() {
-//     CefRefPtr foo = new MyFoo();
+//     CefRefPtr<MyFoo> foo = new MyFoo();
 //
 //     // pass |foo| as a parameter.
 //     some_function(foo);
 //
-//     CefRefPtr foo2 = some_func_with_retval();
+//     CefRefPtr<MyFoo> foo2 = some_func_with_retval();
 //     // Now, since we kept a reference to the some_func_with_retval() return
 //     // value, |foo2| is the only class pointing to the MyFoo object created
 //     in some_func_with_retval(), and it has a reference count of 1.
@@ -127,11 +127,11 @@
 // 
 //   {
 //      // Create a vector that holds MyFoo objects.
-//      std::vector > MyFooVec;
+//      std::vector<CefRefPtr<MyFoo> > MyFooVec;
 //
 //     // The MyFoo object that |foo| represents starts with a single
 //     // reference.
-//     CefRefPtr foo = new MyFoo();
+//     CefRefPtr<MyFoo> foo = new MyFoo();
 //
 //     // When the MyFoo object is added to |MyFooVec| the reference count
 //     // is increased to 2.