imgtools/imgcheck/inc/hash.h
changeset 620 ad8ffc8e1982
parent 590 360bd6b35136
equal deleted inserted replaced
585:238f4cb8391f 620:ad8ffc8e1982
    19 */
    19 */
    20 
    20 
    21 
    21 
    22 #ifndef HASH_H
    22 #ifndef HASH_H
    23 #define HASH_H
    23 #define HASH_H
    24 
    24  
    25 #pragma warning(disable: 4786) // identifier was truncated to '255' characters in the debug information
       
    26 
    25 
    27 #include<iostream>
    26 #include<iostream>
    28 #include<list>
    27 #include<list>
    29 #include<map>
    28 #include<map>
    30 #include<string>
    29 #include<string>
       
    30 using namespace std;
    31 
    31 
    32 typedef std::list<std::string> StringList;
       
    33 typedef std::map<unsigned int,StringList> Table;
       
    34 typedef std::string String;
       
    35 
    32 
       
    33 typedef multimap<unsigned int,string > Table;
       
    34  
    36 /** 
    35 /** 
    37 class Hash Table
    36 class Hash Table
    38 
    37 
    39 @internalComponent
    38 @internalComponent
    40 @released
    39 @released
    42 class HashTable 
    41 class HashTable 
    43 {
    42 {
    44 public:
    43 public:
    45 	HashTable(int aSize);
    44 	HashTable(int aSize);
    46 	~HashTable(void);
    45 	~HashTable(void);
    47 	int Hash(String aString);
    46 	int Hash(const string& aString);
    48 	bool IsAvailable(String aString);
    47 	bool IsAvailable(const string& aString);
    49 	void Insert(String aString);
    48 	void Insert(const string& aString);
    50 	void InsertStringList(StringList& aList);
    49 	void InsertStringList(const StringList& aList);
    51 	void Delete(String aString);
    50 	void Delete(const string& aString);
    52 
    51 
    53 private:
    52 private:
    54 	int iSize;       /* the size of the table */
    53 	int iSize;       /* the size of the table */
    55 	Table iTable;
    54 	Table iTable;
    56 };
    55 };