epoc32/include/comms-infras/metacontainer.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /**
     2 * Copyright (c) 2004-2009 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 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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 /**
    23  @file MetaContainer.h
    24  @internalTechnology
    25 */
    26 
    27 #if (!defined METACONTAINER_H)
    28 #define METACONTAINER_H
    29 
    30 #include <e32base.h>
    31 #include <e32std.h>
    32 #include <comms-infras/metadata.h>
    33 
    34 
    35 namespace Meta
    36 {
    37 
    38 class RMetaDataContainerBase : public RPointerArray<SMetaData>
    39 /**
    40 
    41 Container of meta objects.
    42 Base class.
    43 Derived containers need to implement static LoadL.
    44 
    45 @internalComponent
    46 @released since v9.0 */
    47     {
    48 public:
    49 	IMPORT_C explicit RMetaDataContainerBase();
    50 
    51     IMPORT_C void Copy(const RMetaDataContainerBase& aMetaContainer);
    52     IMPORT_C TInt Store(TDes8& aDes) const;
    53 
    54     IMPORT_C TInt Load(TPtrC8& aDes);
    55 	IMPORT_C TInt Length() const;
    56 
    57 	IMPORT_C STypeId GetTypeId() const;
    58 
    59 protected:
    60 	virtual SMetaData* LoadElementL(TPtrC8& aDes) = 0;
    61     };
    62 
    63 template<class ELEMENT>
    64 class RMetaDataContainer : public RMetaDataContainerBase
    65 /**
    66 
    67 Templated container of meta objects that implements static LoadL.
    68 Meta object type (template parameter) needs to implement its own static LoadL.
    69 
    70 @internalComponent
    71 @released since v9.0 */
    72 	{
    73 public:
    74 	static RMetaDataContainer<ELEMENT>* LoadL(TPtrC8& aDes);
    75 
    76 	explicit inline RMetaDataContainer();
    77 
    78 protected:
    79 	virtual SMetaData* LoadElementL(TPtrC8& aDes);
    80 	};
    81 
    82 typedef RMetaDataContainer<SMetaDataECom> RMetaDataEComContainer;
    83 
    84 } //namespace Meta
    85 
    86 #include <comms-infras/metacontainer.inl>
    87 
    88 #endif //METACONTAINER_H