Provide the grammar pool with an opportunity to cache the given grammar. If the pool does not choose to do so, it should return false; otherwise, it should return true, so that the caller knows whether the grammar has been adopted.
Parameters:
gramToCache
the Grammar to be cached in the grammar pool
Returns:
true if the grammar pool has elected to cache the grammar (in which case it is assumed to have adopted it); false if it does not cache it
virtual bool XMLGrammarPool::clear
(
)
[pure virtual]
clear
all grammars are removed from the grammar pool and deleted.
Returns:
true if the grammar pool was cleared. false if it did not.
Return an XMLStringPool for use by validation routines.
Implementations should not create a string pool on each call to this method, but should maintain one string pool for all grammars for which this pool is responsible.
When this method is called by the application, the grammar pool should stop adding new grammars to the cache. This should result in the grammar pool being sharable among parsers operating in different threads.
virtual Grammar* XMLGrammarPool::orphanGrammar
(
const XMLCh *const
nameSpaceKey
)
[pure virtual]
orphanGrammar
grammar removed from the grammar pool and owned by the caller
Parameters:
nameSpaceKey
Key used to search for grammar in the grammar pool
Returns:
the grammar that was removed from the pool (0 if none)
After this method has been called, the grammar pool implementation should return to its default behaviour when cacheGrammars(...) is called. One effect, depending on the underlying implementation, is that the grammar pool may no longer be thread-safe (even on read operations).
For PSVI support any previous XSModel that was produced will be deleted.
The documentation for this class was generated from the following file: