epoc32/include/mw/senfacet.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 senfacet.h
     1 /*
       
     2 * Copyright (c) 2002-2005 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: Parser base element class declaration        
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SEN_FACET_H
       
    20 #define SEN_FACET_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <SenBaseElement.h>
       
    24 
       
    25 // CONSTANTS
       
    26 _LIT8(KSenFacet,        "Facet");
       
    27 _LIT8(KFacetAttrName,   "name");
       
    28 _LIT8(KFacetAttrType,   "type");
       
    29 
       
    30 // CLASS DECLARATION
       
    31 class CSenFacet : public CSenBaseElement
       
    32     {
       
    33     public:
       
    34         
       
    35         /**
       
    36         * Basic constructor.
       
    37         */
       
    38         IMPORT_C static CSenFacet* NewL();
       
    39 
       
    40         /**
       
    41         * Basic constructor.
       
    42         * @param    aCopiedSource   source to copy facet data from.
       
    43         */
       
    44         IMPORT_C static CSenFacet* NewL(CSenElement& aCopiedSource);
       
    45 
       
    46         /**
       
    47         * Basic constructor.
       
    48         * @param aNsUri     The namespace URI of the new element
       
    49         * @param aLocalName The local name of the new element
       
    50         * @param aQName     The qualified name of the new element
       
    51         * @param aAttributes    The attributes of the new element
       
    52         * Leave codes:  
       
    53         *       KErrSenInvalidCharacters if aLocalName or aQName contains
       
    54         *       illegal characters.     
       
    55         *       KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
       
    56         */
       
    57         IMPORT_C static CSenFacet* NewL(const TDesC8& aNsUri,
       
    58                                         const TDesC8& aLocalName,
       
    59                                         const TDesC8& aQName,
       
    60                                         const RAttributeArray& aAttributes);
       
    61 
       
    62         IMPORT_C virtual ~CSenFacet();
       
    63 
       
    64         // New functions
       
    65         
       
    66         /**
       
    67         * Setter for name.
       
    68         * @param aName  the name to be set.
       
    69         */
       
    70         IMPORT_C virtual void SetNameL(const TDesC8& aName);
       
    71 
       
    72         /**
       
    73         * Setter for type.
       
    74         * @param aType  the type to be set.
       
    75         */
       
    76         IMPORT_C virtual void SetTypeL(const TDesC8& aType);
       
    77 
       
    78         /**
       
    79         * Setter for value.
       
    80         * @param aValue the value to be set.
       
    81         */
       
    82         IMPORT_C virtual void SetValueL(const TDesC8& aValue);
       
    83 
       
    84         /**
       
    85         * Getter for name.
       
    86         * @return the name of the facet
       
    87         */
       
    88         IMPORT_C virtual TPtrC8 Name();
       
    89 
       
    90         /**
       
    91         * Getter for type.
       
    92         * @return the type of the facet
       
    93         */
       
    94         IMPORT_C virtual TPtrC8 Type();
       
    95     
       
    96         /**
       
    97         * Getter for value.
       
    98         * @return the value of the facet
       
    99         */
       
   100         IMPORT_C virtual TPtrC8 Value();
       
   101 
       
   102     protected:
       
   103         
       
   104         /**
       
   105         * C++ default constructor.
       
   106         */
       
   107         IMPORT_C CSenFacet();
       
   108         
       
   109         /**
       
   110         * By default Symbian 2nd phase constructors are private.
       
   111         */
       
   112         IMPORT_C void ConstructL(const TDesC8& aLocalName);
       
   113         IMPORT_C void ConstructL(CSenElement& aCopiedSource);
       
   114         IMPORT_C void ConstructL(const TDesC8& aNsUri,
       
   115                                  const TDesC8& aLocalName,
       
   116                                  const TDesC8& aQName,
       
   117                                  const RAttributeArray& aAttributes);
       
   118     };
       
   119 
       
   120 #endif // SEN_FACET_H
       
   121 
       
   122 // End of File