Go to the documentation of this file.
7 namespace InstrumentCatalogInterface {
14 template <
class DataType>
18 CVariable<DataType> & m_rVariable;
22 : m_rVariable(rVariable)
30 m_rVariable.Write(NewValue);
34 m_rVariable.rWrite(rNewValue);
38 m_rVariable.rWrite(rNewValue);
42 m_rVariable.rWrite(rNewValue);
48 return m_rVariable.Read();
52 return m_rVariable.Read();
56 m_rVariable.rRead(rReturnedValue);
71 {
return (
this == &rObs); }
73 {
return (
this == pObs); }
76 virtual void *
Copy(
void) = 0;
77 virtual void Delete(
void *
const pAllocatedData) = 0;
82 template <
class DataType>
83 class CObserver :
public CObserver_untyped
121 DataType * l_pDataCopy =
new DataType;
127 if (NULL != pAllocatedData)
129 delete reinterpret_cast<DataType *
>(pAllocatedData);
161 {
return m_rNotifier; }
196 {
return m_pDataCopy; }
216 : m_NotifierType(NotifType)
222 {
return (
this == &rNot); }
224 {
return (
this == pNot); }
226 {
return m_NotifierType; }
233 template <
class DataType>
246 template<
class Fn,
class... Args>
262 template <
class NotificationType>
279 m_PushNotifCallback(l_pNotif);
292 template<
class Fn,
class... Args>
306 template<
class Fn,
class... Args>
std::function< void(CAsyncNotification *pAsyncNotification)> tPushEventCallback
virtual ~CAsyncNotifier()
CAsyncSnapshotNotification(CObserverNotifier_untyped &rNot, CObserver_untyped &rObs)
CSyncNotifier(Fn &&MemberCallback, Args &&... ClassObj)
CObserver(CVariable< DataType > &rVariable)
void NotifyVarUpdate(CObserver_untyped &rObs)
virtual void * Copy(void)=0
void rReadCurrent(DataType &rReturnedValue)
CAsyncNotifier(tNotifierType NotifType, const tPushEventCallback &rCallB)
const tNotifierType & Type()
virtual ~CAsyncNotification()
void rReadCurrent(DataType &rReturnedValue)
DataType ReadCurrent(void)
bool Is(const CObserver_untyped *pObs)
CAsyncSnaphsotNotifier(Fn &&MemberCallback, Args &&... ClassObj)
virtual void NotifyVarUpdate(CObserver_untyped &rObs)=0
virtual ~CAsyncSnapshotNotification()
enum MTL::InstrumentCatalogInterface::CObserverNotifier_untyped::NotifierType tNotifierType
const void * DataCopy() const
CAsyncSnaphsotNotifier(const tPushEventCallback &rCallB)
CAsyncNotification(CObserverNotifier_untyped &rNot, CObserver_untyped &rObs)
CControl(CVariable< DataType > &rVariable)
void Subscribe(CObserverNotifier_untyped &rNotifier)
void Unsubscribe(CObserverNotifier_untyped &rNotifier)
void RequestControl(const DataType NewValue)
void Delete(void *const pAllocatedData)
CObserverNotifier_untyped & Notifier() const
DataType ReadCurrent(void)
bool Is(const CObserverNotifier_untyped *pNot)
virtual void Delete(void *const pAllocatedData)=0
virtual ~CObserverNotifier_untyped()
CAsyncDynamicNotifier(const tPushEventCallback &rCallB)
void rRequestControl(const DataType &rNewValue)
void NotifyVarUpdate(CObserver_untyped &rObs)
bool Is(CObserverNotifier_untyped &rNot)
virtual ~CObserver_untyped()
void operator=(const DataType &rNewValue)
CAsyncDynamicNotification(CObserverNotifier_untyped &rNot, CObserver_untyped &rObs)
CObserver_untyped & m_rObserver
std::function< void(CObserver< DataType > &rObserver)> tCallback
CObserverNotifier_untyped(tNotifierType NotifType)
CSyncNotifier(const tCallback &rCallB)
CAsyncDynamicNotifier(Fn &&MemberCallback, Args &&... ClassObj)
CVariable< DataType > & m_rVariable
virtual ~CAsyncDynamicNotification()
bool Is(const CObserver_untyped &rObs)
CObserver_untyped & Observer() const