-class TraffCounterImpl;
-//-----------------------------------------------------------------------------
-class TRF_IP_BEFORE: public PropertyNotifierBase<uint32_t> {
-public:
- TRF_IP_BEFORE(TraffCounterImpl & t, UserImpl * u)
- : PropertyNotifierBase<uint32_t>(),
- traffCnt(t),
- user(u)
- {}
- TRF_IP_BEFORE(const TRF_IP_BEFORE & rvalue)
- : PropertyNotifierBase<uint32_t>(),
- traffCnt(rvalue.traffCnt),
- user(rvalue.user)
- {}
- void notify(const uint32_t & oldValue, const uint32_t & newValue) override;
- void SetUser(UserImpl * u) { user = u; }
- UserImpl * GetUser() const { return user; }
-
-private:
- TRF_IP_BEFORE & operator=(const TRF_IP_BEFORE & rvalue);
-
- TraffCounterImpl & traffCnt;
- UserImpl * user;
-};
-//-----------------------------------------------------------------------------
-class TRF_IP_AFTER: public PropertyNotifierBase<uint32_t> {
-public:
- TRF_IP_AFTER(TraffCounterImpl & t, UserImpl * u)
- : PropertyNotifierBase<uint32_t>(),
- traffCnt(t),
- user(u)
- {}
- TRF_IP_AFTER(const TRF_IP_AFTER & rvalue)
- : PropertyNotifierBase<uint32_t>(),
- traffCnt(rvalue.traffCnt),
- user(rvalue.user)
- {}
- void notify(const uint32_t & oldValue, const uint32_t & newValue) override;
- void SetUser(UserImpl * u) { user = u; }
- UserImpl * GetUser() const { return user; }
-private:
- TRF_IP_AFTER & operator=(const TRF_IP_AFTER & rvalue);
-
- TraffCounterImpl & traffCnt;
- UserImpl * user;
-};
-
-using UserImplPtr = UserImpl*;
-//-----------------------------------------------------------------------------
-class ADD_USER_NONIFIER: public NotifierBase<UserImplPtr> {
-public:
- explicit ADD_USER_NONIFIER(TraffCounterImpl & t) :
- NotifierBase<UserImplPtr>(),
- traffCnt(t)
- {}
- virtual ~ADD_USER_NONIFIER() {}
- void notify(const UserImplPtr & user) override;
-
-private:
- ADD_USER_NONIFIER(const ADD_USER_NONIFIER & rvalue);
- ADD_USER_NONIFIER & operator=(const ADD_USER_NONIFIER & rvalue);
-
- TraffCounterImpl & traffCnt;
-};
-//-----------------------------------------------------------------------------
-class DEL_USER_NONIFIER: public NotifierBase<UserImplPtr> {
-public:
- explicit DEL_USER_NONIFIER(TraffCounterImpl & t) :
- NotifierBase<UserImplPtr>(),
- traffCnt(t)
- {}
- virtual ~DEL_USER_NONIFIER() {}
- void notify(const UserImplPtr & user) override;
-
-private:
- DEL_USER_NONIFIER(const DEL_USER_NONIFIER & rvalue);
- DEL_USER_NONIFIER & operator=(const DEL_USER_NONIFIER & rvalue);
-
- TraffCounterImpl & traffCnt;
-};
-//-----------------------------------------------------------------------------