|
TrueReality
v0.1.1912
|
An Invokable is a queriable method interface that can be added to a trManager::ActorBase Invoking the invokable requires a trManager::MessageBase as a parameter. More...
#include <Invokable.h>


Public Types | |
| using | InvokableFunc = trUtil::Functor< void, TYPELIST_1(const trManager::MessageBase &)> |
Public Types inherited from trBase::SmrtClass | |
| using | BaseClass = osg::Referenced |
Public Member Functions | |
| virtual const std::string & | GetType () const override |
| Holds the class type name for efficient comparisons. More... | |
| template<typename Message_T > | |
| Invokable (const std::string &name, trUtil::Functor< void, TYPELIST_1(const Message_T &)> toInvoke) | |
| Invokable (const Invokable &)=delete | |
| Deleted copy constructor. More... | |
| const std::string & | GetName () const |
| void | Invoke (const trManager::MessageBase &message) |
| Invoke this. More... | |
Public Member Functions inherited from trBase::SmrtClass | |
| SmrtClass () | |
| Adds an easy and swappable access to the base class. More... | |
| SmrtClass (bool threadSafeRefUnref) | |
| Constructor. More... | |
| SmrtClass (const SmrtClass &inst) | |
| Copy constructor. More... | |
| virtual bool | GetThreadSafeRefUnref () |
| Get whether a mutex is used to ensure Ref() and UnRef() are thread safe. More... | |
| OpenThreads::Mutex * | GetRefMutex () const |
| Get the mutex used to ensure thread safety of Ref()/UnRef(). More... | |
| int | Ref () const |
| Increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| int | Unref () const |
| Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More... | |
| int | UnRefNoDelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More... | |
| int | ReferenceCount () const |
| Return the number of pointers currently referencing this object. More... | |
Static Public Attributes | |
| static const trUtil::RefStr | CLASS_TYPE = trUtil::RefStr("trManager::Invokable") |
Protected Member Functions | |
| virtual | ~Invokable () |
| referenced classes should always have protected destructor More... | |
Protected Member Functions inherited from trBase::SmrtClass | |
| ~SmrtClass () | |
Private Member Functions | |
| Invokable & | operator= (const Invokable &) |
Private Attributes | |
| std::string | mName |
| trBase::SmrtPtr< InvokableFunctorCallerBase > | mCaller |
Additional Inherited Members | |
Static Public Member Functions inherited from trBase::SmrtClass | |
| static OpenThreads::Mutex * | GetGlobalReferencedMutex () |
| Get the optional global Referenced mutex, this can be shared between all trBase::SmrtClass. More... | |
An Invokable is a queriable method interface that can be added to a trManager::ActorBase Invoking the invokable requires a trManager::MessageBase as a parameter.
The actual code is executed by calling a Functor that takes 1 parameter, the message, and returns nothing. The method must take a const Method reference.
Definition at line 84 of file Invokable.h.
| using trManager::Invokable::InvokableFunc = trUtil::Functor<void, TYPELIST_1(const trManager::MessageBase&)> |
Definition at line 99 of file Invokable.h.
|
inline |
Definition at line 102 of file Invokable.h.
|
delete |
Deleted copy constructor.
|
protectedvirtual |
referenced classes should always have protected destructor
Definition at line 37 of file Invokable.cpp.
|
inline |
Definition at line 118 of file Invokable.h.
Referenced by trManager::EntityBase::AddInvokable(), trManager::SystemManager::CallInvokable(), and trManager::EntityBase::RemoveInvokable().

|
inlineoverridevirtual |
Holds the class type name for efficient comparisons.
Gets the type.
Implements trBase::SmrtClass.
Definition at line 97 of file Invokable.h.
| void trManager::Invokable::Invoke | ( | const trManager::MessageBase & | message | ) |
Invoke this.
| message | the message to invoke. |
Definition at line 42 of file Invokable.cpp.
References mCaller.
Referenced by trManager::SystemManager::CallInvokable(), and trManager::SystemManager::SendGlobalyRegisteredMessage().

Definition at line 133 of file Invokable.h.
|
static |
Definition at line 88 of file Invokable.h.
|
private |
Definition at line 131 of file Invokable.h.
Referenced by Invoke().
|
private |
Definition at line 129 of file Invokable.h.