testexecmgmt/ucc/Source/IntegerAllocatorLibrary/CIntegerAllocator.h
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 /*
       
     2 * Copyright (c) 2005-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 "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 * CIntegerAllocator
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CINTEGERALLOCATOR_H__
       
    22 #define __CINTEGERALLOCATOR_H__
       
    23 
       
    24 
       
    25 /*******************************************************************************
       
    26  *
       
    27  * System Includes
       
    28  *
       
    29  ******************************************************************************/
       
    30 #include <vector>
       
    31 using namespace std;
       
    32 
       
    33 
       
    34 /*******************************************************************************
       
    35  *
       
    36  * CIntegerAllocator
       
    37  *
       
    38  ******************************************************************************/
       
    39 class CIntegerAllocator
       
    40 {
       
    41 public:
       
    42 	int AddToIntegerPool( int aStart, int aEnd );
       
    43 	int AllocateInteger();
       
    44 	int FreeInteger( int aFreeInteger );
       
    45 
       
    46 private:
       
    47 	int DoesIntegerAlreadyAppear( int aInteger );
       
    48 
       
    49 	vector<int> iList;
       
    50 	int iListSize;
       
    51 };
       
    52 
       
    53 
       
    54 #endif //__CINTEGERALLOCATOR_H__