Fawkes API  Fawkes Development Version
fawkes::VisionMasterAspectIniFin Class Reference

Initializer/finalizer for the VisionMasterAspect. More...

#include <>>

Inheritance diagram for fawkes::VisionMasterAspectIniFin:

List of all members.

Public Member Functions

 VisionMasterAspectIniFin ()
 Constructor.
virtual void init (Thread *thread)
 Initialize thread.
virtual void finalize (Thread *thread)
 Finalize thread.
virtual bool prepare_finalize (Thread *thread)
 Default finalize preparation.
firevision::VisionMastervision_master ()
 Get vision master.
void add_vision_thread (VisionAspect *thread)
 Add a vision thread.
void remove_vision_thread (VisionAspect *thread)
 Remove a vision thread.
bool can_remove_vision_thread (VisionAspect *thread)
 Query if vision thread can be removed.

Detailed Description

Initializer/finalizer for the VisionMasterAspect.

Author:
Tim Niemueller

Constructor & Destructor Documentation

fawkes::VisionMasterAspectIniFin::VisionMasterAspectIniFin ( )

Constructor.

Definition at line 40 of file vision_master.cpp.


Member Function Documentation

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.

References fawkes::OneToManyDependency::add().

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

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.

References fawkes::OneToManyDependency::can_remove().

Referenced by fawkes::VisionAspectIniFin::prepare_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::Thread::name(), fawkes::OneToManyDependency::remove(), and fawkes::Exception::append().

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::Thread::name(), fawkes::OneToManyDependency::add(), and fawkes::Exception::append().

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.

References fawkes::OneToManyDependency::can_remove().

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.

References fawkes::OneToManyDependency::remove().

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

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

Get vision master.

Returns:
vision master

Definition at line 112 of file vision_master.cpp.

References fawkes::OneToManyDependency::provider().

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


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