24 #include <aspect/inifins/vision_master.h> 25 #include <aspect/vision_master.h> 26 #include <fvutils/base/vision_master.h> 27 #include <core/threading/thread_finalizer.h> 51 if (vision_master_thread == 0) {
53 "VisionMasterAspect, but RTTI says it " 54 "has not. ", thread->
name());
58 __vision_dependency.add(vision_master_thread);
61 "VisionMasterAspect detected");
73 if (vision_master_thread == 0) {
77 if ( ! __vision_dependency.can_remove(vision_master_thread) ) {
91 if (vision_master_thread == 0) {
93 "VisionMasterAspect, but RTTI says it " 94 "has not. ", thread->
name());
98 __vision_dependency.remove(vision_master_thread);
101 "VisionMasterAspect detected");
114 return __vision_dependency.provider()->vision_master();
124 __vision_dependency.add(thread);
133 __vision_dependency.remove(thread);
143 return __vision_dependency.can_remove(thread);
virtual void init(Thread *thread)
Initialize thread.
Fawkes library namespace.
void remove_vision_thread(VisionAspect *thread)
Remove a vision thread.
VisionMasterAspectIniFin()
Constructor.
Thread class encapsulation of pthreads.
bool can_remove_vision_thread(VisionAspect *thread)
Query if vision thread can be removed.
firevision::VisionMaster * vision_master()
Get vision master.
Thread cannot be initialized.
virtual void finalize(Thread *thread)
Finalize thread.
Dependency violation exception.
Thread aspect to use in FireVision apps.
void add_vision_thread(VisionAspect *thread)
Add a vision thread.
const char * name() const
Get name of thread.
Thread cannot be finalized.
virtual bool prepare_finalize(Thread *thread)
Default finalize preparation.
void append(const char *format,...)
Append messages to the message list.
Aspect initializer/finalizer base class.