-private:
- TRAFFCOUNTER_IMPL & traffCnt;
- USER_PTR user;
-};
-//-----------------------------------------------------------------------------
-class TRF_IP_AFTER: public PROPERTY_NOTIFIER_BASE<uint32_t> {
-public:
- TRF_IP_AFTER(TRAFFCOUNTER_IMPL & t, USER_PTR u)
- : PROPERTY_NOTIFIER_BASE<uint32_t>(),
- traffCnt(t),
- user(u)
- {}
- void Notify(const uint32_t & oldValue, const uint32_t & newValue);
- void SetUser(USER_PTR u) { user = u; }
- USER_PTR GetUser() const { return user; }
-private:
- TRAFFCOUNTER_IMPL & traffCnt;
- USER_PTR user;
-};
-//-----------------------------------------------------------------------------
-class ADD_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-public:
- ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
- NOTIFIER_BASE<USER_PTR>(),
- traffCnt(t)
- {}
- virtual ~ADD_USER_NONIFIER() {}
- void Notify(const USER_PTR & user);
-private:
- TRAFFCOUNTER_IMPL & traffCnt;
-};
-//-----------------------------------------------------------------------------
-class DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-public:
- DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
- NOTIFIER_BASE<USER_PTR>(),
- traffCnt(t)
- {}
- virtual ~DEL_USER_NONIFIER() {}
- void Notify(const USER_PTR & user);
-private:
- TRAFFCOUNTER_IMPL & traffCnt;
-};
-//-----------------------------------------------------------------------------
-class TRAFFCOUNTER_IMPL : public TRAFFCOUNTER, private NONCOPYABLE {
-friend class ADD_USER_NONIFIER;
-friend class DEL_USER_NONIFIER;
-friend class TRF_IP_BEFORE;
-friend class TRF_IP_AFTER;
-public:
- TRAFFCOUNTER_IMPL(USERS * users, const TARIFFS * tariffs, const std::string & rulesFileName);
- ~TRAFFCOUNTER_IMPL();