svgtopt/nvgdecoder/src/OpenVGHandleStore.cpp
changeset 46 88edb906c587
equal deleted inserted replaced
-1:000000000000 46:88edb906c587
       
     1 /*
       
     2 * Copyright (c) 2008 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:  NVG Decoder source file
       
    15  *
       
    16 */
       
    17 
       
    18 #include "OpenVGHandleStore.h"
       
    19 
       
    20 COpenVGHandleStore::COpenVGHandleStore()
       
    21     {
       
    22     }
       
    23 
       
    24 COpenVGHandleStore::~COpenVGHandleStore()
       
    25     {
       
    26     TInt handleListCount    = iHandles.Count();
       
    27     for (TInt i = 0; i < handleListCount; i++)
       
    28         {
       
    29         if (iHandles[i].iVGHandle)
       
    30             {
       
    31             switch (iHandles[i].iHandleType)
       
    32                 {
       
    33                 case TLVVGHandlePair::EVGPath:
       
    34                     vgDestroyPath(iHandles[i].iVGHandle);
       
    35                     break;
       
    36                 case TLVVGHandlePair::EVGPaint:
       
    37                     vgDestroyPaint(iHandles[i].iVGHandle);
       
    38                     break;
       
    39                 case TLVVGHandlePair::EVGImage:
       
    40                     vgDestroyImage(iHandles[i].iVGHandle);
       
    41                     break;
       
    42                 }
       
    43             }
       
    44         }
       
    45     iHandles.Close();
       
    46     }
       
    47 
       
    48 COpenVGHandleStore * COpenVGHandleStore::NewL()
       
    49     {
       
    50     COpenVGHandleStore* self    = COpenVGHandleStore::NewLC();
       
    51     CleanupStack::Pop(self);
       
    52     return self;
       
    53     }
       
    54 
       
    55 COpenVGHandleStore * COpenVGHandleStore::NewLC()
       
    56     {
       
    57     COpenVGHandleStore* self    = new (ELeave) COpenVGHandleStore;
       
    58     CleanupStack::PushL(self);
       
    59     self->ConstructL();
       
    60     return self;
       
    61     }
       
    62 
       
    63 void COpenVGHandleStore::ConstructL()
       
    64     {
       
    65     
       
    66     }