|
1 | 1 | //+------------------------------------------------------------------+ |
2 | 2 | //| Object.mqh | |
3 | | -//| Copyright 2009-2013, MetaQuotes Software Corp. | |
| 3 | +//| Copyright 2009-2017, MetaQuotes Software Corp. | |
4 | 4 | //| http://www.mql5.com | |
5 | 5 | //+------------------------------------------------------------------+ |
6 | 6 | #include "StdLibErr.mqh" |
|
9 | 9 | //| Purpose: Base class for storing elements. | |
10 | 10 | //+------------------------------------------------------------------+ |
11 | 11 | class CObject |
12 | | -{ |
| 12 | + { |
13 | 13 | private: |
14 | | - CObject *m_prev; // previous item of list |
15 | | - CObject *m_next; // next item of list |
| 14 | + CObject *m_prev; // previous item of list |
| 15 | + CObject *m_next; // next item of list |
16 | 16 |
|
17 | 17 | public: |
18 | | - CObject(void) : m_prev(NULL), m_next(NULL) { } |
19 | | - ~CObject(void) { } |
20 | | - //--- methods to access protected data |
21 | | - CObject *Prev(void) const { return(m_prev); } |
22 | | - void Prev(CObject *node) { m_prev = node; } |
23 | | - CObject *Next(void) const { return(m_next); } |
24 | | - void Next(CObject *node) { m_next = node; } |
25 | | - //--- methods for working with files |
26 | | - virtual bool Save(const int file_handle) { return(true); } |
27 | | - virtual bool Load(const int file_handle) { return(true); } |
28 | | - //--- method of identifying the object |
29 | | - virtual int Type(void) const { return(0); } |
30 | | - //--- method of comparing the objects |
31 | | - virtual int Compare(const CObject *node, const int mode = 0) const { return(0); } |
32 | | -}; |
| 18 | + CObject(void): m_prev(NULL),m_next(NULL) { } |
| 19 | + ~CObject(void) { } |
| 20 | + //--- methods to access protected data |
| 21 | + CObject *Prev(void) const { return(m_prev); } |
| 22 | + void Prev(CObject *node) { m_prev=node; } |
| 23 | + CObject *Next(void) const { return(m_next); } |
| 24 | + void Next(CObject *node) { m_next=node; } |
| 25 | + //--- methods for working with files |
| 26 | + virtual bool Save(const int file_handle) { return(true); } |
| 27 | + virtual bool Load(const int file_handle) { return(true); } |
| 28 | + //--- method of identifying the object |
| 29 | + virtual int Type(void) const { return(0); } |
| 30 | + //--- method of comparing the objects |
| 31 | + virtual int Compare(const CObject *node,const int mode=0) const { return(0); } |
| 32 | + }; |
33 | 33 | //+------------------------------------------------------------------+ |
0 commit comments