[Orxonox-commit 6170] r10828 - in code/branches/cpp11_v2/src/libraries/core: command object

landauf at orxonox.net landauf at orxonox.net
Sun Nov 22 17:26:10 CET 2015


Author: landauf
Date: 2015-11-22 17:26:10 +0100 (Sun, 22 Nov 2015)
New Revision: 10828

Modified:
   code/branches/cpp11_v2/src/libraries/core/command/Executor.h
   code/branches/cpp11_v2/src/libraries/core/command/ExecutorPtr.h
   code/branches/cpp11_v2/src/libraries/core/command/Functor.h
   code/branches/cpp11_v2/src/libraries/core/command/FunctorPtr.h
   code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h
Log:
updated documentation

Modified: code/branches/cpp11_v2/src/libraries/core/command/Executor.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Executor.h	2015-11-22 16:16:59 UTC (rev 10827)
+++ code/branches/cpp11_v2/src/libraries/core/command/Executor.h	2015-11-22 16:26:10 UTC (rev 10828)
@@ -41,8 +41,8 @@
 
     orxonox::Executor is used to wrap an orxonox::Functor and to store default values for
     its parameters. Usually one uses the function createExecutor() to create a new executor.
-    This function returns an orxonox::ExecutorPtr which is a typedef of @ref orxonox::SharedPtr
-    "SharedPtr<Executor>", used to manage the pointer to the executor.
+    This function returns an orxonox::ExecutorPtr which is a typedef of "std::shared_ptr<Executor>",
+    used to manage the pointer to the executor.
 
     Executors are mostly used to execute callbacks. Because some callback functions need arguments,
     Executor provides an easy interface to store these arguments as default values, so the
@@ -73,8 +73,8 @@
     (*executor)();                                          // calls the executor with default-values only, prints "The sum is 15"
     @endcode
 
-    Because executors that were created with createExecutor() are managed by an orxonox::SharedPtr,
-    they don't need to be deleted after usage.
+    Executors don't need to be deleted after usage normally because they are managed by an
+    std::shared_ptr when they were created with createExecutor().
 */
 
 #ifndef _Executor_H__

Modified: code/branches/cpp11_v2/src/libraries/core/command/ExecutorPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ExecutorPtr.h	2015-11-22 16:16:59 UTC (rev 10827)
+++ code/branches/cpp11_v2/src/libraries/core/command/ExecutorPtr.h	2015-11-22 16:26:10 UTC (rev 10828)
@@ -31,9 +31,9 @@
     @ingroup Command FunctorExecutor
     @brief Typedefs and definitions of ExecutorPtr, ExecutorStaticPtr, and ExecutorMemberPtr
 
-    Instances of orxonox::Executor are usually managed by an orxonox::SharedPtr. This ensures
+    Instances of orxonox::Executor are usually managed by an std::shared_ptr. This ensures
     that Executors will be destroyed after usage. To make things easier, there's a typedef
-    that defines ExecutorPtr as SharedPtr<Executor>.
+    that defines ExecutorPtr as std::shared_ptr<Executor>.
 
     Because there's not only orxonox::Executor, but also orxonox::ExecutorStatic, and
     orxonox::ExecutorMember, the shared pointers need to store them all and also reflect

Modified: code/branches/cpp11_v2/src/libraries/core/command/Functor.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Functor.h	2015-11-22 16:16:59 UTC (rev 10827)
+++ code/branches/cpp11_v2/src/libraries/core/command/Functor.h	2015-11-22 16:26:10 UTC (rev 10828)
@@ -39,9 +39,9 @@
     arguments are then automatically converted to the right type.
 
     To create a Functor, the helper function createFunctor() is used. It returns an instance
-    of orxonox::FunctorPtr which is simply a typedef of @ref orxonox::SharedPtr "SharedPtr<Functor>".
-    This means you don't have to delete the Functor after using it, because it is managed
-    by the SharedPtr.
+    of orxonox::FunctorPtr which is simply a typedef of "std::shared_ptr<Functor>". This
+    means you don't have to delete the Functor after using it, because it is managed
+    by the std::shared_ptr.
 
     Example:
     @code

Modified: code/branches/cpp11_v2/src/libraries/core/command/FunctorPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/FunctorPtr.h	2015-11-22 16:16:59 UTC (rev 10827)
+++ code/branches/cpp11_v2/src/libraries/core/command/FunctorPtr.h	2015-11-22 16:26:10 UTC (rev 10828)
@@ -31,9 +31,9 @@
     @ingroup Command FunctorExecutor
     @brief Typedefs and definitions of FunctorPtr, FunctorMemberPtr, FunctorStaticPtr, and FunctorPointerPtr
 
-    Instances of orxonox::Functor are usually managed by an orxonox::SharedPtr. This ensures
+    Instances of orxonox::Functor are usually managed by an std::shared_ptr. This ensures
     that Functors will be destroyed after usage. To make things easier, there's a typedef
-    that defines FunctorPtr as SharedPtr<Functor>.
+    that defines FunctorPtr as std::shared_ptr<Functor>.
 
     Because there's not only orxonox::Functor, but also orxonox::FunctorStatic, and
     orxonox::FunctorMember, the shared pointers need to store them all and also reflect

Modified: code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h	2015-11-22 16:16:59 UTC (rev 10827)
+++ code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h	2015-11-22 16:26:10 UTC (rev 10828)
@@ -42,7 +42,7 @@
 
     orxonox::StrongPtr is an implementation of a smart pointer - it wraps a pointer to an
     object  and keeps this object alive until no StrongPtr points to this object anymore.
-    In contrast to orxonox::SharedPtr, StrongPtr works only with classes that are derived
+    In contrast to std::shared_ptr, StrongPtr works only with classes that are derived
     from orxonox::Destroyable, because it's an intrusive implementation, meaning the
     reference counter is stored in the object itself.
 
@@ -50,7 +50,7 @@
     You don't have to use StrongPtr all the time, you can create a StrongPtr for an object
     at any time and also convert it back to a normal pointer if you like. This is possible
     because the reference counter is stored in the object itself and not in StrongPtr (in
-    contrast to SharedPtr).
+    contrast to std::shared_ptr).
 
     @b Important: If you want to delete an object, you must not use @c delete @c object but
     rather @c object->destroy(). This function will check if there are strong pointers




More information about the Orxonox-commit mailing list