epoc32/include/xml/dom/xmlengxformsinstancemap.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
// XForms instance map declaration
williamr@4
    15
//
williamr@4
    16
williamr@4
    17
williamr@4
    18
williamr@4
    19
/**
williamr@4
    20
 @file
williamr@4
    21
 @publishedAll
williamr@4
    22
 @released
williamr@4
    23
*/
williamr@4
    24
#ifndef XMLENGCXFORMSINSTANCEMAP_H
williamr@4
    25
#define XMLENGCXFORMSINSTANCEMAP_H
williamr@4
    26
williamr@4
    27
#include <e32base.h>
williamr@4
    28
williamr@4
    29
class RXmlEngDocument;
williamr@4
    30
williamr@4
    31
/**
williamr@4
    32
This class associates DOM Documents with a string name.
williamr@4
    33
Entries can be added and removed.
williamr@4
    34
*/
williamr@4
    35
class CXmlEngXFormsInstanceMap : public CBase
williamr@4
    36
{
williamr@4
    37
    friend class RXmlEngXPathExpression;
williamr@4
    38
williamr@4
    39
public:
williamr@4
    40
    /**
williamr@4
    41
    Allocates and constructs a new CXmlENgXFormsInstanceMap object.
williamr@4
    42
    @return A new CXmlEngXFormsInstanceMap object.
williamr@4
    43
    @leave KErrNoMemory Memory allocation failure
williamr@4
    44
	@leave - Otherwise, any of the system wide errors.
williamr@4
    45
    */
williamr@4
    46
    IMPORT_C static CXmlEngXFormsInstanceMap* NewL();
williamr@4
    47
williamr@4
    48
	/**
williamr@4
    49
	Allocates and constructs a new CXmlENgXFormsInstanceMap object, and leaves
williamr@4
    50
	it on the cleanup stack.
williamr@4
    51
    @return A new CXmlEngXFormsInstanceMap object.
williamr@4
    52
    @leave KErrNoMemory Memory allocation failure
williamr@4
    53
	@leave - Otherwise, any of the system wide errors.
williamr@4
    54
    */
williamr@4
    55
    IMPORT_C static CXmlEngXFormsInstanceMap* NewLC();
williamr@4
    56
williamr@4
    57
public:
williamr@4
    58
    /**
williamr@4
    59
	Destructor. Frees internal storage, but does not free the Document
williamr@4
    60
	instances that were added. These are owned by the caller.
williamr@4
    61
    */
williamr@4
    62
    IMPORT_C ~CXmlEngXFormsInstanceMap();
williamr@4
    63
williamr@4
    64
	/**
williamr@4
    65
	Adds an entry to the map. The document is associated with a name. If an
williamr@4
    66
	entry with the same name already exists this method does nothing.
williamr@4
    67
williamr@4
    68
	Ownership of the document is not transferred.
williamr@4
    69
    
williamr@4
    70
    @param aInstance   The DOM document to be stored.
williamr@4
    71
    @param aName       The name that to be associated with the document.
williamr@4
    72
	@leave KErrNoMemory Memory allocation failure
williamr@4
    73
	@leave - Otherwise, any of the system wide errors.
williamr@4
    74
    */
williamr@4
    75
    IMPORT_C void AddEntryL(RXmlEngDocument& aInstance, const TDesC8& aName);
williamr@4
    76
williamr@4
    77
    /**
williamr@4
    78
    Removes an entry from the map. If the entry does not exist, the
williamr@4
    79
    method does nothing. Note that the document is not freed.
williamr@4
    80
     
williamr@4
    81
    @param aName Name of entry to remove. 
williamr@4
    82
	@leave KErrNoMemory Memory allocation failure
williamr@4
    83
	@leave - Otherwise, any of the system wide errors.
williamr@4
    84
    */
williamr@4
    85
    IMPORT_C void RemoveEntryL(const TDesC8& aName);
williamr@4
    86
williamr@4
    87
private:
williamr@4
    88
    /** Second phase constructor */
williamr@4
    89
    void ConstructL();    
williamr@4
    90
williamr@4
    91
    /** Default constructor */
williamr@4
    92
    CXmlEngXFormsInstanceMap() {}
williamr@4
    93
williamr@4
    94
private:
williamr@4
    95
    void *iInternal;             
williamr@4
    96
};
williamr@4
    97
williamr@4
    98
#endif // XMLENGCXFORMSINSTANCEMAP_H
williamr@4
    99