-class ADD_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-public:
- explicit ADD_USER_NONIFIER(REMOTE_SCRIPT & r)
- : NOTIFIER_BASE<USER_PTR>(), rs(r) {}
- virtual ~ADD_USER_NONIFIER() {}
- void Notify(const USER_PTR & user);
-
-private:
- ADD_USER_NONIFIER(const ADD_USER_NONIFIER & rhs);
- ADD_USER_NONIFIER & operator=(const ADD_USER_NONIFIER);
-
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-class DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
-public:
- explicit DEL_USER_NONIFIER(REMOTE_SCRIPT & r)
- : NOTIFIER_BASE<USER_PTR>(), rs(r) {}
- virtual ~DEL_USER_NONIFIER() {}
- void Notify(const USER_PTR & user);
-
-private:
- DEL_USER_NONIFIER(const DEL_USER_NONIFIER & rhs);
- DEL_USER_NONIFIER & operator=(const DEL_USER_NONIFIER);
-
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-class IP_NOTIFIER: public PROPERTY_NOTIFIER_BASE<uint32_t> {
-public:
- IP_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u)
- : PROPERTY_NOTIFIER_BASE<uint32_t>(), user(u), rs(r) { user->AddCurrIPAfterNotifier(this); }
- IP_NOTIFIER(const IP_NOTIFIER & rhs)
- : PROPERTY_NOTIFIER_BASE<uint32_t>(), user(rhs.user), rs(rhs.rs) { user->AddCurrIPAfterNotifier(this); }
- ~IP_NOTIFIER() { user->DelCurrIPAfterNotifier(this); }
-
- IP_NOTIFIER & operator=(const IP_NOTIFIER & rhs)
- {
- user->DelCurrIPAfterNotifier(this);
- user = rhs.user;
- user->AddCurrIPAfterNotifier(this);
- return *this;
- }
-
- void Notify(const uint32_t & oldValue, const uint32_t & newValue);
- USER_PTR GetUser() const { return user; }
-
-private:
-
- USER_PTR user;
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-class CONNECTED_NOTIFIER: public PROPERTY_NOTIFIER_BASE<bool> {
-public:
- CONNECTED_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u)
- : PROPERTY_NOTIFIER_BASE<bool>(), user(u), rs(r) { user->AddConnectedAfterNotifier(this); }
- CONNECTED_NOTIFIER(const CONNECTED_NOTIFIER & rhs)
- : PROPERTY_NOTIFIER_BASE<bool>(), user(rhs.user), rs(rhs.rs) { user->AddConnectedAfterNotifier(this); }
- ~CONNECTED_NOTIFIER() { user->DelConnectedAfterNotifier(this); }
-
- CONNECTED_NOTIFIER & operator=(const CONNECTED_NOTIFIER & rhs)
- {
- user->DelConnectedAfterNotifier(this);
- user = rhs.user;
- user->AddConnectedAfterNotifier(this);
- return *this;
- }
-
- void Notify(const bool & oldValue, const bool & newValue);
- USER_PTR GetUser() const { return user; }
-
-private:
-
- USER_PTR user;
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-struct USER {
- USER(const std::vector<uint32_t> & r, USER_PTR it)