Commit 31c1e82e authored by Olivier Teulière's avatar Olivier Teulière

* modules/gui/skins2/*: Use ARG instead of ARG* as a template argument

parent ff65ea95
...@@ -140,7 +140,7 @@ int CtrlTree::maxItems() ...@@ -140,7 +140,7 @@ int CtrlTree::maxItems()
} }
void CtrlTree::onUpdate( Subject<VarTree, tree_update*> &rTree, void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
tree_update *arg ) tree_update *arg )
{ {
if( arg->i_type == 0 ) // Item update if( arg->i_type == 0 ) // Item update
......
...@@ -33,7 +33,7 @@ class GenericFont; ...@@ -33,7 +33,7 @@ class GenericFont;
class GenericBitmap; class GenericBitmap;
/// Class for control tree /// 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 Observer<VarPercent>
{ {
public: public:
...@@ -119,7 +119,7 @@ class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update*>, ...@@ -119,7 +119,7 @@ class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update*>,
bool m_flat; bool m_flat;
/// Method called when the tree variable is modified /// 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 *); tree_update *);
// Method called when the position variable of the tree is modified // Method called when the position variable of the tree is modified
......
...@@ -32,7 +32,7 @@ template <class S, class ARG> class Observer; ...@@ -32,7 +32,7 @@ template <class S, class ARG> class Observer;
/// Template for subjects in the Observer design pattern /// 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: public:
virtual ~Subject() {} virtual ~Subject() {}
...@@ -58,7 +58,7 @@ template <class S, class ARG = void*> class Subject ...@@ -58,7 +58,7 @@ template <class S, class ARG = void*> class Subject
} }
/// Notify the observers when the status has changed /// 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" // This stupid gcc 3.2 needs "typename"
typename set<Observer<S, ARG>*>::const_iterator iter; typename set<Observer<S, ARG>*>::const_iterator iter;
...@@ -87,13 +87,13 @@ template <class S, class ARG = void*> class Subject ...@@ -87,13 +87,13 @@ template <class S, class ARG = void*> class Subject
/// Template for observers in the Observer design pattern /// 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: public:
virtual ~Observer() {} virtual ~Observer() {}
/// Method called when the subject is modified /// 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: protected:
Observer() {} Observer() {}
......
...@@ -42,7 +42,7 @@ typedef struct tree_update ...@@ -42,7 +42,7 @@ typedef struct tree_update
} tree_update; } tree_update;
/// Tree variable /// Tree variable
class VarTree: public Variable, public Subject<VarTree, tree_update*> class VarTree: public Variable, public Subject<VarTree, tree_update>
{ {
public: public:
VarTree( intf_thread_t *pIntf ); VarTree( intf_thread_t *pIntf );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment