Fawkes API  Fawkes Development Version
fawkes::AspectProviderAspect Class Reference

Thread aspect provide a new aspect. More...

#include <>>

Inheritance diagram for fawkes::AspectProviderAspect:

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...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

Detailed Description

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!

Author
Tim Niemueller

Definition at line 38 of file aspect_provider.h.

Constructor & Destructor Documentation

◆ AspectProviderAspect() [1/2]

fawkes::AspectProviderAspect::AspectProviderAspect ( AspectIniFin inifin)

Constructor.

Add a single aspect.

Parameters
inifinintializer/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().

◆ AspectProviderAspect() [2/2]

fawkes::AspectProviderAspect::AspectProviderAspect ( const std::list< AspectIniFin *>  aspects)

Constructor.

Add multiple aspects.

Parameters
aspectsMap from aspect name to initializer/finalizer

Definition at line 68 of file aspect_provider.cpp.

References fawkes::Aspect::add_aspect().

◆ ~AspectProviderAspect()

fawkes::AspectProviderAspect::~AspectProviderAspect ( )
virtual

Virtual empty destructor.

Definition at line 76 of file aspect_provider.cpp.

Member Function Documentation

◆ aspect_provider_aspects()

const std::list< AspectIniFin * > & fawkes::AspectProviderAspect::aspect_provider_aspects ( ) const

Get name of the provided aspect.

Returns
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().


The documentation for this class was generated from the following files: