00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 #if !defined(XMLGRAMMARPOOL_HPP)
00099 #define XMLGRAMMARPOOL_HPP
00100
00101 #include <xercesc/util/PlatformUtils.hpp>
00102 #include <xercesc/util/RefHashTableOf.hpp>
00103 #include <xercesc/util/XMemory.hpp>
00104 #include <xercesc/framework/psvi/XSModel.hpp>
00105
00106
00107 XERCES_CPP_NAMESPACE_BEGIN
00108
00109 class Grammar;
00110 class XMLGrammarDescription;
00111 class DTDGrammar;
00112 class SchemaGrammar;
00113 class XMLDTDDescription;
00114 class XMLSchemaDescription;
00115 class XMLStringPool;
00116 class BinInputStream;
00117 class BinOutputStream;
00118
00119 class XMLGrammarPool : public XMemory
00120 {
00121 public :
00122
00124
00126
00131 virtual ~XMLGrammarPool(){};
00133
00134
00136
00138
00152 virtual bool cacheGrammar(Grammar* const gramToCache) = 0;
00153
00161 virtual Grammar* retrieveGrammar(XMLGrammarDescription* const gramDesc) = 0;
00162
00163
00172 virtual Grammar* orphanGrammar(const XMLCh* const nameSpaceKey) = 0;
00173
00174
00180 virtual RefHashTableOfEnumerator<Grammar> getGrammarEnumerator() const = 0;
00181
00188 virtual bool clear() = 0;
00189
00199 virtual void lockPool() = 0;
00200
00211 virtual void unlockPool() = 0;
00212
00214
00215
00217
00219
00224 virtual DTDGrammar* createDTDGrammar() = 0;
00225
00230 virtual SchemaGrammar* createSchemaGrammar() = 0;
00231
00236 virtual XMLDTDDescription* createDTDDescription(const XMLCh* const rootName) = 0;
00241 virtual XMLSchemaDescription* createSchemaDescription(const XMLCh* const targetNamespace) = 0;
00242
00244
00245
00247
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261 virtual XSModel *getXSModel() = 0;
00262
00263
00264
00265
00267
00269
00274 inline MemoryManager* const getMemoryManager()
00275 {
00276 return fMemMgr;
00277 }
00278
00285 virtual XMLStringPool *getURIStringPool() = 0;
00287
00288
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344 virtual void serializeGrammars(BinOutputStream* const) = 0;
00345 virtual void deserializeGrammars(BinInputStream* const) = 0;
00346
00347 protected :
00348
00350
00352
00353 :fMemMgr(memMgr)
00354 {
00355 };
00357
00358 private :
00359
00361
00363
00364 XMLGrammarPool& operator=(const XMLGrammarPool& );
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375 MemoryManager* const fMemMgr;
00376
00377 };
00378
00379 XERCES_CPP_NAMESPACE_END
00380
00381 #endif