Fawkes API  Fawkes Development Version
fawkes::VisionMasterAspectIniFin Class Reference

Initializer/finalizer for the VisionMasterAspect. More...

#include <>>

Inheritance diagram for fawkes::VisionMasterAspectIniFin:

Public Member Functions

 VisionMasterAspectIniFin ()
 Constructor. More...
 
virtual void init (Thread *thread)
 Initialize thread. More...
 
virtual void finalize (Thread *thread)
 Finalize thread. More...
 
virtual bool prepare_finalize (Thread *thread)
 Default finalize preparation. More...
 
firevision::VisionMastervision_master ()
 Get vision master. More...
 
void add_vision_thread (VisionAspect *thread)
 Add a vision thread. More...
 
void remove_vision_thread (VisionAspect *thread)
 Remove a vision thread. More...
 
bool can_remove_vision_thread (VisionAspect *thread)
 Query if vision thread can be removed. More...
 
- Public Member Functions inherited from fawkes::AspectIniFin
 AspectIniFin (const char *aspect_name) __attribute__((nonnull))
 Constructor. More...
 
virtual ~AspectIniFin ()
 Virtual empty destructor. More...
 
const char * get_aspect_name () const
 Get aspect name. More...
 

Detailed Description

Initializer/finalizer for the VisionMasterAspect.

Author
Tim Niemueller

Definition at line 41 of file vision_master.h.

Constructor & Destructor Documentation

◆ VisionMasterAspectIniFin()

fawkes::VisionMasterAspectIniFin::VisionMasterAspectIniFin ( )

Constructor.

Definition at line 40 of file vision_master.cpp.

Member Function Documentation

◆ add_vision_thread()

void fawkes::VisionMasterAspectIniFin::add_vision_thread ( VisionAspect thread)

Add a vision thread.

Parameters
threadthread to add

Definition at line 122 of file vision_master.cpp.

Referenced by fawkes::VisionAspectIniFin::init().

◆ can_remove_vision_thread()

bool fawkes::VisionMasterAspectIniFin::can_remove_vision_thread ( VisionAspect thread)

Query if vision thread can be removed.

Parameters
threadthread to query for
Returns
true if the thread can be removed, false otherwise

Definition at line 141 of file vision_master.cpp.

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

◆ finalize()

void fawkes::VisionMasterAspectIniFin::finalize ( Thread thread)
virtual

Finalize thread.

The aspect for the given thread must be initialized. Use dynamic_cast to cast the thread into the expected aspect class. An exception must be thrown if this fails. If anything fails during initialization of the aspect an Exception must be thrown. This will not prevent the thread from being removed. Use prepare_finalize() to report problems that should prevent the thread from being unloaded.

Parameters
threadthread to finalize

Implements fawkes::AspectIniFin.

Definition at line 87 of file vision_master.cpp.

References fawkes::Exception::append(), and fawkes::Thread::name().

◆ init()

void fawkes::VisionMasterAspectIniFin::init ( Thread thread)
virtual

Initialize thread.

The aspect for the given thread must be initialized. Use dynamic_cast to cast the thread into the expected aspect class. An exception must be thrown if this fails. If anything fails during initialization of the aspect an Exception must be thrown.

Parameters
threadthread to initialize

Implements fawkes::AspectIniFin.

Definition at line 47 of file vision_master.cpp.

References fawkes::Exception::append(), and fawkes::Thread::name().

◆ prepare_finalize()

bool fawkes::VisionMasterAspectIniFin::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 from fawkes::AspectIniFin.

Definition at line 69 of file vision_master.cpp.

◆ remove_vision_thread()

void fawkes::VisionMasterAspectIniFin::remove_vision_thread ( VisionAspect thread)

Remove a vision thread.

Parameters
threadthread to remove

Definition at line 131 of file vision_master.cpp.

Referenced by fawkes::VisionAspectIniFin::finalize().

◆ vision_master()

firevision::VisionMaster * fawkes::VisionMasterAspectIniFin::vision_master ( )

Get vision master.

Returns
vision master

Definition at line 112 of file vision_master.cpp.

Referenced by fawkes::VisionAspectIniFin::init().


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