Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

MPluginControlInputPort.h

00001 /*
00002 
00003     This file is part of la Marmite.
00004     Copyright (C) 2005 Nicolas Falquet.
00005 
00006     La Marmite is free software ; you can redistribute it and/or
00007     modify it under the terms of the GNU General Public License as
00008     published by the Free Software Foundation ; either version 2 of
00009     the License, or (at your option) any later version.
00010 
00011     La Marmite is distributed in the hope that it will be useful, but
00012     WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with la Marmite ; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019     02111-1307  USA
00020 
00021 */
00022 
00023 #ifndef M_PLUGIN_CONTROL_INPUT_PORT
00024 #define M_PLUGIN_CONTROL_INPUT_PORT
00025 
00026 #include "MPluginPort.h"
00027 #include "MControlInputPort.h"
00028 
00029 #include "MPlugin.h"
00030 
00035 class MPluginControlInputPort : public MControlInputPort, public MPluginPort
00036 {
00037 
00038   Q_OBJECT
00039 
00040 public:
00041 
00042   // destructor
00043 
00044   virtual ~ MPluginControlInputPort ( ) { }
00045 
00046   // function
00047 
00053   virtual float * Buffer ( );
00054 
00058   virtual float Value ( ) const;
00059 
00060 public slots :
00061 
00065   virtual bool Connect ( MControlOutputPort * port );
00066 
00070   virtual bool Disconnect ( MControlOutputPort * port );
00071 
00077   virtual void SetValue ( float f );
00078 
00079   /*
00080     public signals :
00081 
00082     void ValueChanged ( float f );
00083   */
00084 
00085 protected :
00086 
00087   // protected constructor
00088 
00096   MPluginControlInputPort ( MPlugin * plugin, const unsigned long portNumber );
00097 
00098   friend void MPlugin::createControlInput ( const unsigned long portNumber );
00099 
00100   // protected attributes
00101 
00103   float _localValue;
00104 
00105 };
00106 
00107 #endif // M_PLUGIN_CONTROL_INPUT_PORT_H

Generated on Mon Jan 31 12:43:31 2005 for la Marmite by Doxygen 1.4.1