Orxonox  0.0.5 Codename: Arcturus
Namespaces | Typedefs
ExecutorPtr.h File Reference

Typedefs and definitions of ExecutorPtr, ExecutorStaticPtr, and ExecutorMemberPtr. More...

#include "core/CorePrereqs.h"
#include <memory>

Go to the source code of this file.

Namespaces

 orxonox
 Die Wagnis Klasse hat die folgenden Aufgaben:
 

Typedefs

template<class T >
using orxonox::ExecutorMemberPtr = std::shared_ptr< ExecutorMember< T >>
 
using orxonox::ExecutorPtr = std::shared_ptr< Executor >
 
using orxonox::ExecutorStaticPtr = std::shared_ptr< ExecutorStatic >
 

Detailed Description

Typedefs and definitions of ExecutorPtr, ExecutorStaticPtr, and ExecutorMemberPtr.

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 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 their hierarchy - ExecutorStatic and ExecutorMember should not be mixed, but both can be converted to Executor. This is achieved by using orxonox::SharedChildPtr.

Because it's not possible to use a typedef for a template, we have to define the helper class ExecutorMemberPtr<T> that makes it easier to use ExecutorMember.