CChangeDelegator.h
Go to the documentation of this file.
1 #ifndef istd_CChangeDelegator_included
2 #define istd_CChangeDelegator_included
3 
4 
5 // ACF includes
7 
8 
9 namespace istd
10 {
11 
12 
18 class CChangeDelegator: virtual public IChangeDelegator
19 {
20 public:
22 
24  explicit CChangeDelegator(istd::IChangeable* slavePtr);
25 
26  // reimplemented (istd::IChangeDelegator)
27  virtual void SetSlavePtr(istd::IChangeable* slavePtr);
28  virtual istd::IChangeable* GetSlavePtr() const;
29 
30  // reimplemented (istd::IChangeable)
31  virtual void OnBeginChanges();
32  virtual void OnEndChanges(const ChangeSet& changeSet);
33 
34 private:
35  istd::IChangeable* m_slavePtr;
36 };
37 
38 
39 // inline methods
40 
42 {
43  m_slavePtr = slavePtr;
44 }
45 
46 
48 {
49  return m_slavePtr;
50 }
51 
52 
53 } // namespace istd
54 
55 
56 #endif // !istd_CChangeDelegator_included
57 
virtual void OnEndChanges(const ChangeSet &changeSet)
Callback function for end change event.
istd::IChangeable BaseClass
Common interface for all classes that supports delegation of their data updates to another class...
virtual istd::IChangeable * GetSlavePtr() const
Sets the slave object pointer.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual void OnBeginChanges()
Callback function for begin change event.
Set of change flags (its IDs).
Definition: IChangeable.h:30
virtual void SetSlavePtr(istd::IChangeable *slavePtr)
Gets the slave object pointer.
Delegates calls of IChangeable methods to the given slave.

© 2007-2017 Witold Gantzke and Kirill Lepskiy