Skip to content

Commit

Permalink
UIElement uses HashSet instead of Set as parent
Browse files Browse the repository at this point in the history
  • Loading branch information
dingmaotu committed Jul 28, 2018
1 parent af8e050 commit e5cb0ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions UI/UIElement.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
#property strict

#include "../Lang/String.mqh"
#include "../Collection/Set.mqh"
#include "../Collection/HashSet.mqh"
//+------------------------------------------------------------------+
//| Form a heirarchy for elements |
//+------------------------------------------------------------------+
class UIElement: public Set<UIElement*>
class UIElement: public HashSet<UIElement*>
{
private:
UIElement *m_parent;
string m_name;
public:
UIElement(UIElement *parent,string name)
:m_parent(parent),m_name(m_parent==NULL?name:m_parent.getName()+"."+name){}
:HashSet<UIElement*>(NULL,true),m_parent(parent),m_name(m_parent==NULL?name:m_parent.getName()+"."+name){}

string getName() const {return m_name;}
UIElement *getParent() const {return m_parent;}
Expand Down

0 comments on commit e5cb0ae

Please sign in to comment.