imagingmodules/jp2kcodec/Src/JP2KFormat.cpp
changeset 0 469c91dae73b
equal deleted inserted replaced
-1:000000000000 0:469c91dae73b
       
     1 /*
       
     2 * Copyright (c) 2003, 2004 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:  Collection of structs used to store and represent
       
    15 *                the metadata in the JP2 file format.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "JP2KFormat.h"
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 
       
    25 // EXTERNAL FUNCTION PROTOTYPES  
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // LOCAL CONSTANTS AND MACROS
       
    32 
       
    33 // MODULE DATA STRUCTURES
       
    34 
       
    35 // LOCAL FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // ============================ MEMBER FUNCTIONS ===============================
       
    40 
       
    41 // Destructor
       
    42 TPalette::~TPalette()
       
    43     {
       
    44     iBList.Close();
       
    45     TInt entries = iC2DArray.Count();
       
    46     for (TInt index = 0; index < entries; ++index)
       
    47         {
       
    48         iC2DArray[index]->Close();
       
    49         }
       
    50     iC2DArray.ResetAndDestroy();
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // TComponentMap::TComponentMap
       
    55 // C++ default constructor can NOT contain any code, that
       
    56 // might leave.
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 TComponentMap::TComponentMap( TUint16 aCmp, TUint8 aMtyp, TUint8 aPcol ) : 
       
    60     iCmp( aCmp ), 
       
    61     iMtyp( aMtyp ), 
       
    62     iPcol( aPcol )
       
    63     {
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // TChannelDefinition::TChannelDefinition
       
    68 // C++ default constructor can NOT contain any code, that
       
    69 // might leave.
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 TChannelDefinition::TChannelDefinition( TUint16 aCn, TUint16 aTyp, TUint16 aAsoc ): 
       
    73     iCn( aCn ), 
       
    74     iTyp( aTyp ), 
       
    75     iAsoc( aAsoc )
       
    76     {
       
    77     }
       
    78 
       
    79 // -----------------------------------------------------------------------------
       
    80 // TJ2kInfo::TJ2kInfo
       
    81 // C++ default constructor can NOT contain any code, that
       
    82 // might leave.
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 TJ2kInfo::TJ2kInfo() : 
       
    86     iImageSize( 1, 1 ),
       
    87     iNC( 1 ),
       
    88     iBPC( 8 ),
       
    89     iOption( 0 ),
       
    90     iCSBoxLength( 0 ),
       
    91     iEnumCS( 0 ),
       
    92     iCSOffset( 0 ),
       
    93     iImageSizeInTwips( 0, 0 ),
       
    94     iBPCList( 1 ),
       
    95     iICCProfile( 0 ),
       
    96     iCMPList( 1 ),
       
    97     iCNList( 1 ),
       
    98     iPalette(),
       
    99     iIPRList( 1 ),
       
   100     iXMLList( 1 ),
       
   101     iUUIDList( 1 ),
       
   102     iUUIDInfoListList( 1 ),
       
   103     iUUIDInfoUrlList( 1 )
       
   104     {
       
   105     }
       
   106 
       
   107 // Destructor
       
   108 TJ2kInfo::~TJ2kInfo()
       
   109     {
       
   110     iBPCList.Close();
       
   111     
       
   112     delete iICCProfile;
       
   113     iICCProfile = 0;
       
   114 
       
   115     iCMPList.Close();
       
   116     iCNList.Close();
       
   117 
       
   118     iIPRList.ResetAndDestroy();
       
   119     iXMLList.ResetAndDestroy();
       
   120     iUUIDList.ResetAndDestroy();
       
   121     iUUIDInfoListList.ResetAndDestroy();
       
   122     iUUIDInfoUrlList.ResetAndDestroy();
       
   123     }