Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. class A
  2. {
  3. protected:
  4.    virtual void updateValue(ID id)
  5.     {
  6.         m_values[i] = new AVALUE(i);
  7.     }  
  8. private:
  9.    map<ID, AVALUE*> m_values;
  10. }
  11.  
  12. class B : public A
  13. {
  14. protected:
  15.    virtual void doSomething(ARGS args)
  16.    {
  17.         m_values[args.id] = args.value;
  18.         updateValue(args.id);
  19.    }
  20. private:
  21.    map<ID, BVALUE*> m_values;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement