- Timestamp:
- Sep 4, 2010, 11:33:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/core/command/ExecutorPtr.h
r7284 r7352 27 27 */ 28 28 29 /** 30 @file 31 @ingroup Command FunctorExecutor 32 @brief Typedefs and definitions of ExecutorPtr, ExecutorStaticPtr, and ExecutorMemberPtr 33 34 Instances of orxonox::Executor are usually managed by an orxonox::SharedPtr. This ensures 35 that Executors will be destroyed after usage. To make things easier, there's a typedef 36 that defines ExecutorPtr as SharedPtr<Executor>. 37 38 Because there's not only orxonox::Executor, but also orxonox::ExecutorStatic, and 39 orxonox::ExecutorMember, the shared pointers need to store them all and also reflect 40 their hierarchy - ExecutorStatic and ExecutorMember should not be mixed, but both can 41 be converted to Executor. This is achieved by using orxonox::SharedChildPtr. 42 43 Because it's not possible to use a typedef for a template, we have to define the 44 helper class ExecutorMemberPtr<T> that makes it easier to use ExecutorMember. 45 */ 46 29 47 #ifndef _ExecutorPtr_H__ 30 48 #define _ExecutorPtr_H__ … … 35 53 namespace orxonox 36 54 { 55 /// ExecutorPtr is just a typedef of SharedPtr 37 56 typedef SharedPtr<Executor> ExecutorPtr; 38 57 58 /// ExecutorStaticPtr is just a typedef of SharedChildPtr 39 59 typedef SharedChildPtr<ExecutorStatic, ExecutorPtr> ExecutorStaticPtr; 40 60 61 /// It's not possible to use a typedef for ExecutorMemberPtr<T>, so we have to create a child-class instead. It inherits all functions from SharedChildPtr, but needs to (re-)implement some constructors. 41 62 template <class T> 42 63 class ExecutorMemberPtr : public SharedChildPtr<ExecutorMember<T>, ExecutorPtr>
Note: See TracChangeset
for help on using the changeset viewer.