Fawkes API  Fawkes Development Version
fawkes::AspectIniFin Class Referenceabstract

Aspect initializer/finalizer base class. More...

#include <>>

Inheritance diagram for fawkes::AspectIniFin:

Public Member Functions

 AspectIniFin (const char *aspect_name) __attribute__((nonnull))
 Constructor. More...
 
virtual ~AspectIniFin ()
 Virtual empty destructor. More...
 
virtual void init (Thread *thread)=0
 Initialize thread. More...
 
virtual void finalize (Thread *thread)=0
 Finalize thread. More...
 
virtual bool prepare_finalize (Thread *thread)
 Default finalize preparation. More...
 
const char * get_aspect_name () const
 Get aspect name. More...
 

Detailed Description

Aspect initializer/finalizer base class.

This class must be derived for each aspect that is added to the system, either standard or custom aspects.

Author
Tim Niemueller

Definition at line 36 of file inifin.h.

Constructor & Destructor Documentation

◆ AspectIniFin()

fawkes::AspectIniFin::AspectIniFin ( const char *  aspect_name)

Constructor.

Parameters
aspect_namename of the aspect the aspect initializer/finalizer subclass is used for. It must exist for the whole lifetime of the initializer/finalizer.

Definition at line 61 of file inifin.cpp.

◆ ~AspectIniFin()

fawkes::AspectIniFin::~AspectIniFin ( )
virtual

Virtual empty destructor.

Definition at line 67 of file inifin.cpp.

Member Function Documentation

◆ finalize()

void fawkes::AspectIniFin::finalize ( Thread thread)
pure virtual

◆ get_aspect_name()

const char * fawkes::AspectIniFin::get_aspect_name ( ) const

Get aspect name.

Returns
name of the aspect this initializer/finalizer is used for

Definition at line 88 of file inifin.cpp.

Referenced by fawkes::AspectManager::register_default_inifins(), fawkes::AspectManager::register_inifin(), and fawkes::AspectManager::unregister_inifin().

◆ init()

◆ prepare_finalize()

bool fawkes::AspectIniFin::prepare_finalize ( Thread thread)
virtual

Default finalize preparation.

This is a default implementation that assumes that finalization is always safe. Override it if you need to make more fine-grained decisions.

Parameters
threadthread to prepare for finalization
Returns
always true

Reimplemented in fawkes::VisionMasterAspectIniFin, fawkes::CLIPSFeatureAspectIniFin, fawkes::AspectProviderAspectIniFin, and fawkes::VisionAspectIniFin.

Definition at line 79 of file inifin.cpp.


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