1 // Copyright (c) 2005-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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
23 #if (!defined TRBUF_H)
32 class TRBuf8 : public RBuf8
34 class to provide a RBuf8 destructor
38 static TRBuf8* New(TInt aMaxLength)
40 TRBuf8* self = new TRBuf8;
43 if (self->Create(aMaxLength)!=KErrNone)
52 static TRBuf8* NewL(TInt aMaxLength)
54 TRBuf8* self = new (ELeave) TRBuf8;
55 CleanupStack::PushL(self);
56 self->CreateL(aMaxLength);
57 CleanupStack::Pop(self);
67 class TRBuf16 : public RBuf16
69 class to provide a RBuf16 destructor
73 static TRBuf16* New(TInt aMaxLength)
75 TRBuf16* self = new TRBuf16;
78 if (self->Create(aMaxLength)!=KErrNone)
87 static TRBuf16* NewL(TInt aMaxLength)
89 TRBuf16* self = new (ELeave) TRBuf16;
90 CleanupStack::PushL(self);
91 self->CreateL(aMaxLength);
92 CleanupStack::Pop(self);
102 #if defined(_UNICODE)
103 typedef TRBuf16 TRBuf;
105 typedef TRBuf8 TRBuf;
108 } //namespace Elements