OMKInteractorExtension.h

Go to the documentation of this file.
00001 /************************************************************************/
00002 /* This file is part of openMask(c) INRIA, CNRS, Universite de Rennes 1 */
00003 /* 1993-2002, thereinafter the Software                                 */
00004 /*                                                                      */
00005 /* The Software has been developped within the Siames Project.          */
00006 /* INRIA, the University of Rennes 1 and CNRS jointly hold intellectual */
00007 /* property rights                                                      */
00008 /*                                                                      */
00009 /* The Software has been registered with the Agence pour la Protection  */
00010 /* des Programmes (APP) under registration number                       */
00011 /* IDDN.FR.001.510008.00.S.P.2001.000.41200                             */
00012 /*                                                                      */
00013 /* This file may be distributed under the terms of the Q Public License */
00014 /* version 1.0 as defined by Trolltech AS of Norway and appearing in    */
00015 /* the file LICENSE.QPL included in the packaging of this file.         */
00016 /*                                                                      */
00017 /* Licensees holding valid specific licenses issued by INRIA, CNRS or   */
00018 /* Universite Rennes 1 for the software may use this file in            */
00019 /* acordance with that specific license                                 */
00020 /************************************************************************/
00021                 
00022 #if !defined OMK_III_INTERACTOREXTENSION_H
00023 #define OMK_III_INTERACTOREXTENSION_H
00024 
00025 #include "OMKExtension.h"
00026 #include "OMKInteractorOutput.h"
00027 #include "OMKInteractiveEventId.h"
00028 
00029 namespace OMK  
00030 {
00031   class ExtensibleSimulatedObject ;
00032   namespace Iii 
00033   {
00034 class EventInteractorListener ;
00035 class SessionPrm ;
00036 // Predefined classes
00037 
00038 
00053 class OMKIII_API InteractorExtension
00054 : public ExtensionT< ExtensibleSimulatedObject >
00055 {
00057 
00058 public:
00060   virtual ~InteractorExtension() ;
00061 protected:
00063   InteractorExtension( ExtensibleSimulatedObject* owner, const Name& id, bool registerExtension = true ) ;
00065 
00067 
00068 
00069 
00070   virtual bool loadExtensionParameters( const ConfigurationParameterDescriptor * node ) ;
00075   virtual void startInteractor() ;
00077 
00078 
00079 public:
00095   virtual void startSessionWith( const Name& interactiveObject ) ; 
00101   virtual void closeSessionWith( const Name& interactiveObject ) ; 
00108   SessionPrm* getSessionWith( const Name& interactiveObject ) ;
00111   void closeAllSessions() ; 
00112 protected:
00121   virtual SessionPrm* createSession( const Name& interactiveObject ) ; 
00126   SessionsMap _sessionsPrm ;
00128 public:
00129   ExtensibleSimulatedObject* getInteractor() { return _owner ; }
00132   OMK::Type::AccessLevel getAccessLevel() const { return _access._level ; }
00135   void setAccessLevel( OMK::Type::AccessLevel level = 0 ) { _access._level = level ; }
00138   const OMK::Name& getGroup() const { return _access._groupName ; }
00141   void setGroup( const OMK::Name& name ) { _access._groupName = name ; }
00143   const OMK::Type::AccessGroup& getAccessGroup() const { return _access ; }
00144 protected:
00156   OMK::Type::AccessGroup _access ;
00158 
00159 protected:
00161   EventListener * _accessibleConnectorsListener ;
00163   EventListener * _currentValuesSentAndControlTakenListener ;
00165   EventListener * _controlReleasedListener ;
00167   EventListener * _controlEndedListener ;
00169   EventListener * _controlTakenByListener ;
00171   EventListener * _controlReleasedByListener ;
00173   EventListener * _currentValuesSentListener ;
00182   virtual bool processAccessibleParameters( Type::AccessibleParametersListEvent *event ) ;
00193   virtual bool processCurrentValuesSentAndControlTaken( Type::ControlTakenEvent *event ) ;
00200   virtual bool processControlReleased( Type::ControlReleasedEvent *event ) ;
00211   virtual bool processControlEnded( Type::ControlEndedEvent *event ) ;
00212   virtual bool processControlTakenBy( Type::ControlUpdatedEvent *event ) ;
00213   virtual bool processControlReleasedBy( Type::ControlUpdatedEvent *event ) ;
00216   virtual bool processCurrentValuesSent( Event* event ) ;
00218 public:
00221   void addInteractorOutput( InteractorOutput* interactorOutput ) ;
00222 protected:
00224   InteractorOutputsMap _interactorOutputs ;
00225 } ;
00226 
00227   }// namespace Iii
00228 }// namespace OMK
00229 
00230 #endif // defined OMK_III_INTERACTOREXTENSION_H

logo OpenMask

Documentation generated on Mon Jun 9 11:45:56 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007