OutControlPublisher.hxx

Go to the documentation of this file.
00001 #ifndef _OUTCONTROL_PUBLISHER_HXX_
00002 #define _OUTCONTROL_PUBLISHER_HXX_
00003 
00004 #include "InControl.hxx"
00005 #include "OutControl.hxx"
00006 #include <string>
00007 
00008 // TODO: Refactoring...
00009 // Extract common interface from OutControlPublisher, OutControl and create a common base class
00010 
00011 namespace CLAM
00012 {
00013     class OutControlPublisher : public FloatOutControl
00014         {
00015                         FloatOutControl* mPublished;
00016 
00017                 public:
00018                         OutControlPublisher() 
00019                                 : FloatOutControl( "OutControlPublisher", 0 ) 
00020                         {
00021                                 mPublished=NULL;
00022                         } 
00023 
00024                         OutControlPublisher( const std::string& name, Processing* father )
00025                                 : FloatOutControl( name, father ) 
00026                         {
00027                                 mPublished=NULL;
00028                         }
00029 
00030                         void PublishOutControl( FloatOutControl& out )
00031                         {
00032                                 mPublished = &out;
00033                         }
00034 
00035                         void AddLink( InControlBase& in )
00036                         {
00037                                 FloatOutControl::AddLink( in );
00038                                 if(mPublished) mPublished->AddLink( in );
00039                         }
00040         };
00041 
00042 } // namespace CLAM
00043 
00044 #endif
00045 
Generated by  doxygen 1.6.3