xml/xmlparser/inc/CXMLAttributes.h
changeset 24 74f0b3eb154c
child 25 417699dc19c9
equal deleted inserted replaced
17:ed3155dbd163 24:74f0b3eb154c
       
     1 /*
       
     2 * Copyright (c) 2002 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 "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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CXMLATTRIBUTES_H
       
    21 #define __CXMLATTRIBUTES_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 //#include <eikenv.h>  
       
    26 #include <badesca.h>  
       
    27 #include <xml/MXMLAttributes.h>
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Implementation of MXMLAttributes interface.
       
    34 *  @lib XMLInterface.dll
       
    35 *  @since ?Series60_version
       
    36 */
       
    37 class CXMLAttributes : public CBase, public MXMLAttributes 
       
    38 {
       
    39 public:  // Constructors and destructor
       
    40         
       
    41  /**
       
    42  * Two-phased constructor.
       
    43  */
       
    44 	static CXMLAttributes* NewL();
       
    45 
       
    46 	static CXMLAttributes* NewLC();
       
    47         
       
    48 /**
       
    49 * Destructor.
       
    50 */
       
    51 	virtual ~CXMLAttributes();
       
    52 
       
    53 public: // Implementation of MXMLAttributes Functions 
       
    54         
       
    55 /**
       
    56 * Implementation of MXMLAttributes::GetIndexL(TDesC& aName)
       
    57 */
       
    58 	TInt GetIndex(TDesC& aName);
       
    59 
       
    60 /**
       
    61 * Implementation of MXMLAttributes::GetLenght()
       
    62 */
       
    63 	TInt GetLength();
       
    64 	
       
    65 /**
       
    66 * Implementation of MXMLAttributes::GetNameL(TInt aIndex).
       
    67 */
       
    68 	TPtrC GetName(TInt  aIndex);
       
    69 
       
    70 /**
       
    71 * Implementation of MXMLAttributes::GetValueL(TDesC& aName, TDesC& aValue).
       
    72 */
       
    73 	TPtrC GetValue(TDesC& aName);
       
    74 
       
    75 /**
       
    76 * Implementation of MXMLAttributes::GetValueL(TInt& aIndex, TDesC& aValue).
       
    77 */
       
    78 	TPtrC GetValue(TInt& aIndex);
       
    79 
       
    80 /**
       
    81 * Implementation of MXMLAttributes::GetTypeL(Tint aIndex, TDesC& aType).
       
    82 */
       
    83 // R&D: Feature: GetType missing from Attributes
       
    84 	TPtrC GetType(TInt aIndex);
       
    85 
       
    86 /**
       
    87 * Implementation of MXMLAttributes::GetTypeL(TDesC& aName, TDesC& aType).
       
    88 */
       
    89 // R&D: Feature: GetType missing from Attributes
       
    90 	TPtrC GetType(TDesC& aName);
       
    91 
       
    92 public: // New Functions		
       
    93 		
       
    94 /**
       
    95 * Appends new attribute to attrinbuteslist.
       
    96 * @since ?Series60_version
       
    97 * @param aName: Attribute name.
       
    98 * @param aValue: Attribute value.
       
    99 * @return none.
       
   100 */
       
   101 	void AppendL(const TDesC& aName, const TDesC& aValue);
       
   102 
       
   103 /**
       
   104 * Resets the attribute list.
       
   105 * @since ?Series60_version
       
   106 * @param aName: Attribute name.
       
   107 * @param aValue: Attribute value.
       
   108 * @return none.
       
   109 */
       
   110 	void Reset();
       
   111 
       
   112 protected:
       
   113 /**
       
   114  * C++ default constructor.
       
   115  */
       
   116 	CXMLAttributes();
       
   117 
       
   118 private:
       
   119 
       
   120 	void ConstructL();
       
   121 
       
   122 private:    // Data
       
   123 		
       
   124 	// Store Attribute Names
       
   125 	CDesCArraySeg* iDescAttName;
       
   126 	// Store Attribute Values
       
   127 	CDesCArraySeg* iDescAttValue;
       
   128 };
       
   129 
       
   130 #endif     // __CXMLATTRIBUTES_H  
       
   131             
       
   132 // End of File