Download MetaTrader 5

Information about the Object Class from Standard Library

To add comments, please log in or register
How to use MQL5.community messages editor? Find out in the article!
Ubzen
5394
Ubzen 2014.01.07 00:10 

I'm trying to understand the Standard Library by working my way from top->down. I cannot make sense of what the following syntax is trying to accomplish. Its found within the Include\Object.mqh. It appears like its the highest Object from which all other objects have inheritance. Perhaps its a Link_List ... lol ... ok I dunno. Please help explain. 

CObject(void): m_prev(NULL),m_next(NULL)    {                   }

Whats the meaning of the [ : ]

Is the middle part the function Parameters?

What is the Prev and Next used for?

Alain Verleyen
Moderator
30707
Alain Verleyen 2014.01.07 11:05  
Ubzen:

I'm trying to understand the Standard Library by working my way from top->down. I cannot make sense of what the following syntax is trying to accomplish. Its found within the Include\Object.mqh. It appears like its the highest Object from which all other objects have inheritance. Perhaps its a Link_List ... lol ... ok I dunno. Please help explain. 

Whats the meaning of the [ : ]

Is the middle part the function Parameters?

What is the Prev and Next used for?

This is the constructor of the class CObject :

There is a special syntax to initialize an object using a constructor. Constructor initializers (special constructions for initialization) for the members of a struct or class can be specified in the initialization list.

See documentation...

Documentation on MQL5: Language Basics / Data Types / Structures and Classes
Documentation on MQL5: Language Basics / Data Types / Structures and Classes
  • www.mql5.com
Language Basics / Data Types / Structures and Classes - Documentation on MQL5
Ubzen
5394
Ubzen 2014.01.07 13:23  
angevoyageur: This is the constructor of the class CObject : See documentation...
Thank you. I understand what a constructor is but that one looks like theres 3 different functions. The examples from the Docs helps allot.
Alain Verleyen
Moderator
30707
Alain Verleyen 2014.01.07 16:05  
Ubzen:
Thank you. I understand what a constructor is but that one looks like theres 3 different functions. The examples from the Docs helps allot.
Don't worry, first I encountered this syntax I was a little surprised too.
To add comments, please log in or register