|
1 /* |
|
2 * Copyright (c) 2010 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: CBase derived container classes for easening |
|
15 * dynamic memory allocation of TBuf<n> type variables |
|
16 * (TName etc.) |
|
17 */ |
|
18 #ifndef BUFFERCONTAINERS_H |
|
19 #define BUFFERCONTAINERS_H |
|
20 |
|
21 #include <e32std.h> |
|
22 namespace DRM |
|
23 { |
|
24 template <typename T> |
|
25 NONSHARABLE_CLASS( CBufferContainer ): public CBase |
|
26 { |
|
27 // Note, this class is not intendend to be part of any API |
|
28 public: |
|
29 inline static CBufferContainer<T>* NewL(); |
|
30 inline static CBufferContainer<T>* NewLC(); |
|
31 |
|
32 inline virtual ~CBufferContainer(); |
|
33 private: |
|
34 inline CBufferContainer(); |
|
35 |
|
36 //data |
|
37 public: |
|
38 // Contained TBuf member |
|
39 T iBuffer; |
|
40 }; |
|
41 |
|
42 //Containers for some TBuf based types defined at e32cmn.h |
|
43 typedef CBufferContainer<TName> CNameContainer; |
|
44 typedef CBufferContainer<TFullName> CFullNameContainer; |
|
45 typedef CBufferContainer<TExitCategoryName> CExitCategoryNameContainer; |
|
46 typedef CBufferContainer<TFileName> CFileNameContainer; |
|
47 typedef CBufferContainer<TPath> CPathContainer; |
|
48 typedef CBufferContainer<TVersionName> CVersionNameContainer; |
|
49 typedef CBufferContainer<TUidName> CUidNameContainer; |
|
50 } |
|
51 |
|
52 #include "buffercontainers.inl" |
|
53 #endif // BUFFERCONTAINERS_H |