00001 #ifndef DOMBuilder_HEADER_GUARD_
00002 #define DOMBuilder_HEADER_GUARD_
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 #include <xercesc/util/XercesDefs.hpp>
00028
00029 XERCES_CPP_NAMESPACE_BEGIN
00030
00031
00032 class DOMErrorHandler;
00033 class DOMEntityResolver;
00034 class DOMInputSource;
00035 class DOMBuilderFilter;
00036 class DOMNode;
00037 class DOMDocument;
00038 class Grammar;
00039
00050 class CDOM_EXPORT DOMBuilder
00051 {
00052 protected :
00053
00054
00055
00058 DOMBuilder() {};
00060
00061 private:
00062
00063
00064
00067 DOMBuilder(const DOMBuilder &);
00068 DOMBuilder & operator = (const DOMBuilder &);
00070
00071 public:
00072
00073
00074
00081 virtual ~DOMBuilder() {};
00083
00084
00085
00086
00116 enum ActionType
00117 {
00118 ACTION_REPLACE = 1,
00119 ACTION_APPEND_AS_CHILDREN = 2,
00120 ACTION_INSERT_AFTER = 3,
00121 ACTION_INSERT_BEFORE = 4
00122 };
00124
00125
00126
00127
00130
00131
00132
00133
00134
00146 virtual DOMErrorHandler* getErrorHandler() = 0;
00147
00159 virtual const DOMErrorHandler* getErrorHandler() const = 0;
00160
00172 virtual DOMEntityResolver* getEntityResolver() = 0;
00173
00185 virtual const DOMEntityResolver* getEntityResolver() const = 0;
00186
00198 virtual DOMBuilderFilter* getFilter() = 0;
00199
00211 virtual const DOMBuilderFilter* getFilter() const = 0;
00212
00213
00214
00215
00233 virtual void setErrorHandler(DOMErrorHandler* const handler) = 0;
00234
00254 virtual void setEntityResolver(DOMEntityResolver* const handler) = 0;
00255
00277 virtual void setFilter(DOMBuilderFilter* const filter) = 0;
00278
00279
00280
00281
00305 virtual void setFeature(const XMLCh* const name, const bool state) = 0;
00306
00322 virtual bool getFeature(const XMLCh* const name) const = 0;
00323
00340 virtual bool canSetFeature(const XMLCh* const name, const bool state) const = 0;
00341
00342
00343
00344
00375 virtual DOMDocument* parse(const DOMInputSource& source) = 0;
00376
00404 virtual DOMDocument* parseURI(const XMLCh* const systemId) = 0;
00405
00432 virtual DOMDocument* parseURI(const char* const systemId) = 0;
00433
00462 virtual void parseWithContext
00463 (
00464 const DOMInputSource& source
00465 , DOMNode* const contextNode
00466 , const short action
00467 ) = 0;
00469
00470
00471
00472
00475
00497 virtual void* getProperty(const XMLCh* const name) const = 0 ;
00498
00520 virtual void setProperty(const XMLCh* const name, void* value) = 0 ;
00521
00528 virtual void release() = 0;
00529
00553 virtual void resetDocumentPool() = 0;
00554
00582 virtual Grammar* loadGrammar(const DOMInputSource& source,
00583 const short grammarType,
00584 const bool toCache = false) = 0;
00585
00611 virtual Grammar* loadGrammar(const XMLCh* const systemId,
00612 const short grammarType,
00613 const bool toCache = false) = 0;
00614
00640 virtual Grammar* loadGrammar(const char* const systemId,
00641 const short grammarType,
00642 const bool toCache = false) = 0;
00643
00650 virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
00651
00657 virtual Grammar* getRootGrammar() const = 0;
00658
00665 virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
00666
00670 virtual void resetCachedGrammarPool() = 0;
00671
00677 virtual unsigned int getSrcOffset() const = 0;
00678
00680
00681 };
00682
00683
00684 XERCES_CPP_NAMESPACE_END
00685
00686 #endif