}
-void CtrlTree::onUpdate( Subject<VarTree, tree_update*> &rTree,
+void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
tree_update *arg )
{
if( arg->i_type == 0 ) // Item update
class GenericBitmap;
/// Class for control tree
-class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update*>,
+class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update>,
public Observer<VarPercent>
{
public:
bool m_flat;
/// Method called when the tree variable is modified
- virtual void onUpdate( Subject<VarTree, tree_update*> &rTree ,
+ virtual void onUpdate( Subject<VarTree, tree_update> &rTree ,
tree_update *);
// Method called when the position variable of the tree is modified
/// Template for subjects in the Observer design pattern
-template <class S, class ARG = void*> class Subject
+template <class S, class ARG = void> class Subject
{
public:
virtual ~Subject() {}
}
/// Notify the observers when the status has changed
- virtual void notify( ARG arg )
+ virtual void notify( ARG *arg )
{
// This stupid gcc 3.2 needs "typename"
typename set<Observer<S, ARG>*>::const_iterator iter;
/// Template for observers in the Observer design pattern
-template <class S, class ARG = void*> class Observer
+template <class S, class ARG = void> class Observer
{
public:
virtual ~Observer() {}
/// Method called when the subject is modified
- virtual void onUpdate( Subject<S,ARG> &rSubject , ARG arg) = 0;
+ virtual void onUpdate( Subject<S, ARG> &rSubject, ARG *arg) = 0;
protected:
Observer() {}
} tree_update;
/// Tree variable
-class VarTree: public Variable, public Subject<VarTree, tree_update*>
+class VarTree: public Variable, public Subject<VarTree, tree_update>
{
public:
VarTree( intf_thread_t *pIntf );