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 #ifndef OMK_VIS_ANIMATORINPUTPLUGT_H 00022 #define OMK_VIS_ANIMATORINPUTPLUGT_H 00023 00024 #include "OMKAnimatorPlug.h" 00025 #include "OMKAnimatorPlugT.h" 00026 #include "OMKInput.h" 00027 00028 namespace OMK 00029 { 00030 namespace Vis 00031 { 00032 00043 template< typename T > 00044 class AnimatorInputPlugT : public AnimatorPlugT<T> 00045 { 00046 public: 00047 00049 00050 00051 00052 00053 AnimatorInputPlugT( Input< T > *listenedInput ): 00054 AnimatorPlugT<T>(), 00055 _listenedInput( listenedInput ) 00056 { 00057 OMASSERT( _listenedInput && "Must be valid !" ) ; 00058 } 00059 00061 virtual ~AnimatorInputPlugT() {} 00063 00065 00066 00067 00068 00069 00070 virtual const T& getTypedValue() const 00071 { 00072 OMASSERTM( _listenedInput->isConnected(), "The input is not connected, cannot get the value" ) ; 00073 return _listenedInput->get() ; 00074 } 00078 virtual bool isValueChanged() const 00079 { 00080 return _listenedInput->isConnected() ; 00081 } 00083 00084 protected: 00085 00087 Input< T > *_listenedInput ; 00088 }; 00089 00090 }// namespace Vis 00091 }// namespace OMK 00092 00093 #endif // OMK_VIS_ANIMATORINPUTPLUGT_H
Documentation generated on Mon Jun 9 11:45:55 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |