Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::AspectProviderAspect Class Reference

Thread aspect provide a new aspect. More...

#include <>>

Inheritance diagram for fawkes::AspectProviderAspect:

List of all members.

Public Member Functions

 AspectProviderAspect (const char *aspect_name, AspectIniFin *inifin)
 Constructor.
virtual ~AspectProviderAspect ()
 Virtual empty destructor.
const char * aspect_provider_name () const
 Get name of the provided aspect.
AspectIniFinaspect_provider_inifin () const
 Get initializer/finalizer for the provided aspect.
- 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.

Additional Inherited Members

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

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 36 of file aspect_provider.h.


Constructor & Destructor Documentation

fawkes::AspectProviderAspect::AspectProviderAspect ( const char *  aspect_name,
AspectIniFin inifin 
)

Constructor.

This special constructor is needed to define the wakeup point.

Parameters:
aspect_nameName of the aspect which is provided. The string must exist for the whole lifetime of this AspectProviderAspect instance!
inifinintializer/finalizer for the aspect. The inifin must exist for the whole lifetime of this AspectProviderAspect instance!

Definition at line 59 of file aspect_provider.cpp.

fawkes::AspectProviderAspect::~AspectProviderAspect ( )
virtual

Virtual empty destructor.

Definition at line 69 of file aspect_provider.cpp.


Member Function Documentation

AspectIniFin * fawkes::AspectProviderAspect::aspect_provider_inifin ( ) const

Get initializer/finalizer for the provided aspect.

Returns:
initializer/finalizer for the provided aspect

Definition at line 88 of file aspect_provider.cpp.

Referenced by fawkes::AspectProviderAspectIniFin::finalize(), and fawkes::AspectProviderAspectIniFin::init().

const char * fawkes::AspectProviderAspect::aspect_provider_name ( ) const

Get name of the provided aspect.

Returns:
name of the provided aspect

Definition at line 78 of file aspect_provider.cpp.

Referenced by fawkes::AspectProviderAspectIniFin::prepare_finalize().


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