You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Gentlemen, why don't we try to have a substantive discussion? :)
A correct sheet should not require explicit implementation of a new class to use it for an arbitrary class.
Therefore, the correct implementation should rely on templates.
To be fair, I'm not sure this is realisable at the template level presented.
But that's actually a far cry from the problems in the article.
A correct list should not require explicit implementation of a new class to use it for an arbitrary class...
Conditionally, CList should include different types of nodes....
Why? ) A container is a set of homogeneous objects.
The difference of the objects themselves can be realised by polymorphism within already objects and has nothing to do with the list.
Why? ) A container is a set of homogeneous objects.
The difference of the objects themselves can be realised by polymorphism within already objects and has nothing to do with the list.
A correct sheet should not require explicit implementation of a new class in order to use it for an arbitrary class.
Therefore, correct implementation should rely on templates.
To be fair, I'm not sure this is realisable at the template level presented.
But that's actually a far cry from the problems in the article.
What TheXpert proposes seems to be clear.
If I understand his idea correctly, all methods of some abstract list should automatically recognise "its" node (this is polymorphism).
In the article, for example, there are user classes CiSingleList (Fig.9), CDoubleList (Fig.11), CiUnrollDoubleList (Fig.12), CiCircleDoubleList (Fig.13).
So, in principle, all of them can be stuffed into one class. But we will have to code each method so that it recognises the type of node it deals with at a particular moment. And this will also require a resource... so not everything is so clear-cut....
It is clear that a particular list includes homogeneous nodes. What I meant was that the relationships between the nodes in that list can be different, which requires a different list type for each type of node. If you could create the same list class for nodes of different types, that would be great.... I personally haven't tried it myself yet..... Need to think about the higher level of abstraction.....
What TheXpert proposes seems to be clear.
If I understand his idea correctly, all methods of some abstract list should automatically recognise "its" node (this is polymorphism).
In the article, for example, there are user classes CiSingleList (Fig.9), CDoubleList (Fig.11), CiUnrollDoubleList (Fig.12), CiCircleDoubleList (Fig.13).
So, in principle, all of them can be stuffed into one class. But we will have to code each method so that it recognises the type of node it deals with at a particular moment. And this will also require a resource... so not everything is so clear-cut...
What's there to code?
First grade, second quarter. Unfortunately, you can't do without a Community intermediary, because MQL5 has extremely weak type control. But if we had a ClassToString function like EnumToString() at our disposal, everything could be organised much more elegantly and easily.