TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/property/OfxhNotifyHook.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_OFX_PROPERTY_NOTIFYHOOK_HPP_
00002 #define _TUTTLE_HOST_OFX_PROPERTY_NOTIFYHOOK_HPP_
00003 
00004 #include <tuttle/host/ofx/OfxhException.hpp>
00005 #include <string>
00006 
00007 namespace tuttle {
00008 namespace host {
00009 namespace ofx {
00010 namespace property {
00011 
00012 /// Sits on a property and is called when the local property is being set.
00013 /// It notify or notifyN is called whenever the plugin sets a property
00014 /// Many of these can sit on a property, as various objects will need to know when a property
00015 /// has been changed. On notification you should fetch properties with a 'raw' call, rather
00016 /// than the standard calls, as you may be fetching through a getHook and you won't see
00017 /// the local value that has been shoved into the property.
00018 class OfxhNotifyHook
00019 {
00020 public:
00021         /// dtor
00022         virtual ~OfxhNotifyHook() {}
00023 
00024         /// override this to be notified when a property changes
00025         /// \arg name is the name of the property just set
00026         /// \arg singleValue is whether setProperty on a single index was call, otherwise N properties were set
00027         /// \arg indexOrN is the index if single value is true, or the count if singleValue is false
00028         virtual void notify( const std::string& name, bool singleValue, int indexOrN ) OFX_EXCEPTION_SPEC = 0;
00029 };
00030 
00031 }
00032 }
00033 }
00034 }
00035 
00036 #endif