div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

ErrorVisualizerService.h

Go to the documentation of this file.
00001 /* ========================================================================
00002  * Copyright (C) 2000-2004  Technische Universitaet Muenchen
00003  * License: GPL v2 (or later)
00004  *
00005  * For further information please contact the DWARF team at
00006  * <dwarf-gnu@augmentedreality.de>
00007  *
00008  * ErrorVisualizerService.h
00009  * Daniel Pustka <pustka@in.tum.de> April 2004
00010  * Distributed Wearable Augmented Reality Framework - www.augmentedreality.de
00011  * For documentation and instructions, see the DWARF documentation website at
00012  * http://wwwbruegge.in.tum.de/projects/dwarf/doc/
00013  *
00014  * For further questions about DWARF, please contact us at
00015  * <dwarf@augmentedreality.de>
00016  * For questions about this particular service, contact
00017  * Daniel Pustka <pustka@in.tum.de>
00018  *
00019  * $Id: ErrorVisualizerService.h,v 1.3 2006/02/15 17:49:03 pustka Exp $
00020  */
00021 
00022 /**
00023  * @file ErrorVisualizerService.h
00024  * @brief Header file containing for the ErrorVisualizer service.
00025  *
00026  * @author Daniel Pustka <pustka@in.tum.de>
00027  * @ingroup ErrorVisualizer
00028  */
00029 
00030 #ifndef __ErrorVisualizerSERVICE_H_
00031 #define __ErrorVisualizerSERVICE_H_
00032 
00033 // DWARF headers
00034 #include <ubitrack/PoseService.h>
00035 #include <debug.h>
00036 #include <DWARF/ViewerControl.h>
00037 #include <string>
00038 #include <map>
00039 
00040 #include "auto_vector.h"
00041 #include "ObjrefImporterNeed.h"
00042 #include "ErrorPoseAbility.h"
00043 
00044 
00045 namespace DWARF {
00046 
00047         /**
00048          * @brief The class handling the setup of needs & abilities.
00049          *
00050          * This class is derived from the DWARF C++ Template service.
00051          *
00052          * @author Daniel Pustka <pustka@in.tum.de>
00053          * @ingroup ErrorVisualizer
00054          */
00055         class ErrorVisualizerService
00056                 : public PoseService
00057                 , protected ObjrefImporterNeed<DWARF::ViewerControl>::Processor
00058                 {
00059                 protected:
00060                         omni_mutex m_Mutex;
00061 
00062                         ObjrefImporterNeed<DWARF::ViewerControl> m_ViewerNeed;
00063 
00064                         typedef std::map<std::string, ErrorPoseAbility*> AbilityMapT;
00065                         AbilityMapT m_AbilityMap;
00066                         auto_vector<ErrorPoseAbility> m_Abilities;
00067 
00068                         /** gets called for every import of a ViewerControl object */
00069                         void onImport( DWARF::ViewerControl_ptr pInterface,
00070                                 ObjrefImporterNeed<DWARF::ViewerControl>* pImporter );
00071 
00072                         //! @brief Create a Need object for a given description.
00073                         //! @param needDescr The description of the ability
00074                         //! @return The created C++ Object_ptr
00075                         virtual CORBA::Object_ptr createNeedObject(DWARF::NeedDescription_ptr needDescr);
00076 
00077                 public:
00078                         ErrorVisualizerService();
00079                         virtual ~ErrorVisualizerService();
00080 
00081                 protected:
00082 
00083                         /**
00084                          * @brief The main execution loop
00085                          */
00086                         void run();
00087 
00088                         /** receives all PoseData events */
00089                         void onEvent( PoseData& );
00090                 };
00091 };
00092 
00093 #endif //__ErrorVisualizerSERVICE_H_

ErrorVisualizerService.h Source File | generated on Sun Apr 29 02:00:59 2007 by Doxygen 1.4.1 for DWARF