Deprecated behavior, hidden method calling will be disabled in a future MQL compiler version - page 6

 
Vladislav Boyko #:

What exactly do you mean by composition? Could you give an example or link to an example, please?

Composition is a very well known mechanism in OOP. Please do some researches from C++ (or any other OOP language).

A simple example still :

#include <Trade\SymbolInfo.mqh>

class CSymInfo
  {
   CSymbolInfo compositionObject;

public:
   bool              Name(const string name) { return(compositionObject.Name(name));  }
   string            Name(void )             { return(compositionObject.Name());  }
  };

void OnStart()
  {
   CSymInfo symbolInfo;
   symbolInfo.Name(_Symbol);
   string name = symbolInfo.Name();
  }
 
Vladislav Boyko #:

What exactly do you mean by composition? Could you give an example or link to an example, please?

It is also refered to as "is an" or "has an" model.

An object has another object, or is derived from another object.
 
Alain Verleyen #:

Composition is a very well known mechanism in OOP. Please do some researches from C++ (or any other OOP language).

A simple example still :

Dominik Egert #:
It is also refered to as "is an" or "has an" model.

An object has another object, or is derived from another object.

I understand, thank you.