//+------------------------------------------------------------------+ //| RegService.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_UTILS_REGSERVISE_MQH #define MQLARTICLES_UTILS_REGSERVISE_MQH //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #include #include //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ namespace TSN { //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ template class CRegService { public: CRegService(void) {} ~CRegService(void) {} //--- static CHashMapFastP(ulong, TObject*, _fibbo) s_values; static TObject* s_current_value; //--- static bool SelectCurrentInstance(const ulong id) { const int idx = s_values.Find(id); if(idx < 0) return false; s_current_value = s_values.m_table[idx].value; return true; } }; //--- template CHashMapFastP(ulong, TObject*, _fibbo) CRegService::s_values; template TObject* CRegService::s_current_value = NULL; } //+------------------------------------------------------------------+ #endif // MQLARTICLES_UTILS_REGSERVISE_MQH //+------------------------------------------------------------------+