imgtools/imgcheck/inc/hash.h
changeset 0 044383f39525
child 590 360bd6b35136
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * class Hash Table declaration
       
    16 * @internalComponent
       
    17 * @released
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef HASH_H
       
    23 #define HASH_H
       
    24 
       
    25 #pragma warning(disable: 4786) // identifier was truncated to '255' characters in the debug information
       
    26 
       
    27 #include<iostream>
       
    28 #include<list>
       
    29 #include<map>
       
    30 #include<string>
       
    31 
       
    32 typedef std::list<std::string> StringList;
       
    33 typedef std::map<unsigned int,StringList> Table;
       
    34 typedef std::string String;
       
    35 
       
    36 /** 
       
    37 class Hash Table
       
    38 
       
    39 @internalComponent
       
    40 @released
       
    41 */
       
    42 class HashTable 
       
    43 {
       
    44 public:
       
    45 	HashTable(int aSize);
       
    46 	~HashTable(void);
       
    47 	int Hash(String aString);
       
    48 	bool IsAvailable(String aString);
       
    49 	void Insert(String aString);
       
    50 	void InsertStringList(StringList& aList);
       
    51 	void Delete(String aString);
       
    52 
       
    53 private:
       
    54 	int iSize;       /* the size of the table */
       
    55 	Table iTable;
       
    56 };
       
    57 #endif //HASH_H