2026-09-03 21:50:05 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| PoolDef.mqh |
|
| | | //| Copyright 2026, Niquel Mendoza |
|
| | | //| https://www.mql5.com |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2026, Niquel Mendoza"
|
| | | #property link "https://www.mql5.com"
|
| | | #property strict
|
| | |
|
| | | #ifndef MQLARTICLES_INDICATORSCTS_POOLDEF_MQH
|
| | | #define MQLARTICLES_INDICATORSCTS_POOLDEF_MQH
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Include |
|
| | | //+------------------------------------------------------------------+
|
| | | #include "Main.mqh"
|
| | | #include "..\\Utils\\Bits\\Hash.mqh"
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | namespace TSN
|
| | | {
|
| | | //+------------------------------------------------------------------+
|
| | | //| Struct base |
|
| | | //+------------------------------------------------------------------+
|
| | | struct IndicatorCacheExtraData : public CBitBuffer
|
| | | {
|
| | | public:
|
| | | IndicatorCacheExtraData(int reserve) : CBitBuffer(reserve), ref_count(0) {}
|
| | | IndicatorCacheExtraData(const string& e, int rc) : ref_count(rc) {}
|
| | | IndicatorCacheExtraData() : ref_count(0) {}
|
| | |
|
| | | //--- numero de referncias
|
| | | int ref_count;
|
| | |
|
| | | //--- ocutamos el del padre
|
| | | void RobarDe(IndicatorCacheExtraData& v)
|
| | | {
|
2026-09-04 08:09:17 -05:00 | | | CBitBuffer::RobarDe(v); // al del base
|
2026-09-03 21:50:05 -05:00 | | | ref_count = v.ref_count;
|
| | | }
|
| | |
|
2026-09-04 08:09:17 -05:00 | | | //--- copia a
|
| | | void CopyTo(CBitBuffer& v)
|
2026-09-03 21:50:05 -05:00 | | | {
|
2026-09-04 08:09:17 -05:00 | | | v = this;
|
2026-09-03 21:50:05 -05:00 | | | }
|
| | | };
|
| | | }
|
| | |
|
| | |
|
| | | #endif // MQLARTICLES_INDICATORSCTS_POOLDEF_MQH
|
| | | //+------------------------------------------------------------------+
|