//+------------------------------------------------------------------+ //| Def.mqh | //| Copyright 2026, Niquel Mendoza. | //| https://www.mql5.com/ | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, Niquel Mendoza." #property link "https://www.mql5.com/" #property strict #ifndef SIMPHASH_SRC_DEF_MQH #define SIMPHASH_SRC_DEF_MQH //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #include #include #include #include "EnumReg\\Main.mqh" #include //+------------------------------------------------------------------+ //| Clase intemedia para hasing | //+------------------------------------------------------------------+ interface CPerfectHashHasherWSeed { ulong Hash(ulong v, const ulong seed); }; //+------------------------------------------------------------------+ //| Hash 0 | //+------------------------------------------------------------------+ class CHashGeneratorBasis { public: ~CHashGeneratorBasis() {} CHashGeneratorBasis() {} static ulong Hash(const ulong v) { return v; // Tal cual } }; //+------------------------------------------------------------------+ //| Hash 1 | //+------------------------------------------------------------------+ class CSimPHashHaserUl1 { public: CSimPHashHaserUl1(void) {} ~CSimPHashHaserUl1(void) {} //--- static CPerfectHashHasherWSeed* m_hasher; static __forceinline ulong Hash(const ulong v, const ulong seed) { return m_hasher.Hash(v, seed); } }; CPerfectHashHasherWSeed* CSimPHashHaserUl1::m_hasher = NULL; //+------------------------------------------------------------------+ #endif // SIMPHASH_SRC_DEF_MQH