imagingmodules/jp2kcodec/Inc/JP2KImageUtils.h
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:  Basic utilities to handle conversion and object safe deletion.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef  __JP2KIMAGEUTILS_H__
       
    20 #define __JP2KIMAGEUTILS_H__
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // TEMPLATE DECLARATION
       
    37 
       
    38 /**
       
    39 *  Basic reading utility class.
       
    40 *  Utility class with methods for standard 
       
    41 *  reading stuff from a TUint8* string. 
       
    42 *
       
    43  * JP2KCodec.dll
       
    44  * @since 2.6
       
    45 */
       
    46 class PtrReadUtil
       
    47     {
       
    48     public:  // Constructors and destructor
       
    49         
       
    50     public: // New functions
       
    51         
       
    52         /**
       
    53         * Reads big endian value from given buffer.
       
    54         * @since 2.6
       
    55         * @param aPtr: Pointer to buffer
       
    56         * @TUint16: Read value.
       
    57         */
       
    58         static TUint16 ReadBigEndianUint16( const TUint8* aPtr );
       
    59 
       
    60         /**
       
    61         * Reads big endian value from given buffer.
       
    62         * @since 2.6
       
    63         * @param aPtr: Pointer to buffer
       
    64         * @TUint32: Read value.
       
    65         */
       
    66         static TUint32 ReadBigEndianUint32( const TUint8* aPtr );
       
    67 
       
    68         /**
       
    69         * Reads big endian value from given buffer and increments pointer.
       
    70         * @since 2.6
       
    71         * @param aPtr: Pointer to buffer
       
    72         * @TUint16: Read value.
       
    73         */
       
    74         static TUint16 ReadBigEndianUint16Inc( const TUint8*& aPtr );
       
    75 
       
    76         /**
       
    77         * Reads big endian value from given buffer and increments pointer.
       
    78         * @since 2.6
       
    79         * @param aPtr: Pointer to buffer
       
    80         * @TUint32: Read value.
       
    81         */
       
    82         static TUint32 ReadBigEndianUint32Inc( const TUint8*& aPtr );
       
    83 
       
    84     public: // Functions from base classes
       
    85         
       
    86     protected:  // New functions
       
    87 
       
    88     protected:  // Functions from base classes
       
    89         
       
    90     private:
       
    91 
       
    92     public:     // Data
       
    93     
       
    94     protected:  // Data
       
    95 
       
    96     private:    // Data
       
    97 
       
    98     public:     // Friend classes
       
    99 
       
   100     protected:  // Friend classes
       
   101     
       
   102     private:    // Friend classes
       
   103     
       
   104     };
       
   105 
       
   106 #include "JP2KImageUtils.inl"
       
   107 
       
   108 #endif  // __JP2KIMAGEUTILS_H__
       
   109 
       
   110 
       
   111