Fawkes API
Fawkes Development Version
|
Thread aspect provide a new aspect. More...
#include <>>
Public Member Functions | |
AspectProviderAspect (AspectIniFin *inifin) | |
Constructor. More... | |
AspectProviderAspect (const std::list< AspectIniFin *> aspects) | |
Constructor. More... | |
virtual | ~AspectProviderAspect () |
Virtual empty destructor. More... | |
const std::list< AspectIniFin * > & | aspect_provider_aspects () const |
Get name of the provided aspect. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
Thread aspect provide a new aspect.
Aspects in Fawkes are used to provide access to framework features. More generally speaking they are used to provide access to features on the C++ programming level. In some situations, it might be useful to provide a custom aspect to allow for access to a resource on this level, e.g. bypassing the blackboard for communication. In this case the AspectProviderAspect can be used.
Use this rarely! Be absolutely certain, that there is no better or equally good way to implement a feature without a new aspect. If used it allows for a well-defined way to exchange resources between threads (and even plugins). Make sure that you define strong guarantees and keep them by means of your aspect initializer/finalizer. For example if you share a (pointer to a) resource, you must make sure, that this resource stays as long as there is any user!
Definition at line 38 of file aspect_provider.h.
fawkes::AspectProviderAspect::AspectProviderAspect | ( | AspectIniFin * | inifin | ) |
Constructor.
Add a single aspect.
inifin | intializer/finalizer for the aspect. The inifin must exist for the whole lifetime of this AspectProviderAspect instance! |
Definition at line 58 of file aspect_provider.cpp.
References fawkes::Aspect::add_aspect().
Referenced by NavGraphThread::NavGraphThread().
fawkes::AspectProviderAspect::AspectProviderAspect | ( | const std::list< AspectIniFin *> | aspects | ) |
Constructor.
Add multiple aspects.
aspects | Map from aspect name to initializer/finalizer |
Definition at line 68 of file aspect_provider.cpp.
References fawkes::Aspect::add_aspect().
|
virtual |
Virtual empty destructor.
Definition at line 76 of file aspect_provider.cpp.
const std::list< AspectIniFin * > & fawkes::AspectProviderAspect::aspect_provider_aspects | ( | ) | const |
Get name of the provided aspect.
Definition at line 85 of file aspect_provider.cpp.
Referenced by fawkes::AspectProviderAspectIniFin::finalize(), fawkes::AspectProviderAspectIniFin::init(), and fawkes::AspectProviderAspectIniFin::prepare_finalize().