source: icXML/icXML-devel/src/icxmlc/XMLSynchronizedNamespaceResolver.hpp @ 2720

Last change on this file since 2720 was 2720, checked in by cameron, 6 years ago

Initial check-in of icXML 0.8 source files

File size: 2.4 KB
Line 
1/*
2 *  Copyright © 2012 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icXML is a trademark of International Characters.
5 */
6
7/*
8 * @author Nigel Medforth, nigelm -at- interational-characters.com
9 * @version $Id: XMLSynchronizedNamespaceResolver.hpp 207 2012-12-02 20:38:22Z robc $
10 *
11 */
12
13#ifndef XMLSYNCHRONIZEDNAMESPACERESOLVER_HPP
14#define XMLSYNCHRONIZEDNAMESPACERESOLVER_HPP
15
16#include <xercesc/util/Mutexes.hpp>
17#include <icxmlc/XMLNamespaceResolver.hpp>
18#include <icxmlc/XMLConfig.hpp>
19
20// WARNING! This is not intended to be an efficient synchronization scheme; it is merely a wrapper for the
21// XMLNamespaceResolver in order to replace the functionality provided by the SynchronizedStringPool class
22// that is used within the XMLGrammarPoolImpl class.
23
24XERCES_CPP_NAMESPACE_BEGIN
25
26/** --------------------------------------------------------------------------------------------------------- **
27
28 ** --------------------------------------------------------------------------------------------------------- **/
29class XMLSynchronizedNamespaceResolver
30{
31        XMLSynchronizedNamespaceResolver
32        (
33                const XMLNamespaceResolver *    resolver
34                , MemoryManager* const                  manager
35        )
36        : fNamespaceResolver(resolver)
37        , fMutex(manager)
38        {
39
40        }
41
42        IDISA_ALWAYS_INLINE
43        unsigned int resolveUriId(const XMLCh * uri)
44        {
45
46        }
47
48        IDISA_ALWAYS_INLINE
49        unsigned int resolvePrefixId(const XMLCh * prefix)
50        {
51
52
53        }
54
55        IDISA_ALWAYS_INLINE
56        const XMLCh * operator[](const unsigned int uriId) const
57        {
58
59        }
60
61        IDISA_ALWAYS_INLINE
62        const XMLCh * getUriForId(const unsigned int uriId) const
63        {
64
65        }
66
67        IDISA_ALWAYS_INLINE
68        const XMLCh * getPrefixForId(const unsigned int prefixId) const
69        {
70
71        }
72
73        IDISA_ALWAYS_INLINE
74        unsigned int getEmptyUriId() const { return fNamespaceResolver->getEmptyUriId(); }
75
76        IDISA_ALWAYS_INLINE
77        unsigned int getUnknownUriId() const { return fNamespaceResolver->getUnknownUriId(); }
78
79        IDISA_ALWAYS_INLINE
80        unsigned int getXMLUriId() const { return fNamespaceResolver->getXMLUriId(); }
81
82        IDISA_ALWAYS_INLINE
83        unsigned int getXMLNSUriId() const { return fNamespaceResolver->getXMLNSUriId(); }
84
85        IDISA_ALWAYS_INLINE
86        unsigned int getSchemaUriId() const { return fNamespaceResolver->getSchemaUriId(); }
87
88private:
89
90        const XMLNamespaceResolver *                                    fNamespaceResolver;
91        XMLMutex                                                                                fMutex;
92};
93
94XERCES_CPP_NAMESPACE_END
95
96#endif // XMLSYNCHRONIZEDNAMESPACERESOLVER_HPP
Note: See TracBrowser for help on using the repository browser.