equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef MSCUTILS_H |
|
22 #define MSCUTILS_H |
|
23 |
|
24 /** |
|
25 Inserts and extracts integers in big-endian format. |
|
26 */ |
|
27 class BigEndian |
|
28 { |
|
29 public: |
|
30 static TUint32 Get32(const TUint8* aPtr); |
|
31 static TUint16 Get16(const TUint8* aPtr); |
|
32 static void Put32(TUint8* aPtr, TUint32 aVal); |
|
33 static void Put16(TUint8* aPtr, TUint16 aVal); |
|
34 }; |
|
35 |
|
36 /** |
|
37 Inserts and extracts integers in little-endian format. |
|
38 */ |
|
39 class LittleEndian |
|
40 { |
|
41 public: |
|
42 static TUint32 Get32(const TUint8* aPtr); |
|
43 static TUint16 Get16(const TUint8* aPtr); |
|
44 static void Put32(TUint8* aPtr, TUint32 aVal); |
|
45 static void Put16(TUint8* aPtr, TUint16 aVal); |
|
46 }; |
|
47 |
|
48 #include "mscutils.inl" |
|
49 |
|
50 #endif // MSCUTILS_H |
|
51 |