2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * 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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
27 #if (!defined METACONTAINER_H)
28 #define METACONTAINER_H
32 #include <comms-infras/metadata.h>
38 class RMetaDataContainerBase : public RPointerArray<SMetaData>
41 Container of meta objects.
43 Derived containers need to implement static LoadL.
46 @released since v9.0 */
49 IMPORT_C explicit RMetaDataContainerBase();
51 IMPORT_C void Copy(const RMetaDataContainerBase& aMetaContainer);
52 IMPORT_C TInt Store(TDes8& aDes) const;
54 IMPORT_C TInt Load(TPtrC8& aDes);
55 IMPORT_C TInt Length() const;
57 IMPORT_C STypeId GetTypeId() const;
60 virtual SMetaData* LoadElementL(TPtrC8& aDes) = 0;
63 template<class ELEMENT>
64 class RMetaDataContainer : public RMetaDataContainerBase
67 Templated container of meta objects that implements static LoadL.
68 Meta object type (template parameter) needs to implement its own static LoadL.
71 @released since v9.0 */
74 static RMetaDataContainer<ELEMENT>* LoadL(TPtrC8& aDes);
76 explicit inline RMetaDataContainer();
79 virtual SMetaData* LoadElementL(TPtrC8& aDes);
82 typedef RMetaDataContainer<SMetaDataECom> RMetaDataEComContainer;
86 #include <comms-infras/metacontainer.inl>
88 #endif //METACONTAINER_H