HashMap implementation

0
(0)
اسم:
HashMap implementation
مؤلف: Andrew Lord (2014.02.11 16:34)
تم التنزيل: 6
تحميل:
HashMap implementation 1
hash.mqh (14.5 كيلو بايت) منظر

وصف:

This is a HashMap implementation. This allows something like arrays but with string indexes. It maps strings to Objects. The Objects must be a subclass of the HashValue class provided.

The Hash by default will 'adopt' the value objects. In which case it will free the memory when they are no longer in the hash. This can be disabled in the constructor.

Here is an example:

 

    
    Hash *h = new Hash();

    // Store values
    h.hPutInt("قليل",0);
    h.hPutInt("عالي",1);

    // Get values
    int high = h.gGetInt("عالي");

    // Loop
    HashLoop *l ;
    ل( l = new HashLoop(ح) ; l.hasNext() ; l.next()) {

        string key = l.key();

        int j = l.valInt();

        Print(key," = ",j);

    }
    delete l;

    delete h;

التوصيات:

  • Accompany the submitted code with a meaning-bearing name and a brief description.
  • Attach a brief explanation to the code for users to make head or tail of it.
  • Insert illustrating images where applicable.

كم كانت هذه المشاركة مفيدة?

انقر على نجمة لتقييمه!

متوسط ​​تقييم 0 / 5. عدد الأصوات: 0

لا توجد أصوات حتى الآن! كن أول من يقيم هذا المنصب.

نأسف لأن هذه المشاركة لم تكن مفيدة لك!

دعونا تحسين هذا المنصب!

أخبرنا كيف يمكننا تحسين هذه المشاركة?



مؤلف: فريق ويكي الفوركس
نحن فريق من متداولي الفوركس ذوي الخبرة العالية [2000-2023] الذين يكرسون أنفسهم لعيش الحياة بشروطنا الخاصة. هدفنا الأساسي هو تحقيق الاستقلال المالي والحرية, وتابعنا التعليم الذاتي واكتسبنا خبرة واسعة في سوق الفوركس كوسيلة لتحقيق أسلوب حياة مستدام ذاتيًا.