// $Revision: 1.3 $ // Copyright (c) 1994-1995 Taligent, Inc. All Rights Reserved. // Notification sample #ifndef TaligentSamples_SENDER #include "Sender.h" #endif #ifndef TaligentSamples_LONGNOTIFICATION #include "LongNotification.h" #endif // ======================================================================================== TSender::TSender() : TNotifier(), fValue(0) { } TSender::~TSender() { } long TSender::GetValue() const { return fValue; } void TSender::SetValue(long value) { if (value != fValue) { TLongNotification notification(GetValueChangedInterest(), fValue); fValue = value; Notify(notification); } } TInterest TSender::GetValueChangedInterest() const { static const TToken kValueChanged("ValueChanged"); // Cast away const. return TInterest((TNotifier*)this, kValueChanged); }